Class TableProperty
java.lang.Object
ro.sync.ecss.extensions.commons.table.properties.TableProperty
Class representing a table property. It contains the name of the property,
possible values, icons for the values, current set value of the property,
the group that contains it, the type of GUI elements that will be used to
present the property in the "Table properties" dialog.
-
Constructor Summary
ConstructorsConstructorDescriptionTableProperty
(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue) Constructor.TableProperty
(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue, boolean isAttribute) Constructor.TableProperty
(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue, boolean isAttribute, boolean isActive) Constructor.TableProperty
(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue, String parentGroup, GuiElements guiType, Map<String, String> icons, boolean isAttribute, boolean isActive) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Obtain the property name.Obtain the render string fort the property.Obtain the current value for the attributes.Obtain the type of GUI elements which will be used to present the values for the property.getIcons()
Obtain the icons for the property values.Obtain the old set value.Obtain the group that includes the current property.Obtain the property possible values.int
hashCode()
boolean
isActive()
Check if the property can be edited through the properties dialog.boolean
true
if the current property represents an attribute.void
setCurrentValue
(String currentValue) Set a new current value for the property.void
setGuiType
(GuiElements guiType) Set the type of GUI elements which will be used to present the values for the property.void
Set the icons for the property possible values.void
setOldValue
(String oldValue) Set the old value for the property.void
setParentGroup
(String parentGroup) Sets the group that includes the current property.void
Sets the values for the current property.toString()
-
Constructor Details
-
TableProperty
public TableProperty(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue) Constructor.- Parameters:
propertyName
- The qName of the current attribute.propertyRenderString
- The string that will be presented in theSATablePropertiesCustomizerDialog
. It can be different from the attribute name or it can be even the same.propertyValues
- The list with the attribute's possible values.currentValue
- The current of the attribute.
-
TableProperty
public TableProperty(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue, boolean isAttribute) Constructor.- Parameters:
propertyName
- The qName of the current attribute.propertyRenderString
- The string that will be presented in theSATablePropertiesCustomizerDialog
. It can be different from the attribute name or it can be even the same.propertyValues
- The list with the attribute's possible values.currentValue
- The current of the attribute.isAttribute
-true
if the current property represents an attribute.
-
TableProperty
public TableProperty(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue, boolean isAttribute, boolean isActive) Constructor.- Parameters:
propertyName
- The qName of the current attribute.propertyRenderString
- The string that will be presented in theSATablePropertiesCustomizerDialog
. It can be different from the attribute name or it can be even the same.propertyValues
- The list with the attribute's possible values.currentValue
- The current of the attribute.isAttribute
-true
if the current property represents an attribute.isActive
-true
if the combobox corresponding to the current property is enabled,false
otherwise.
-
TableProperty
public TableProperty(String propertyName, String propertyRenderString, List<String> propertyValues, String currentValue, String parentGroup, GuiElements guiType, Map<String, String> icons, boolean isAttribute, boolean isActive) Constructor.- Parameters:
propertyName
- The qName of the current attribute.propertyRenderString
- The string that will be presented in theSATablePropertiesCustomizerDialog
. It can be different from the attribute name or it can be even the same.propertyValues
- The list with the attribute's possible values.currentValue
- The current of the attribute.parentGroup
- The group name that will include the current property.guiType
- The type of GUI element that will be used to represent the values for the current property. If is one ofGuiElements.COMBOBOX
,GuiElements.RADIO_BUTTONS
. The default isGuiElements.COMBOBOX
. If this parameter is set tonull
, the element that will be used isGuiElements.COMBOBOX
.icons
- The list of icons. An icon for every value. If empty icon corresponds to a value, the icon will be nullisAttribute
-true
if the current property represents an attribute.isActive
-true
if the combobox corresponding to the current property is enabled,false
otherwise.
-
-
Method Details
-
getAttributeName
Obtain the property name.- Returns:
- Returns the property name.
-
getAttributeRenderString
Obtain the render string fort the property.- Returns:
- the render string fort the property
-
getValues
Obtain the property possible values.- Returns:
- Returns the values.
-
getCurrentValue
Obtain the current value for the attributes.- Returns:
- Returns the current value of the attribute.
-
setCurrentValue
Set a new current value for the property.- Parameters:
currentValue
- The new value to set.
-
getParentGroup
Obtain the group that includes the current property.- Returns:
- Returns the group name or
null
if no group contains this property.
-
setParentGroup
Sets the group that includes the current property.- Parameters:
parentGroup
- The group that includes the current property.
-
isAttribute
public boolean isAttribute()true
if the current property represents an attribute.- Returns:
- Returns
true
if the property is an attribute.
-
equals
-
toString
-
getOldValue
Obtain the old set value.- Returns:
- Returns the old value.
-
setOldValue
Set the old value for the property. It should be correlated with setting a new value.- Parameters:
oldValue
- The old value to set.
-
isActive
public boolean isActive()Check if the property can be edited through the properties dialog.- Returns:
true
if the combobox corresponding to the current property is enabled,false
otherwise.
-
hashCode
public int hashCode() -
setValues
Sets the values for the current property.- Parameters:
values
- Values for the current property.
-
setGuiType
Set the type of GUI elements which will be used to present the values for the property.- Parameters:
guiType
- The new type GUI elements which will be used to present the values for the property.
-
getGuiType
Obtain the type of GUI elements which will be used to present the values for the property.- Returns:
- Returns the type of GUI elements which will be used to present the values for the property.
-
getIcons
Obtain the icons for the property values. If the list contains null objects, then an empty icon should be used.- Returns:
- Returns the icons for all the possible values. Every values is mapped to an icon path.
-
setIcons
Set the icons for the property possible values.- Parameters:
icons
- The icons to set.
-