Class PropertyTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.inductiveautomation.factorypmi.designer.property.PropertyTableModel
- All Implemented Interfaces:
- Serializable,- TableModel
- Direct Known Subclasses:
- SimplifiedPropertyTableModel
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 SummaryFieldsModifier and TypeFieldDescriptionprotected static Comparator<FeatureDescriptor>protected Objectprotected BeanDescriptorprotected Liststatic final intstatic final intprotected intprotected FeatureDescriptor[]protected static booleanprotected MultiBeanInfoprotected booleanprotected static DescriptorComparatorprotected static final intprotected Hashtable<Class,PropertyEditor> Cached property editors.static final intstatic final intstatic final intprotected intprotected static Comparator<FeatureDescriptor>static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModellistenerList
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfilterTable(int view) Filters the table to display only properties with specific attributes.intGet column count (2: name, value)getCustomEditorClass(int row) Gets the customizer for the current object.intReturns the current filter typeReturn the current object that is represented by this model.getPropertyDescriptor(int row) Returns the PropertyDescriptor for the row.getPropertyEditor(int row) Returns a new instance of the property editor for a given class.getPropertyType(int row) Returns the Java type info for the property at the given row.intGet row count (total number of properties shown)intgetValueAt(int row, int col) Get text value for cell of tablebooleanReturns a flag indicating if the encapsulated object has a customizer.booleanisCellEditable(int row, int col) Check if given cell is editablebooleanisRowCustomEditor(int row) voidvoidsetFilter(int filter) Sets the current filter of the Properties.voidsetMultiObject(List beans) voidSet the table model to represents the properties of the object.voidsetSortOrder(int sort) Sets the current sort order on the datavoidsetValueAt(Object value, int row, int column) Set the value of the property at rowrowfor the selected bean (or beans)voidsortTable(int sort) Sorts the table according to the sort type.Methods inherited from class javax.swing.table.AbstractTableModeladdTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
- 
Field Details- 
multiObjectprotected boolean multiObject
- 
descriptors
- 
beanDescriptor
- 
info
- 
bean
- 
beans
- 
propEditorsCached property editors.
- 
editorsRegisteredprotected static boolean editorsRegistered
- 
naturalComparator
- 
alphabeticalComparator
- 
typeComparator
- 
NUM_COLUMNSprotected static final int NUM_COLUMNS- See Also:
 
- 
COL_NAMEpublic static final int COL_NAME- See Also:
 
- 
COL_VALUEpublic static final int COL_VALUE- See Also:
 
- 
VIEW_ALLpublic static final int VIEW_ALL- See Also:
 
- 
VIEW_STANDARDpublic static final int VIEW_STANDARD- See Also:
 
- 
VIEW_EXPERTpublic static final int VIEW_EXPERT- See Also:
 
- 
VIEW_READ_ONLYpublic static final int VIEW_READ_ONLY- See Also:
 
- 
VIEW_BOUNDpublic static final int VIEW_BOUND- See Also:
 
- 
VIEW_CONSTRAINEDpublic static final int VIEW_CONSTRAINED- See Also:
 
- 
VIEW_HIDDENpublic static final int VIEW_HIDDEN- See Also:
 
- 
VIEW_PREFERREDpublic static final int VIEW_PREFERRED- See Also:
 
- 
currentFilterprotected int currentFilter
- 
SORT_NATURALpublic static final int SORT_NATURAL- See Also:
 
- 
SORT_ALPHABETICALpublic static final int SORT_ALPHABETICAL- See Also:
 
- 
SORT_TYPEpublic static final int SORT_TYPE- See Also:
 
- 
sortOrderprotected int sortOrder
 
- 
- 
Constructor Details- 
PropertyTableModel
 
- 
- 
Method Details- 
getObjectHolder
- 
getContext
- 
setFilterpublic void setFilter(int filter) Sets the current filter of the Properties.- Parameters:
- filter- one of VIEW_ constants
 
- 
getFilterpublic int getFilter()Returns the current filter type
- 
setSortOrderpublic void setSortOrder(int sort) Sets the current sort order on the data- Parameters:
- sort- one of the SORT_ constants
 
- 
getSortOrderpublic int getSortOrder()
- 
setObjectSet the table model to represents the properties of the object.
- 
setMultiObject
- 
reloadBeanpublic void reloadBean()
- 
getObjectReturn the current object that is represented by this model.
- 
getRowCountpublic int getRowCount()Get row count (total number of properties shown)
- 
getColumnCountpublic int getColumnCount()Get column count (2: name, value)
- 
isCellEditablepublic boolean isCellEditable(int row, int col) Check if given cell is editable- Specified by:
- isCellEditablein interface- TableModel
- Overrides:
- isCellEditablein class- AbstractTableModel
- Parameters:
- row- table row
- col- table column
 
- 
getValueAtGet text value for cell of table- Parameters:
- row- table row
- col- table column
 
- 
setValueAtSet the value of the property at rowrowfor the selected bean (or beans)- Specified by:
- setValueAtin interface- TableModel
- Overrides:
- setValueAtin class- AbstractTableModel
 
- 
getPropertyTypeReturns the Java type info for the property at the given row.
- 
getPropertyDescriptorReturns the PropertyDescriptor for the row.
- 
isRowCustomEditorpublic boolean isRowCustomEditor(int row) 
- 
getCustomEditorClass
- 
getPropertyEditorReturns 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.
- 
hasCustomizerpublic boolean hasCustomizer()Returns a flag indicating if the encapsulated object has a customizer.
- 
getCustomizerGets the customizer for the current object.- Returns:
- New instance of the customizer or null if there isn't a customizer.
 
- 
sortTablepublic void sortTable(int sort) Sorts the table according to the sort type.
- 
filterTablepublic 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.
 
 
-