|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo2.app.Component
nextapp.echo2.app.Table
net.sf.echobinding.table.BoundTable<T>
T - The type of the obejcts in the list.public class BoundTable<T>
A data bound table. Displays a list of items in form of a table. The columns
of the table are defined by the property adapters of the given
BindingContext.
A BoundTable uses by default the
DefaultDataBoundTableCellRenderer for rendering its cells.
| Field Summary | |
|---|---|
protected BindingContext |
_ctx
The binding context. |
protected java.util.List<T> |
_list
The list of items. |
| Fields inherited from class nextapp.echo2.app.Table |
|---|
ACTION_LISTENERS_CHANGED_PROPERTY, AUTO_CREATE_COLUMNS_FROM_MODEL_CHANGED_PROPERTY, COLUMN_MODEL_CHANGED_PROPERTY, DEFAULT_HEADER_RENDERER_CHANGED_PROPERTY, DEFAULT_RENDERER_CHANGED_PROPERTY, DEFAULT_TABLE_CELL_RENDERER, HEADER_ROW, HEADER_VISIBLE_CHANGED_PROPERTY, INPUT_ACTION, MODEL_CHANGED_PROPERTY, PROPERTY_ACTION_COMMAND, PROPERTY_BORDER, PROPERTY_INSETS, PROPERTY_ROLLOVER_BACKGROUND, PROPERTY_ROLLOVER_BACKGROUND_IMAGE, PROPERTY_ROLLOVER_ENABLED, PROPERTY_ROLLOVER_FONT, PROPERTY_ROLLOVER_FOREGROUND, PROPERTY_SELECTION_BACKGROUND, PROPERTY_SELECTION_BACKGROUND_IMAGE, PROPERTY_SELECTION_ENABLED, PROPERTY_SELECTION_FONT, PROPERTY_SELECTION_FOREGROUND, PROPERTY_WIDTH, SELECTION_CHANGED_PROPERTY, SELECTION_MODEL_CHANGED_PROPERTY |
| Fields inherited from class nextapp.echo2.app.Component |
|---|
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY |
| Constructor Summary | |
|---|---|
BoundTable(java.util.List<T> list,
BindingContext ctx)
Creates a data bound table using a list. |
|
BoundTable(java.lang.String listAdapterId,
BindingContext ctx)
Creates a data bound table using a list adapter. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(nextapp.echo2.app.event.ActionEvent event)
|
BoundTable<T> |
addColumn(java.lang.Integer columnIndex,
java.lang.String adapterId)
Adds a column at the specified position to the table. |
BoundTable<T> |
addColumn(java.lang.String adapterId)
Adds a column for the specified adpater to the table. |
protected java.lang.Object[][] |
createTableData()
Creates the table data. |
protected java.lang.Object[] |
createTableHeaderData()
Creates the table header data. |
protected nextapp.echo2.app.table.TableModel |
createTableModel()
Creates the table model. |
nextapp.echo2.app.event.ActionListener |
getActionListener()
Returns the action listener. |
java.lang.String |
getAdapterId(int col)
Returns the adapter id for the specified column. |
BindingContext |
getBindingContext(int rowIndex)
Returns the binding context for the specified row. |
java.util.List<PropertyAdapter> |
getColumnAdapters()
Returns the column adapters. |
BindingContext |
getContext()
|
DetailsHandler |
getDetailHandler()
|
nextapp.echo2.app.Color |
getHeaderBackground()
Returns the header background color. |
protected T |
getItem(int row)
Returns the item for the specified row index. |
java.util.List<T> |
getList()
Returns the list. |
protected nextapp.echo2.app.table.TableCellRenderer |
getTableCellRenderer()
Gets the table cell renderer. |
protected BoundTableHeaderRenderer |
getTableHeaderRenderer()
Gets the table header renderer. |
void |
init()
|
protected void |
initialize()
Initializes the table. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
|
boolean |
removeColumn(java.lang.String adapterId)
Removes a column from the table. |
void |
setActionListener(nextapp.echo2.app.event.ActionListener actionListener)
Sets the action listener. |
void |
setColumnAdapters(java.util.List<PropertyAdapter> columnAdapters)
Sets the column adapters. |
void |
setContext(BindingContext ctx)
|
void |
setDetailHandler(DetailsHandler detailHandler)
|
void |
setHeaderBackground(nextapp.echo2.app.Color headerBackground)
Sets the header background color. |
void |
setList(java.util.List<T> list)
Sets the list. |
protected void |
showDetails(int columnIndex,
int rowIndex)
|
| Methods inherited from class nextapp.echo2.app.Table |
|---|
addActionListener, createDefaultColumnsFromModel, doRender, getActionCommand, getBorder, getCellComponent, getColumnModel, getDefaultHeaderRenderer, getDefaultRenderer, getInsets, getModel, getRolloverBackground, getRolloverBackgroundImage, getRolloverFont, getRolloverForeground, getSelectionBackground, getSelectionBackgroundImage, getSelectionFont, getSelectionForeground, getSelectionModel, getWidth, hasActionListeners, invalidate, isAutoCreateColumnsFromModel, isHeaderVisible, isRolloverEnabled, isSelectionEnabled, processInput, removeActionListener, setActionCommand, setAutoCreateColumnsFromModel, setBorder, setColumnModel, setDefaultHeaderRenderer, setDefaultRenderer, setHeaderVisible, setInsets, setModel, setRolloverBackground, setRolloverBackgroundImage, setRolloverEnabled, setRolloverFont, setRolloverForeground, setSelectionBackground, setSelectionBackgroundImage, setSelectionEnabled, setSelectionFont, setSelectionForeground, setSelectionModel, setWidth, validate |
| Methods inherited from class nextapp.echo2.app.Component |
|---|
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, verifyInput, visibleIndexOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<T> _list
protected BindingContext _ctx
| Constructor Detail |
|---|
public BoundTable(java.util.List<T> list,
BindingContext ctx)
list - the list of itemsctx - the binding context
public BoundTable(java.lang.String listAdapterId,
BindingContext ctx)
listAdapterId - the list adapter idctx - the binding context| Method Detail |
|---|
public void init()
init in class nextapp.echo2.app.Componentpublic BoundTable<T> addColumn(java.lang.String adapterId)
adapterId - the adapter id
public boolean removeColumn(java.lang.String adapterId)
adapterId - The adapter id of the column to be removed
public BoundTable<T> addColumn(java.lang.Integer columnIndex,
java.lang.String adapterId)
adapterId - the adapter idcolumnIndex - the column index
protected void initialize()
protected BoundTableHeaderRenderer getTableHeaderRenderer()
protected nextapp.echo2.app.table.TableCellRenderer getTableCellRenderer()
protected nextapp.echo2.app.table.TableModel createTableModel()
protected java.lang.Object[][] createTableData()
protected java.lang.Object[] createTableHeaderData()
public java.lang.String getAdapterId(int col)
col - the col
public BindingContext getBindingContext(int rowIndex)
rowIndex - the index of the row
public void actionPerformed(nextapp.echo2.app.event.ActionEvent event)
actionPerformed in interface nextapp.echo2.app.event.ActionListenerpublic nextapp.echo2.app.event.ActionListener getActionListener()
public void setActionListener(nextapp.echo2.app.event.ActionListener actionListener)
actionListener - the action listenerprotected T getItem(int row)
row - - the row index
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerpublic java.util.List<PropertyAdapter> getColumnAdapters()
public void setColumnAdapters(java.util.List<PropertyAdapter> columnAdapters)
columnAdapters - The column adapters to set.public java.util.List<T> getList()
public void setList(java.util.List<T> list)
list - The list to set.public nextapp.echo2.app.Color getHeaderBackground()
public void setHeaderBackground(nextapp.echo2.app.Color headerBackground)
headerBackground - the header background
protected void showDetails(int columnIndex,
int rowIndex)
columnIndex - rowIndex - public DetailsHandler getDetailHandler()
public void setDetailHandler(DetailsHandler detailHandler)
detailHandler - The detailHandler to set.public BindingContext getContext()
public void setContext(BindingContext ctx)
ctx - The ctx to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||