|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
com.l2fprod.common.propertysheet.PropertySheetTableModel
public class PropertySheetTableModel
PropertySheetTableModel.
Nested Class Summary | |
---|---|
class |
PropertySheetTableModel.Item
|
static class |
PropertySheetTableModel.NaturalOrderStringComparator
|
static class |
PropertySheetTableModel.PropertyComparator
The default comparator for Properties. |
Field Summary | |
---|---|
static int |
NAME_COLUMN
|
static int |
NUM_COLUMNS
|
static int |
VALUE_COLUMN
|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Fields inherited from interface com.l2fprod.common.propertysheet.PropertySheet |
---|
VIEW_AS_CATEGORIES, VIEW_AS_FLAT_LIST |
Constructor Summary | |
---|---|
PropertySheetTableModel()
|
Method Summary | |
---|---|
void |
addProperty(int index,
Property property)
|
void |
addProperty(Property property)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the current model. |
java.lang.Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
int |
getMode()
Get the current mode, either PropertySheet.VIEW_AS_CATEGORIES
or PropertySheet.VIEW_AS_FLAT_LIST . |
java.lang.Object |
getObject(int rowIndex)
|
Property[] |
getProperties()
|
protected java.util.List |
getPropertyCategories(java.util.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()
|
java.util.Map |
getToggleStates()
|
java.lang.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(java.beans.PropertyChangeEvent evt)
|
java.util.Iterator |
propertyIterator()
|
void |
removeProperty(Property property)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setCategorySortingComparator(java.util.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(java.util.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(java.util.Map toggleStates)
Sets the toggle states for the category views. |
void |
setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
Sets the value at the specified row and column. |
protected java.util.List |
sortCategories(java.util.List localCategories)
|
protected java.util.List |
sortProperties(java.util.List localProperties)
|
protected void |
visibilityChanged(boolean restoreOldStates)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnName, isCellEditable, removeTableModelListener |
Field Detail |
---|
public static final int NAME_COLUMN
public static final int VALUE_COLUMN
public static final int NUM_COLUMNS
Constructor Detail |
---|
public PropertySheetTableModel()
Method Detail |
---|
public void setProperties(Property[] newProperties)
setProperties
in interface PropertySheet
public Property[] getProperties()
getProperties
in interface PropertySheet
public void addProperty(Property property)
addProperty
in interface PropertySheet
public void addProperty(int index, Property property)
addProperty
in interface PropertySheet
public void removeProperty(Property property)
removeProperty
in interface PropertySheet
public int getPropertyCount()
getPropertyCount
in interface PropertySheet
public java.util.Iterator propertyIterator()
propertyIterator
in interface PropertySheet
public void setMode(int mode)
PropertySheet.VIEW_AS_CATEGORIES
or PropertySheet.VIEW_AS_FLAT_LIST
.
public int getMode()
PropertySheet.VIEW_AS_CATEGORIES
or PropertySheet.VIEW_AS_FLAT_LIST
.
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.Object getObject(int rowIndex)
getObject
in interface ObjectTableModel
public PropertySheetTableModel.Item getPropertySheetElement(int rowIndex)
PropertySheetTableModel.Item
, at
the specified row.
public boolean isSortingCategories()
public void setSortingCategories(boolean value)
public boolean isSortingProperties()
public void setSortingProperties(boolean value)
public void setCategorySortingComparator(java.util.Comparator comp)
public void setPropertySortingComparator(java.util.Comparator comp)
public void setRestoreToggleStates(boolean value)
public boolean isRestoreToggleStates()
public java.util.Map getToggleStates()
public void setToggleStates(java.util.Map toggleStates)
toggleStates
- the toggle states as returned by getToggleStatespublic java.lang.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 javax.swing.table.TableModel
TableModel.getValueAt(int, int)
public void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
VALUE_COLUMN
.
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
TableModel.setValueAt(java.lang.Object, int, int)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
to the current model.
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
protected void visibilityChanged(boolean restoreOldStates)
protected java.util.List sortProperties(java.util.List localProperties)
protected java.util.List sortCategories(java.util.List localCategories)
protected java.util.List getPropertyCategories(java.util.List localProperties)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |