Class PTChooserEditor
java.lang.Object
org.eclipse.nebula.widgets.opal.propertytable.editor.PTEditor
org.eclipse.nebula.widgets.opal.propertytable.editor.PTChooserEditor
- Direct Known Subclasses:
PTColorEditor
,PTDirectoryEditor
,PTFileEditor
,PTFontEditor
,PTWindowEditor
public abstract class PTChooserEditor extends PTEditor
This abstract class represents a chooser. A chooser is composed of :
- a displayed value (text)
- a "X" button to erase the value (set to null)
- a "..." button to open an extra window to set up the value
-
Constructor Summary
Constructors Constructor Description PTChooserEditor()
-
Method Summary
Modifier and Type Method Description protected abstract org.eclipse.swt.graphics.Color
getBackgroundColor(PTProperty property)
Get the background color of an itemprotected abstract java.lang.String
getTextFor(PTProperty property)
protected abstract void
openWindow(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)
Open the window to edit the propertyorg.eclipse.swt.custom.ControlEditor
render(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)
Renders an editor
-
Constructor Details
-
PTChooserEditor
public PTChooserEditor()
-
-
Method Details
-
render
public org.eclipse.swt.custom.ControlEditor render(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)Description copied from class:PTEditor
Renders an editor- Specified by:
render
in classPTEditor
- Parameters:
widget
- the parent PTWidget (a table or a tree table)item
- the item on which the editor is displayedproperty
- the property associated to the editor- Returns:
- a control editor
- See Also:
PTEditor.render(org.eclipse.nebula.widgets.opal.propertytable.PTWidget, org.eclipse.swt.widgets.Item, org.eclipse.nebula.widgets.opal.propertytable.PTProperty)
-
openWindow
protected abstract void openWindow(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)Open the window to edit the property- Parameters:
widget
- parent widgetitem
- itemproperty
- edited property
-
getTextFor
- Parameters:
property
- property- Returns:
- the string representation of the value stored in the property
-
getBackgroundColor
Get the background color of an item- Parameters:
property
- property- Returns:
- a background color (for the PTColorEditor) or null (for other editors).
-