ValueEditor Class

ValueEditor Class

This Package | All Packages

public class ValueEditor
implements IValueEditor

Represents a standard implementation of the IValueEditor interface.

Methods
Name Description
editValue(IValueAccess valueAccess) Topic under construction.
getConstantName(Object value) Returns the fully qualified name of a constant that represents the given value, or returns null if there is no constant for the value.
getStyle() Returns the style flags for the value editor.
getSubProperties(Object value) Returns the subproperties to be displayed under the object.
getTextFromValue(Object value) Converts the given value to a text string.
getValueFromText(String text) Converts the given text string to a value.
getValues() Returns a list of possible values for the value editor's type.
paintValue(Object value, Graphics g, Rectangle rect) Paints a representation of the given value in the given Rectangle of the given Graphics.

Methods

ValueEditor.editValue

Syntax
public void editValue( IValueAccess valueAccess );
Description

Topic under construction.

ValueEditor.getConstantName

Syntax
public String getConstantName( Object value );
Description

Returns the fully qualified name of a constant that represents the given value, or returns null if there is no constant for the value.

ValueEditor.getStyle

Syntax
public int getStyle();
Description

Returns the style flags for the value editor. The returned value must be a combination of the STYLE_XXX bit masks defined in this interface.

ValueEditor.getSubProperties

Syntax
public SubProperty[] getSubProperties( Object value );
Description

Returns the subproperties to be displayed under the object.

ValueEditor.getTextFromValue

Syntax
public String getTextFromValue( Object value );
Description

Converts the given value to a text string. The return value may be null if the value cannot be converted to a text string.

ValueEditor.getValueFromText

Syntax
public Object getValueFromText( String text );
Description

Converts the given text string to a value. This method is not called if the value editor specifies the STYLE_NOVALUEFROMTEXT style.

ValueEditor.getValues

Syntax
public Object[] getValues();
Description

Returns a list of possible values for the value editor's type. To display these values in a drop-down list, a property editor typically calls getTextFromValue() for each of the values in the list.

ValueEditor.paintValue

Syntax
public void paintValue( Object value, Graphics g, Rectangle rect );
Description

Paints a representation of the given value in the given Rectangle of the given Graphics. This method is called only if the value editor specifies the STYLE_PAINTVALUE style.