|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel com.cosylab.gui.components.introspection.PropertiesTableModel
public class PropertiesTableModel
A table model, which help edit arbitrary set of properties. Each property
has arbitrary name, value and type. In connection with
PropertiesTable
this model is capabel of JavaBeans editing
based on introspection.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
PropertiesTableModel()
Constructor for PropertiesTableModel. |
|
PropertiesTableModel(java.lang.String[] names,
java.lang.Class[] types,
java.lang.Object[] values)
Creates new model with specified property names, types and values. |
Method Summary | |
---|---|
boolean |
containsProperty(java.lang.String name)
Check if the table contains the given property. |
int |
findColumn(java.lang.String columnName)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int columnIndex)
|
java.lang.String[] |
getPropertyNames()
Returns array with names of properties. |
java.lang.Class[] |
getPropertyTypes()
Returns array with types of properties. |
java.lang.Object[] |
getPropertyValues()
Returns array with values of properties. |
int |
getRowCount()
|
java.lang.Class |
getTypeForRow(int row)
Returns type of property in specified row. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isEditable()
Returns true if editting is allowed. |
boolean |
isTypeShowing()
Returns true if table shows additional column with property
types. |
void |
setEditable(boolean editable)
Sets the editable property of this model. |
void |
setPropertyNames(java.lang.String[] names)
Sets the parameter names |
void |
setPropertyTypes(java.lang.Class[] types)
Sets the parameter types |
void |
setPropertyValues(java.lang.Object[] values)
Sets the parameters |
void |
setTypeShowing(boolean typeShowing)
Enables table to show additional column with property types. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesTableModel()
public PropertiesTableModel(java.lang.String[] names, java.lang.Class[] types, java.lang.Object[] values)
names
- String[]types
- Class[]values
- Object[]Method Detail |
---|
public int getRowCount()
public void setPropertyNames(java.lang.String[] names)
names
- String[]public void setPropertyValues(java.lang.Object[] values)
values
- Object[]public void setPropertyTypes(java.lang.Class[] types)
types
- Class[]public int getColumnCount()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
public int findColumn(java.lang.String columnName)
findColumn
in class javax.swing.table.AbstractTableModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
public java.lang.String[] getPropertyNames()
public java.lang.Class[] getPropertyTypes()
public java.lang.Object[] getPropertyValues()
public boolean isTypeShowing()
true
if table shows additional column with property
types.
public void setTypeShowing(boolean typeShowing)
typeShowing
- The typeShowing to setpublic java.lang.Class getTypeForRow(int row)
row
-
public boolean containsProperty(java.lang.String name)
name
-
public boolean isEditable()
public void setEditable(boolean editable)
editable
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |