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
Modifier and Type Method Description protected void
addVerifyListeners(org.eclipse.swt.widgets.Text text)
Add a verify listener to a given text that accepts only integersprotected abstract void
createContent(org.eclipse.swt.widgets.Shell shell, PTProperty property)
Create the content (text widgets)protected abstract void
fillProperty(org.eclipse.swt.widgets.Item item, PTProperty property)
Fill property when the ok button is pressedprotected org.eclipse.swt.graphics.Color
getBackgroundColor(PTProperty property)
Get the background color of an itemprotected int
getIntValue(org.eclipse.swt.widgets.Text text)
protected void
openWindow(PTWidget widget, org.eclipse.swt.widgets.Item item, PTProperty property)
Open the window to edit the propertyMethods inherited from class org.eclipse.nebula.widgets.opal.propertytable.editor.PTChooserEditor
getTextFor, render
-
Constructor Details
-
PTWindowEditor
public PTWindowEditor()
-
-
Method Details
-
openWindow
Description copied from class:PTChooserEditor
Open the window to edit the property- Specified by:
openWindow
in 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
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
Create the content (text widgets)- Parameters:
shell
- associated shellproperty
- associated property
-
getBackgroundColor
Description copied from class:PTChooserEditor
Get the background color of an item- Specified by:
getBackgroundColor
in 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
-