Class PTProperty
java.lang.Object
org.eclipse.nebula.widgets.opal.propertytable.PTProperty
public class PTProperty
extends java.lang.Object
Instances of this class are property stored in a PropertyTableWidget
-
Constructor Summary
Constructors Constructor Description PTProperty(java.lang.String name, java.lang.String displayName, java.lang.String description)
ConstructorPTProperty(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Object value)
Constructor -
Method Summary
Modifier and Type Method Description void
changeBackgroundColor(org.eclipse.swt.graphics.Color color)
Change the background color used to display the "display name" in the tablevoid
changeFont(org.eclipse.swt.graphics.Font font)
Change the font used to display the "display name" in the tablevoid
changeForegroundColor(org.eclipse.swt.graphics.Color color)
Change the foreground color used to display the "display name" in the tablevoid
discardChange()
Discard any change and set the value to the original valueboolean
equals(java.lang.Object obj)
java.lang.String
getCategory()
java.lang.String
getDescription()
java.lang.String
getDisplayName()
PTEditor
getEditor()
java.lang.String
getName()
java.lang.Object
getValue()
int
hashCode()
boolean
isEnabled()
(package private) void
setAssociatedItem(org.eclipse.swt.widgets.Item item)
PTProperty
setCategory(java.lang.String category)
PTProperty
setEditor(PTEditor editor)
PTProperty
setEnabled(boolean enabled)
PTProperty
setParentTable(PropertyTable parentTable)
PTProperty
setValue(java.lang.Object value)
-
Constructor Details
-
PTProperty
public PTProperty(java.lang.String name, java.lang.String displayName, java.lang.String description)Constructor- Parameters:
name
- name of the propertydisplayName
- Name of the property displayed in the widgetdescription
- Description of the property displayed in the widget
-
PTProperty
public PTProperty(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.Object value)Constructor- Parameters:
name
- name of the propertydisplayName
- Name of the property displayed in the widgetdescription
- Description of the property displayed in the widgetvalue
- Initial value of the property
-
-
Method Details
-
getCategory
public java.lang.String getCategory()- Returns:
- the category of the property
-
getDescription
public java.lang.String getDescription()- Returns:
- the description of the property
-
getDisplayName
public java.lang.String getDisplayName()- Returns:
- the displayed name of the property
-
getEditor
- Returns:
- the editor associated to this property
-
getName
public java.lang.String getName()- Returns:
- the name of the property
-
getValue
public java.lang.Object getValue()- Returns:
- the value of the property
-
isEnabled
public boolean isEnabled()- Returns:
true
if the property is enabled,false
otherwise
-
setCategory
- Parameters:
category
- category associated to this property- Returns:
- the property
-
setEditor
- Parameters:
editor
- editor associated to this property- Returns:
- the property
-
setEnabled
- Parameters:
enabled
- iftrue
, the property is enabled.- Returns:
- the property
-
setParentTable
- Parameters:
parentTable
- the property table associated to this property- Returns:
- the property
-
setAssociatedItem
void setAssociatedItem(org.eclipse.swt.widgets.Item item)- Parameters:
item
- item (TableItem or TreeItem) associated to this property
-
changeFont
public void changeFont(org.eclipse.swt.graphics.Font font)Change the font used to display the "display name" in the table- Parameters:
font
- new font
-
changeBackgroundColor
public void changeBackgroundColor(org.eclipse.swt.graphics.Color color)Change the background color used to display the "display name" in the table- Parameters:
color
- new background color
-
changeForegroundColor
public void changeForegroundColor(org.eclipse.swt.graphics.Color color)Change the foreground color used to display the "display name" in the table- Parameters:
color
- new foreground color
-
setValue
- Parameters:
value
- the new value of the property- Returns:
- the property
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
discardChange
public void discardChange()Discard any change and set the value to the original value
-