net.sf.echobinding.table
Class ListEditor<T>

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.app.Table
          extended by net.sf.echobinding.table.BoundTable<T>
              extended by net.sf.echobinding.table.ListEditor<T>
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, EditableTable<T>, EditableTableRendererSupport, nextapp.echo2.app.event.ActionListener, nextapp.echo2.app.RenderIdSupport

public abstract class ListEditor<T>
extends BoundTable<T>
implements EditableTable<T>, EditableTableRendererSupport, nextapp.echo2.app.event.ActionListener

A editable bound table.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.echobinding.table.BoundTable
_ctx, _list
 
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
ListEditor(java.lang.String listAdapterId, BindingContext ctx)
           
 
Method Summary
 void addRow()
          Adds a new row to the table.
 void copyRow(BindingContext context)
          Creates a copy of the selected row and adds it to the table.
 nextapp.echo2.app.Component createButtonPanel(int rowIndex)
          Creates a button panel that will be added to each row in the table.
 nextapp.echo2.app.Component createHeaderButtonPanel()
          Creates the button panel that will be addded to the table header.
protected  nextapp.echo2.app.table.TableModel createTableModel()
          Creates the table model.
 void deleteRow(BindingContext context)
          Removes the selected row from the table.
 void editRow(BindingContext context)
          Shows the selected row in the edit form for editing.
 PersistenceManager<T> getPersistenceManager()
          Returns the persistence manager.
protected  nextapp.echo2.app.table.TableCellRenderer getTableCellRenderer()
          Gets the table cell renderer.
protected  BoundTableHeaderRenderer getTableHeaderRenderer()
          Gets the table header renderer.
 boolean isPersistent(int row)
          Decides wether a row is persistent or not.
 void saveRow(BindingContext context)
          Synchronizes the widgets in the form with the underlying bean.
 void setPersistenceManager(PersistenceManager<T> persistenceManager)
          Sets the persistence manager.
abstract  void showForm(BindingContext context)
          Displays the form for editing a selected row.
 
Methods inherited from class net.sf.echobinding.table.BoundTable
actionPerformed, addColumn, addColumn, createTableData, createTableHeaderData, getActionListener, getAdapterId, getBindingContext, getColumnAdapters, getContext, getDetailHandler, getHeaderBackground, getItem, getList, init, initialize, propertyChange, removeColumn, setActionListener, setColumnAdapters, setContext, setDetailHandler, setHeaderBackground, setList, showDetails
 
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
 
Methods inherited from interface nextapp.echo2.app.event.ActionListener
actionPerformed
 

Constructor Detail

ListEditor

public ListEditor(java.lang.String listAdapterId,
                  BindingContext ctx)
Parameters:
listAdapterId -
ctx -
Method Detail

createTableModel

protected nextapp.echo2.app.table.TableModel createTableModel()
Description copied from class: BoundTable
Creates the table model.

Overrides:
createTableModel in class BoundTable<T>
Returns:
the table model

getTableCellRenderer

protected nextapp.echo2.app.table.TableCellRenderer getTableCellRenderer()
Description copied from class: BoundTable
Gets the table cell renderer.

Overrides:
getTableCellRenderer in class BoundTable<T>
Returns:
the table cell renderer

getTableHeaderRenderer

protected BoundTableHeaderRenderer getTableHeaderRenderer()
Description copied from class: BoundTable
Gets the table header renderer.

Overrides:
getTableHeaderRenderer in class BoundTable<T>
Returns:
the table header renderer

createHeaderButtonPanel

public nextapp.echo2.app.Component createHeaderButtonPanel()
Description copied from interface: EditableTableRendererSupport
Creates the button panel that will be addded to the table header. The button panel usually contains one button for adding a new row.

Specified by:
createHeaderButtonPanel in interface EditableTableRendererSupport
Returns:

createButtonPanel

public nextapp.echo2.app.Component createButtonPanel(int rowIndex)
Description copied from interface: EditableTableRendererSupport
Creates a button panel that will be added to each row in the table. The button panel contains buttons for removal, editing and copying of a row.

Specified by:
createButtonPanel in interface EditableTableRendererSupport
Returns:

editRow

public void editRow(BindingContext context)
Description copied from interface: EditableTable
Shows the selected row in the edit form for editing.

Specified by:
editRow in interface EditableTable<T>

showForm

public abstract void showForm(BindingContext context)
Displays the form for editing a selected row.

Parameters:
context -

isPersistent

public boolean isPersistent(int row)
Description copied from interface: EditableTable
Decides wether a row is persistent or not. Not persitent rows will be highlightet in the table.

Specified by:
isPersistent in interface EditableTable<T>
Returns:

addRow

public void addRow()
Description copied from interface: EditableTable
Adds a new row to the table.

Specified by:
addRow in interface EditableTable<T>

deleteRow

public void deleteRow(BindingContext context)
Description copied from interface: EditableTable
Removes the selected row from the table.

Specified by:
deleteRow in interface EditableTable<T>

copyRow

public void copyRow(BindingContext context)
Description copied from interface: EditableTable
Creates a copy of the selected row and adds it to the table.

Specified by:
copyRow in interface EditableTable<T>

saveRow

public void saveRow(BindingContext context)
Description copied from interface: EditableTable
Synchronizes the widgets in the form with the underlying bean. Will send saveObject(bean) to the persistence manager for making the changes persistent.

Specified by:
saveRow in interface EditableTable<T>

getPersistenceManager

public PersistenceManager<T> getPersistenceManager()
Returns the persistence manager. If no persistence manager is set, the default persistence manager will be used.

Returns:
Returns the persistence manager.

setPersistenceManager

public void setPersistenceManager(PersistenceManager<T> persistenceManager)
Sets the persistence manager.

Parameters:
persistenceManager - The persistence manager to set.


Copyright © 2007. All Rights Reserved.