Class PropertyTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
com.inductiveautomation.factorypmi.designer.property.PropertyTableModel
All Implemented Interfaces:
Serializable, TableModel
Direct Known Subclasses:
SimplifiedPropertyTableModel

public class PropertyTableModel extends AbstractTableModel

Table model used to obtain property names and values. This model encapsulates an array of PropertyDescriptors.

This is the old property table model from the old bean builder base. It it still used in the classic chart customizer. See PropertyTableModel for the new property table that is used in the actual property editor pane.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getObjectHolder

      public VisionDesignerImpl getObjectHolder()
    • getContext

      public DesignerContext getContext()
    • setFilter

      public void setFilter(int filter)
      Sets the current filter of the Properties.
      Parameters:
      filter - one of VIEW_ constants
    • getFilter

      public int getFilter()
      Returns the current filter type
    • setSortOrder

      public void setSortOrder(int sort)
      Sets the current sort order on the data
      Parameters:
      sort - one of the SORT_ constants
    • getSortOrder

      public int getSortOrder()
    • setObject

      public void setObject(Object bean)
      Set the table model to represents the properties of the object.
    • setMultiObject

      public void setMultiObject(List beans)
    • reloadBean

      public void reloadBean()
    • getObject

      public Object getObject()
      Return the current object that is represented by this model.
    • getRowCount

      public int getRowCount()
      Get row count (total number of properties shown)
    • getColumnCount

      public int getColumnCount()
      Get column count (2: name, value)
    • isCellEditable

      public boolean isCellEditable(int row, int col)
      Check if given cell is editable
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      row - table row
      col - table column
    • getValueAt

      public Object getValueAt(int row, int col)
      Get text value for cell of table
      Parameters:
      row - table row
      col - table column
    • setValueAt

      public void setValueAt(Object value, int row, int column)
      Set the value of the property at row row for the selected bean (or beans)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
    • getPropertyType

      public Class getPropertyType(int row)
      Returns the Java type info for the property at the given row.
    • getPropertyDescriptor

      public FeatureDescriptor getPropertyDescriptor(int row)
      Returns the PropertyDescriptor for the row.
    • isRowCustomEditor

      public boolean isRowCustomEditor(int row)
    • getCustomEditorClass

      public Class getCustomEditorClass(int row)
    • getPropertyEditor

      public PropertyEditor getPropertyEditor(int row)
      Returns a new instance of the property editor for a given class. If an editor is not specified in the property descriptor then it is looked up in the PropertyEditorManager.
    • hasCustomizer

      public boolean hasCustomizer()
      Returns a flag indicating if the encapsulated object has a customizer.
    • getCustomizer

      public Component getCustomizer()
      Gets the customizer for the current object.
      Returns:
      New instance of the customizer or null if there isn't a customizer.
    • sortTable

      public void sortTable(int sort)
      Sorts the table according to the sort type.
    • filterTable

      public void filterTable(int view)
      Filters the table to display only properties with specific attributes. Will sort the table after the data has been filtered.
      Parameters:
      view - The properties to display.