|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.dataselectors.propertyeditor.EntityAttributeValueTableModelAdapter
public class EntityAttributeValueTableModelAdapter
The EntityAttributeValueTableModelAdapter allows objects that implement com.sas.entities.RemoteEntityInterface
to be used as the
model for viewers whose models are subclasses of javax.swing.table.AbstractTableModel
(javax.swing.JTable
,
com.sas.servlet.tbeans.table.html.TableView
,com.sas.swing.visuals.tableview
).
The Entity must be set as the model for the adapter,
which can then used as the model for the viewer. The adapter can be editable so that the underlying
entity can be modified and column names can be set so that the displayed columns can be customized.
Field Summary | |
---|---|
protected java.lang.String[] |
columnNames
Column names for table model |
protected java.util.Locale |
locale
Locale to be used for retrieving attribute labels |
protected RemoteEntityInterface |
model
Model for the Map |
protected EntityAttributeValueModelInterface |
modelInterface
|
protected java.util.Map |
properties
Internal storage of properties from entity |
static java.lang.String |
RB_KEY
|
protected javax.swing.event.SwingPropertyChangeSupport |
spcs
Used to support property changes in the webAF customizer |
protected boolean |
tableEditable
Whether the table model is editable |
Constructor Summary | |
---|---|
EntityAttributeValueTableModelAdapter(EntityAttributeValueModelInterface modelInterface)
Constructor that intializes the adapter |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a propertyChangeListener |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex. |
java.util.Locale |
getLocale()
Returns the locale. |
java.lang.Object |
getPropertyAt(int position)
Returns the number of columns in the model. |
int |
getRowCount()
Returns the number of rows in the model |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at columnIndex and rowIndex. |
protected void |
initialize()
Intializes the adapter |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable and the table is editable. |
boolean |
isRowUpdateAllowed()
Indicates whether rows can be updated. |
boolean |
isTableEditable()
Determine if the table is editable. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a propertyChangeListener |
void |
setColumnName(java.lang.String columnName,
int columnIndex)
Sets the name of the column at columnIndex to columnName. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets the value in the cell at columnIndex and rowIndex to aValue. |
Field Detail |
---|
public static final java.lang.String RB_KEY
protected java.util.Map properties
protected RemoteEntityInterface model
protected java.lang.String[] columnNames
protected boolean tableEditable
protected javax.swing.event.SwingPropertyChangeSupport spcs
protected java.util.Locale locale
protected EntityAttributeValueModelInterface modelInterface
Constructor Detail |
---|
public EntityAttributeValueTableModelAdapter(EntityAttributeValueModelInterface modelInterface)
Method Detail |
---|
protected void initialize()
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.Object getPropertyAt(int position)
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
rowIndex
- the row whose value is to be queriedcolumnIndex
- the column whose value is to be queriedpublic void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- the new valuerowIndex
- the row whose value is to be changedcolumnIndex
- the column whose value is to be changedpublic boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
rowIndex
- the row whose value to be queriedcolumnIndex
- the column whose value to be queried
public void setColumnName(java.lang.String columnName, int columnIndex)
columnName
- the new name of the columncolumnIndex
- the index of the columnpublic java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
columnIndex
- the index of the column
public java.util.Locale getLocale()
setLocale(java.util.Locale)
public void setLocale(java.util.Locale locale)
locale
- the locale in which to display labels.getLocale()
public boolean isTableEditable()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
listener
- listener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
listener
- listener to be removedpublic boolean isRowUpdateAllowed()
isRowUpdateAllowed
in interface UpdateRowInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |