Class PropertyTableModel
- java.lang.Object
- 
- javax.swing.table.AbstractTableModel
- 
- com.inductiveautomation.factorypmi.designer.property.PropertyTableModel
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- javax.swing.table.TableModel
 - Direct Known Subclasses:
- SimplifiedPropertyTableModel
 
 public class PropertyTableModel extends javax.swing.table.AbstractTableModelTable 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 PropertyTableModelfor the new property table that is used in the actual property editor pane.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.util.Comparator<java.beans.FeatureDescriptor>alphabeticalComparatorprotected java.lang.Objectbeanprotected java.beans.BeanDescriptorbeanDescriptorprotected java.util.Listbeansstatic intCOL_NAMEstatic intCOL_VALUEprotected intcurrentFilterprotected java.beans.FeatureDescriptor[]descriptorsprotected static booleaneditorsRegisteredprotected MultiBeanInfoinfoprotected booleanmultiObjectprotected static DescriptorComparatornaturalComparatorprotected static intNUM_COLUMNSprotected java.util.Hashtable<java.lang.Class,java.beans.PropertyEditor>propEditorsCached property editors.static intSORT_ALPHABETICALstatic intSORT_NATURALstatic intSORT_TYPEprotected intsortOrderprotected static java.util.Comparator<java.beans.FeatureDescriptor>typeComparatorstatic intVIEW_ALLstatic intVIEW_BOUNDstatic intVIEW_CONSTRAINEDstatic intVIEW_EXPERTstatic intVIEW_HIDDENstatic intVIEW_PREFERREDstatic intVIEW_READ_ONLYstatic intVIEW_STANDARD
 - 
Constructor SummaryConstructors Constructor Description PropertyTableModel(VisionDesignerImpl fpmi)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilterTable(int view)Filters the table to display only properties with specific attributes.intgetColumnCount()Get column count (2: name, value)DesignerContextgetContext()java.lang.ClassgetCustomEditorClass(int row)java.awt.ComponentgetCustomizer()Gets the customizer for the current object.intgetFilter()Returns the current filter typejava.lang.ObjectgetObject()Return the current object that is represented by this model.VisionDesignerImplgetObjectHolder()java.beans.FeatureDescriptorgetPropertyDescriptor(int row)Returns the PropertyDescriptor for the row.java.beans.PropertyEditorgetPropertyEditor(int row)Returns a new instance of the property editor for a given class.java.lang.ClassgetPropertyType(int row)Returns the Java type info for the property at the given row.intgetRowCount()Get row count (total number of properties shown)intgetSortOrder()java.lang.ObjectgetValueAt(int row, int col)Get text value for cell of tablebooleanhasCustomizer()Returns a flag indicating if the encapsulated object has a customizer.booleanisCellEditable(int row, int col)Check if given cell is editablebooleanisRowCustomEditor(int row)voidreloadBean()voidsetFilter(int filter)Sets the current filter of the Properties.voidsetMultiObject(java.util.List beans)voidsetObject(java.lang.Object bean)Set the table model to represents the properties of the object.voidsetSortOrder(int sort)Sets the current sort order on the datavoidsetValueAt(java.lang.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 Detail- 
multiObjectprotected boolean multiObject 
 - 
descriptorsprotected java.beans.FeatureDescriptor[] descriptors 
 - 
beanDescriptorprotected java.beans.BeanDescriptor beanDescriptor 
 - 
infoprotected MultiBeanInfo info 
 - 
beanprotected java.lang.Object bean 
 - 
beansprotected java.util.List beans 
 - 
propEditorsprotected java.util.Hashtable<java.lang.Class,java.beans.PropertyEditor> propEditors Cached property editors.
 - 
editorsRegisteredprotected static boolean editorsRegistered 
 - 
naturalComparatorprotected static DescriptorComparator naturalComparator 
 - 
alphabeticalComparatorprotected static java.util.Comparator<java.beans.FeatureDescriptor> alphabeticalComparator 
 - 
typeComparatorprotected static java.util.Comparator<java.beans.FeatureDescriptor> typeComparator 
 - 
NUM_COLUMNSprotected static final int NUM_COLUMNS - See Also:
- Constant Field Values
 
 - 
COL_NAMEpublic static final int COL_NAME - See Also:
- Constant Field Values
 
 - 
COL_VALUEpublic static final int COL_VALUE - See Also:
- Constant Field Values
 
 - 
VIEW_ALLpublic static final int VIEW_ALL - See Also:
- Constant Field Values
 
 - 
VIEW_STANDARDpublic static final int VIEW_STANDARD - See Also:
- Constant Field Values
 
 - 
VIEW_EXPERTpublic static final int VIEW_EXPERT - See Also:
- Constant Field Values
 
 - 
VIEW_READ_ONLYpublic static final int VIEW_READ_ONLY - See Also:
- Constant Field Values
 
 - 
VIEW_BOUNDpublic static final int VIEW_BOUND - See Also:
- Constant Field Values
 
 - 
VIEW_CONSTRAINEDpublic static final int VIEW_CONSTRAINED - See Also:
- Constant Field Values
 
 - 
VIEW_HIDDENpublic static final int VIEW_HIDDEN - See Also:
- Constant Field Values
 
 - 
VIEW_PREFERREDpublic static final int VIEW_PREFERRED - See Also:
- Constant Field Values
 
 - 
currentFilterprotected int currentFilter 
 - 
SORT_NATURALpublic static final int SORT_NATURAL - See Also:
- Constant Field Values
 
 - 
SORT_ALPHABETICALpublic static final int SORT_ALPHABETICAL - See Also:
- Constant Field Values
 
 - 
SORT_TYPEpublic static final int SORT_TYPE - See Also:
- Constant Field Values
 
 - 
sortOrderprotected int sortOrder 
 
- 
 - 
Constructor Detail- 
PropertyTableModelpublic PropertyTableModel(VisionDesignerImpl fpmi) 
 
- 
 - 
Method Detail- 
getObjectHolderpublic VisionDesignerImpl getObjectHolder() 
 - 
getContextpublic DesignerContext 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() 
 - 
setObjectpublic void setObject(java.lang.Object bean) Set the table model to represents the properties of the object.
 - 
setMultiObjectpublic void setMultiObject(java.util.List beans) 
 - 
reloadBeanpublic void reloadBean() 
 - 
getObjectpublic java.lang.Object getObject() Return 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- javax.swing.table.TableModel
- Overrides:
- isCellEditablein class- javax.swing.table.AbstractTableModel
- Parameters:
- row- table row
- col- table column
 
 - 
getValueAtpublic java.lang.Object getValueAt(int row, int col)Get text value for cell of table- Parameters:
- row- table row
- col- table column
 
 - 
setValueAtpublic void setValueAt(java.lang.Object value, int row, int column)Set the value of the property at rowrowfor the selected bean (or beans)- Specified by:
- setValueAtin interface- javax.swing.table.TableModel
- Overrides:
- setValueAtin class- javax.swing.table.AbstractTableModel
 
 - 
getPropertyTypepublic java.lang.Class getPropertyType(int row) Returns the Java type info for the property at the given row.
 - 
getPropertyDescriptorpublic java.beans.FeatureDescriptor getPropertyDescriptor(int row) Returns the PropertyDescriptor for the row.
 - 
isRowCustomEditorpublic boolean isRowCustomEditor(int row) 
 - 
getCustomEditorClasspublic java.lang.Class getCustomEditorClass(int row) 
 - 
getPropertyEditorpublic java.beans.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.
 - 
hasCustomizerpublic boolean hasCustomizer() Returns a flag indicating if the encapsulated object has a customizer.
 - 
getCustomizerpublic java.awt.Component getCustomizer() Gets 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.
 
 
- 
 
-