Package xal.extension.widgets.beaneditor
Class PropertyRecord
java.lang.Object
xal.extension.widgets.beaneditor.PropertyRecord
Wraps a property for display as a record in a table
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the label for display.boolean
synonym for isEditable so the table model will workgetName()
name of the propertygetPath()
Get the path to this propertyClass<?>
Get the property typegetUnits()
Get the unitsgetValue()
Get the value for this propertyboolean
indicates whether this record has unpublished changesboolean
only primitive properties are editablevoid
publish()
publish the pending value to the underlying propertyvoid
publish the pending value to the underlying property if editable and marked with unpublished changesvoid
revert()
revert back to the current value of the underlying propertyvoid
revert to the property value if this record is editable and has unpublished changesvoid
setValue
(boolean value) set the pending valuevoid
set the pending valuevoid
Set the pending string value.static List<PropertyRecord>
toRecords
(EditablePropertyContainer propertyTree) Generate a flat list of records from the given property tree
-
Constructor Details
-
PropertyRecord
Constructor
-
-
Method Details
-
getName
name of the property -
getPath
Get the path to this property -
getDisplayLabel
Get the label for display. -
getPropertyType
Get the property type -
getValue
Get the value for this property -
setValue
set the pending value -
setValue
public void setValue(boolean value) set the pending value -
setValue
Set the pending string value. Most values (except for boolean) are set as string since the table cell editor does so. -
getEditable
public boolean getEditable()synonym for isEditable so the table model will work -
isEditable
public boolean isEditable()only primitive properties are editable -
hasChanges
public boolean hasChanges()indicates whether this record has unpublished changes -
revertIfNeeded
public void revertIfNeeded()revert to the property value if this record is editable and has unpublished changes -
revert
public void revert()revert back to the current value of the underlying property -
publishIfNeeded
public void publishIfNeeded()publish the pending value to the underlying property if editable and marked with unpublished changes -
publish
public void publish()publish the pending value to the underlying property -
getUnits
Get the units -
toRecords
Generate a flat list of records from the given property tree
-