public class PropertySheetTableModel extends AbstractTableModel implements PropertyChangeListener, PropertySheet, ObjectTableModel
| Modifier and Type | Class and Description |
|---|---|
class |
PropertySheetTableModel.Item |
static class |
PropertySheetTableModel.NaturalOrderStringComparator |
static class |
PropertySheetTableModel.PropertyComparator
The default comparator for Properties.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
NAME_COLUMN |
static int |
NUM_COLUMNS |
static int |
VALUE_COLUMN |
listenerListVIEW_AS_CATEGORIES, VIEW_AS_FLAT_LIST| Constructor and Description |
|---|
PropertySheetTableModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(int index,
Property property) |
void |
addProperty(Property property) |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a
PropertyChangeListener to the current model. |
Class |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
int |
getMode()
Get the current mode, either
PropertySheet.VIEW_AS_CATEGORIES or
PropertySheet.VIEW_AS_FLAT_LIST. |
Object |
getObject(int rowIndex) |
Property[] |
getProperties() |
protected List |
getPropertyCategories(List localProperties) |
int |
getPropertyCount() |
PropertySheetTableModel.Item |
getPropertySheetElement(int rowIndex)
Get the current property sheet element, of type
PropertySheetTableModel.Item, at the
specified row. |
int |
getRowCount() |
Map |
getToggleStates() |
Object |
getValueAt(int rowIndex,
int columnIndex)
Retrieve the value at the specified row and column location.
|
boolean |
isRestoreToggleStates()
Get whether this model is restoring toggle states
|
boolean |
isSortingCategories()
Get whether this model is currently sorting categories.
|
boolean |
isSortingProperties()
Get whether this model is currently sorting properties.
|
void |
propertyChange(PropertyChangeEvent evt) |
Iterator |
propertyIterator() |
void |
removeProperty(Property property) |
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
setCategorySortingComparator(Comparator comp)
Set the comparator used for sorting categories.
|
void |
setMode(int mode)
Set the current mode, either
PropertySheet.VIEW_AS_CATEGORIES or
PropertySheet.VIEW_AS_FLAT_LIST. |
void |
setProperties(Property[] newProperties) |
void |
setPropertySortingComparator(Comparator comp)
Set the comparator used for sorting properties.
|
void |
setRestoreToggleStates(boolean value)
Set whether or not this model will restore the toggle states when new
properties are applied.
|
void |
setSortingCategories(boolean value)
Set whether this model is currently sorting categories.
|
void |
setSortingProperties(boolean value)
Set whether this model is currently sorting properties.
|
void |
setToggleStates(Map toggleStates)
Sets the toggle states for the category views.
|
void |
setValueAt(Object value,
int rowIndex,
int columnIndex)
Sets the value at the specified row and column.
|
protected List |
sortCategories(List localCategories) |
protected List |
sortProperties(List localProperties) |
protected void |
visibilityChanged(boolean restoreOldStates) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTableModelListener, getColumnName, isCellEditable, removeTableModelListenerpublic static final int NAME_COLUMN
public static final int VALUE_COLUMN
public static final int NUM_COLUMNS
public void setProperties(Property[] newProperties)
setProperties in interface PropertySheetpublic Property[] getProperties()
getProperties in interface PropertySheetpublic void addProperty(Property property)
addProperty in interface PropertySheetpublic void addProperty(int index,
Property property)
addProperty in interface PropertySheetpublic void removeProperty(Property property)
removeProperty in interface PropertySheetpublic int getPropertyCount()
getPropertyCount in interface PropertySheetpublic Iterator propertyIterator()
propertyIterator in interface PropertySheetpublic void setMode(int mode)
PropertySheet.VIEW_AS_CATEGORIES or
PropertySheet.VIEW_AS_FLAT_LIST.mode - public int getMode()
PropertySheet.VIEW_AS_CATEGORIES or
PropertySheet.VIEW_AS_FLAT_LIST.public Class getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic int getRowCount()
getRowCount in interface TableModelpublic Object getObject(int rowIndex)
getObject in interface ObjectTableModelpublic PropertySheetTableModel.Item getPropertySheetElement(int rowIndex)
PropertySheetTableModel.Item, at the
specified row.rowIndex - public boolean isSortingCategories()
public void setSortingCategories(boolean value)
value - public boolean isSortingProperties()
public void setSortingProperties(boolean value)
value - public void setCategorySortingComparator(Comparator comp)
comp - public void setPropertySortingComparator(Comparator comp)
comp - public void setRestoreToggleStates(boolean value)
value - public boolean isRestoreToggleStates()
public Map getToggleStates()
public void setToggleStates(Map toggleStates)
toggleStates - the toggle states as returned by getToggleStatespublic Object getValueAt(int rowIndex, int columnIndex)
NAME_COLUMN, an
PropertySheetTableModel.Item object will be returned. If the row is a property and the
column is VALUE_COLUMN, the value of the property will be
returned.getValueAt in interface TableModelrowIndex - columnIndex - TableModel.getValueAt(int, int)public void setValueAt(Object value, int rowIndex, int columnIndex)
VALUE_COLUMN.setValueAt in interface TableModelsetValueAt in class AbstractTableModelvalue - rowIndex - columnIndex - TableModel.setValueAt(java.lang.Object, int, int)public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the current model.listener - public void removePropertyChangeListener(PropertyChangeListener listener)
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerprotected void visibilityChanged(boolean restoreOldStates)
Copyright © 2015. All rights reserved.