Class PropertyRecord

java.lang.Object
xal.extension.widgets.beaneditor.PropertyRecord

public class PropertyRecord extends Object
Wraps a property for display as a record in a table
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      name of the property
    • getPath

      public String getPath()
      Get the path to this property
    • getDisplayLabel

      public String getDisplayLabel()
      Get the label for display.
    • getPropertyType

      public Class<?> getPropertyType()
      Get the property type
    • getValue

      public Object getValue()
      Get the value for this property
    • setValue

      public void setValue(Object value)
      set the pending value
    • setValue

      public void setValue(boolean value)
      set the pending value
    • setValue

      public void setValue(String value)
      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

      public String getUnits()
      Get the units
    • toRecords

      public static List<PropertyRecord> toRecords(EditablePropertyContainer propertyTree)
      Generate a flat list of records from the given property tree