public class PropertyTableModel
extends javax.swing.table.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.
Modifier and Type | Field and Description |
---|---|
protected static java.util.Comparator<java.beans.FeatureDescriptor> |
alphabeticalComparator |
protected java.lang.Object |
bean |
protected java.beans.BeanDescriptor |
beanDescriptor |
protected java.util.List |
beans |
static int |
COL_NAME |
static int |
COL_VALUE |
protected int |
currentFilter |
protected java.beans.FeatureDescriptor[] |
descriptors |
protected static boolean |
editorsRegistered |
protected MultiBeanInfo |
info |
protected boolean |
multiObject |
protected static DescriptorComparator |
naturalComparator |
protected static int |
NUM_COLUMNS |
protected java.util.Hashtable<java.lang.Class,java.beans.PropertyEditor> |
propEditors
Cached property editors.
|
static int |
SORT_ALPHABETICAL |
static int |
SORT_NATURAL |
static int |
SORT_TYPE |
protected int |
sortOrder |
protected static java.util.Comparator<java.beans.FeatureDescriptor> |
typeComparator |
static int |
VIEW_ALL |
static int |
VIEW_BOUND |
static int |
VIEW_CONSTRAINED |
static int |
VIEW_EXPERT |
static int |
VIEW_HIDDEN |
static int |
VIEW_PREFERRED |
static int |
VIEW_READ_ONLY |
static int |
VIEW_STANDARD |
Constructor and Description |
---|
PropertyTableModel(VisionDesignerImpl fpmi) |
Modifier and Type | Method and Description |
---|---|
void |
filterTable(int view)
Filters the table to display only properties with specific attributes.
|
int |
getColumnCount()
Get column count (2: name, value)
|
DesignerContext |
getContext() |
java.lang.Class |
getCustomEditorClass(int row) |
java.awt.Component |
getCustomizer()
Gets the customizer for the current object.
|
int |
getFilter()
Returns the current filter type
|
java.lang.Object |
getObject()
Return the current object that is represented by this model.
|
VisionDesignerImpl |
getObjectHolder() |
java.beans.FeatureDescriptor |
getPropertyDescriptor(int row)
Returns the PropertyDescriptor for the row.
|
java.beans.PropertyEditor |
getPropertyEditor(int row)
Returns a new instance of the property editor for a given class.
|
java.lang.Class |
getPropertyType(int row)
Returns the Java type info for the property at the given row.
|
int |
getRowCount()
Get row count (total number of properties shown)
|
int |
getSortOrder() |
java.lang.Object |
getValueAt(int row,
int col)
Get text value for cell of table
|
boolean |
hasCustomizer()
Returns a flag indicating if the encapsulated object has a customizer.
|
boolean |
isCellEditable(int row,
int col)
Check if given cell is editable
|
boolean |
isRowCustomEditor(int row) |
void |
reloadBean() |
void |
setFilter(int filter)
Sets the current filter of the Properties.
|
void |
setMultiObject(java.util.List beans) |
void |
setObject(java.lang.Object bean)
Set the table model to represents the properties of the object.
|
void |
setSortOrder(int sort)
Sets the current sort order on the data
|
void |
setValueAt(java.lang.Object value,
int row,
int column)
Set the value of the property at row
row for the selected bean (or beans) |
void |
sortTable(int sort)
Sorts the table according to the sort type.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
protected boolean multiObject
protected java.beans.FeatureDescriptor[] descriptors
protected java.beans.BeanDescriptor beanDescriptor
protected MultiBeanInfo info
protected java.lang.Object bean
protected java.util.List beans
protected java.util.Hashtable<java.lang.Class,java.beans.PropertyEditor> propEditors
protected static boolean editorsRegistered
protected static DescriptorComparator naturalComparator
protected static java.util.Comparator<java.beans.FeatureDescriptor> alphabeticalComparator
protected static java.util.Comparator<java.beans.FeatureDescriptor> typeComparator
protected static final int NUM_COLUMNS
public static final int COL_NAME
public static final int COL_VALUE
public static final int VIEW_ALL
public static final int VIEW_STANDARD
public static final int VIEW_EXPERT
public static final int VIEW_READ_ONLY
public static final int VIEW_BOUND
public static final int VIEW_CONSTRAINED
public static final int VIEW_HIDDEN
public static final int VIEW_PREFERRED
protected int currentFilter
public static final int SORT_NATURAL
public static final int SORT_ALPHABETICAL
public static final int SORT_TYPE
protected int sortOrder
public PropertyTableModel(VisionDesignerImpl fpmi)
public VisionDesignerImpl getObjectHolder()
public DesignerContext getContext()
public void setFilter(int filter)
filter
- one of VIEW_ constantspublic int getFilter()
public void setSortOrder(int sort)
sort
- one of the SORT_ constantspublic int getSortOrder()
public void setObject(java.lang.Object bean)
public void setMultiObject(java.util.List beans)
public void reloadBean()
public java.lang.Object getObject()
public int getRowCount()
public int getColumnCount()
public boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- table rowcol
- table columnpublic java.lang.Object getValueAt(int row, int col)
row
- table rowcol
- table columnpublic void setValueAt(java.lang.Object value, int row, int column)
row
for the selected bean (or beans)setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
public java.lang.Class getPropertyType(int row)
public java.beans.FeatureDescriptor getPropertyDescriptor(int row)
public boolean isRowCustomEditor(int row)
public java.lang.Class getCustomEditorClass(int row)
public java.beans.PropertyEditor getPropertyEditor(int row)
public boolean hasCustomizer()
public java.awt.Component getCustomizer()
public void sortTable(int sort)
public void filterTable(int view)
view
- The properties to display.