DESY ACOP Beans Home

com.cosylab.gui.components.customizer
Interface Editor

All Known Implementing Classes:
AcopEditor, CustomizerEditor, DefaultEditor, EditorChooser

public interface Editor

Editor controls editor panel, which prowides GUI editor for some aspect of displayer.

Implementator of this interface must provide defult constructor for implementation class.

Version:
$id$
Author:
Igor Kriznar, Jernej Kamenik

Field Summary
static java.lang.String[] ASPECTS
          List of names of editable aspects with this editor.
 
Method Summary
 void applySettings()
          Applies current settings to the edited displayer.
 boolean canEdit(java.lang.Object object, java.lang.String aspect)
          Test if this editor can edit given displayer with given aspect.
 javax.swing.JComponent getEditorComponent(java.lang.Object object, java.lang.String aspect)
          Starts editing session and returns conponent, which will provide GUI for editing some aspect, given with parameter, of the given displayer.
 void revertSettings()
          Reverts editor values to currently used settings.
 void stopEditing()
          Stop current editing session and release edited displayer.
 

Field Detail

ASPECTS

static final java.lang.String[] ASPECTS
List of names of editable aspects with this editor.

Method Detail

getEditorComponent

javax.swing.JComponent getEditorComponent(java.lang.Object object,
                                          java.lang.String aspect)
                                          throws java.lang.IllegalArgumentException
Starts editing session and returns conponent, which will provide GUI for editing some aspect, given with parameter, of the given displayer. IF displayer is not design to edit given component in given aspect, IllegalArgumentException is thrown.

Parameters:
aspect - the aspect in which displayer will be edited
Returns:
editor editor component
Throws:
java.lang.IllegalArgumentException

applySettings

void applySettings()
Applies current settings to the edited displayer. This does not stop current editing session.


canEdit

boolean canEdit(java.lang.Object object,
                java.lang.String aspect)
Test if this editor can edit given displayer with given aspect.

Parameters:
aspect - the aspect in which displayer should be edited
Returns:
true if this editor can edit given displayer

revertSettings

void revertSettings()
Reverts editor values to currently used settings. This does not stop current editing session.


stopEditing

void stopEditing()
Stop current editing session and release edited displayer.



Copyright © 2010. All Rights Reserved.