com.sage.swt.client.customization
Class EnumPropertyEditor

java.lang.Object
  extended by com.sage.swt.client.customization.EnumPropertyEditor
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
ContextMenuTypePropertyEditor, HorizontalAlignmentPropertyEditor, NavigatorPanelLevelProperty.NavigatorPanelLevelPropertyEditor, NumberDomainPropertyEditor, ProjectTypePropertyEditor, TableTypePropertyEditor, ThemePropertyEditor, VerticalAlignmentPropertyEditor

public class EnumPropertyEditor
extends java.lang.Object
implements PropertyEditor

Base class for a property editor for properties with enumerated values.


Constructor Summary
EnumPropertyEditor(DesignerLanguageResources.WidgetPropertyContent content, java.lang.String tagName, SelectableItemList enumList)
          Constructs an abstract property editor with the given selectable item list containing each enumerated value's string representation and data.
 
Method Summary
 java.lang.Object convertStringToValue(java.lang.String s)
          Converts the string representation of the property's value to the actual value.
 java.lang.String convertValueToString(java.lang.Object value)
          Converts the property's value to the string representation of that value.
 java.lang.String getDisplayName()
          Gets the property's display name (such as "Read-Only").
 java.lang.String getTagName()
          Gets the property's tag name (such as "readOnly").
 PropertyEditorWidget getWidget(Property property, SwtWidget swtWidget, SwtErrorStack errorStack)
          Gets the property editor widget that will allow you to edit the properties for the specified property on the specified SWT widget (swtWidget).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumPropertyEditor

public EnumPropertyEditor(DesignerLanguageResources.WidgetPropertyContent content,
                          java.lang.String tagName,
                          SelectableItemList enumList)
Constructs an abstract property editor with the given selectable item list containing each enumerated value's string representation and data.

Parameters:
content - the Designer content for the property
tagName - the tag name for the property
enumList - The selectable item list containing each enumerated value's string representation and data.
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Gets the property's display name (such as "Read-Only"). The UI designer will show the display name for the property.

Specified by:
getDisplayName in interface PropertyEditor
Returns:
The property's display name.

getTagName

public java.lang.String getTagName()
Gets the property's tag name (such as "readOnly"). This tag name gets stored in the declarative information (i.e. it may be the XML attribute name or element name).

Specified by:
getTagName in interface PropertyEditor
Returns:
The property's tag name.

convertStringToValue

public java.lang.Object convertStringToValue(java.lang.String s)
Converts the string representation of the property's value to the actual value.

Specified by:
convertStringToValue in interface PropertyEditor
Parameters:
s - The string representation of the property's value.
Returns:
The property's value.

convertValueToString

public java.lang.String convertValueToString(java.lang.Object value)
Converts the property's value to the string representation of that value.

Specified by:
convertValueToString in interface PropertyEditor
Parameters:
value - The property's value.
Returns:
The string representation of the property's value.

getWidget

public PropertyEditorWidget getWidget(Property property,
                                      SwtWidget swtWidget,
                                      SwtErrorStack errorStack)
Gets the property editor widget that will allow you to edit the properties for the specified property on the specified SWT widget (swtWidget). This returned widget will be used by the UI designer in its property editing area.

Specified by:
getWidget in interface PropertyEditor
Parameters:
property - The property whose value will be edited.
swtWidget - The SWT widget whose property will be edited.
errorStack - The UI designer's SWT error stack.
Returns:
The property editor widget for the specified property and SWT widget.


Copyright © 2011 Sage Software, Inc. All rights reserved.