Class PTWindowEditor
- java.lang.Object
-
- org.eclipse.nebula.widgets.opal.propertytable.editor.PTEditor
-
- org.eclipse.nebula.widgets.opal.propertytable.editor.PTChooserEditor
-
- org.eclipse.nebula.widgets.opal.propertytable.editor.PTWindowEditor
-
- Direct Known Subclasses:
PTDimensionEditor,PTInsetsEditor,PTRectangleEditor
public abstract class PTWindowEditor extends PTChooserEditor
This abstract class contains common code for editors that open a window : dimension editor, insets editor, rectangle editor
-
-
Constructor Summary
Constructors Constructor Description PTWindowEditor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddVerifyListeners(org.eclipse.swt.widgets.Text text)Add a verify listener to a given text that accepts only integersprotected abstract voidcreateContent(org.eclipse.swt.widgets.Shell shell, PTProperty property)Create the content (text widgets)protected abstract voidfillProperty(org.eclipse.swt.widgets.Item item, PTProperty property)Fill property when the ok button is pressedprotected org.eclipse.swt.graphics.ColorgetBackgroundColor(PTProperty property)Get the background color of an itemprotected intgetIntValue(org.eclipse.swt.widgets.Text text)protected voidopenWindow(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)Open the window to edit the property-
Methods inherited from class org.eclipse.nebula.widgets.opal.propertytable.editor.PTChooserEditor
getTextFor, render
-
-
-
-
Method Detail
-
openWindow
protected void openWindow(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)
Description copied from class:PTChooserEditorOpen the window to edit the property- Specified by:
openWindowin classPTChooserEditor- Parameters:
widget- parent widgetitem- itemproperty- edited property- See Also:
PTChooserEditor.openWindow(org.eclipse.nebula.widgets.opal.propertytable.PTWidget, org.eclipse.swt.widgets.Item, org.eclipse.nebula.widgets.opal.propertytable.PTProperty)
-
fillProperty
protected abstract void fillProperty(org.eclipse.swt.widgets.Item item, PTProperty property)Fill property when the ok button is pressed- Parameters:
item- item in which the string representation of property's value is displayproperty- associated property
-
createContent
protected abstract void createContent(org.eclipse.swt.widgets.Shell shell, PTProperty property)Create the content (text widgets)- Parameters:
shell- associated shellproperty- associated property
-
getBackgroundColor
protected org.eclipse.swt.graphics.Color getBackgroundColor(PTProperty property)
Description copied from class:PTChooserEditorGet the background color of an item- Specified by:
getBackgroundColorin classPTChooserEditor- Parameters:
property- property- Returns:
- a background color (for the PTColorEditor) or null (for other editors).
- See Also:
PTChooserEditor.getBackgroundColor(org.eclipse.nebula.widgets.opal.propertytable.PTProperty)
-
getIntValue
protected int getIntValue(org.eclipse.swt.widgets.Text text)
- Parameters:
text- text widget- Returns:
- the integer value stored in a text. If the text value is empty, returns 0
-
addVerifyListeners
protected void addVerifyListeners(org.eclipse.swt.widgets.Text text)
Add a verify listener to a given text that accepts only integers- Parameters:
text- text widget
-
-