DESY ACOP Beans Home

com.cosylab.gui.property.editors
Interface PropertyEditor

All Known Implementing Classes:
BooleanEditor, ClassEditor, ColorEditor, DoubleEditor, EnumEditor, FloatEditor, FontEditor, IntegerEditor, LongEditor, NumberEditor, ShortEditor, SimpleDateSelector, SimpleFontEditor, StringEditor

public interface PropertyEditor

description

Version:
$id$
Author:
Ales Pucelj

Field Summary
static java.lang.String PROPERTY_VALUE_NAME
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Registers a PropertyChangeListener for this editor, which will be updated when a "propertyValue" property changes.
 java.lang.String getDescription()
          Returns the description for this editor.
 java.lang.Object getPropertyValue()
          Returns the value contained in this editor.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Deregisters a PropertyChangeListener from this editor.
 void setDescription(java.lang.String description)
           
 boolean setPropertyValue(java.lang.Object value)
          PropertyEditor should set the value specified and display it accordingly.
 

Field Detail

PROPERTY_VALUE_NAME

static final java.lang.String PROPERTY_VALUE_NAME
See Also:
Constant Field Values
Method Detail

getPropertyValue

java.lang.Object getPropertyValue()
Returns the value contained in this editor. To provide generic approach, value must be contained within Object, primitive types should be wrapped within appropriate classes (int - Integer). Return value of null should be used only to indicate, the value contained within this editor is invalid.

Returns:
Object

setPropertyValue

boolean setPropertyValue(java.lang.Object value)
PropertyEditor should set the value specified and display it accordingly. Return value show whether the value could be set. Return value should be true only, it the editor was able to set and display value. If the value parameter does not match the editors expected type, is null or has invalid value, return value should be false.

Parameters:
value - Value to set
Returns:
boolean Indicates whether set was successful.

getDescription

java.lang.String getDescription()
Returns the description for this editor. This description will be used to describe the component in the GUI. Its actual implementation depends on the implementing class.

If editor is unable to display the description, it must return null. This will allow for automatic creation of description and properly wrap the methods. If editor can display description but its value has not yet been defined, this method should return empty string.

Returns:
String

setDescription

void setDescription(java.lang.String description)

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Registers a PropertyChangeListener for this editor, which will be updated when a "propertyValue" property changes.


removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Deregisters a PropertyChangeListener from this editor.



Copyright © 2010. All Rights Reserved.