net.sf.doolin.gui.field.table
Class FieldTable<V,E>

java.lang.Object
  extended by net.sf.doolin.bus.bean.Bean
      extended by net.sf.doolin.gui.field.AbstractFieldDescriptor<V>
          extended by net.sf.doolin.gui.field.table.FieldTable<V,E>
Type Parameters:
V - Type of object for the view
E - Type of item in the table
All Implemented Interfaces:
Serializable, IBean, FieldDescriptor<V>

public class FieldTable<V,E>
extends AbstractFieldDescriptor<V>

Table field descriptor.

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
FieldTable()
           
 
Method Summary
 Field<V> createField(GUIView<V> view)
          Creates a field.
 ColumnGenerator<V,E> getColumnGenerator()
          Gets the column generator.
 CustomHeaderFactory<V,E> getCustomHeaderFactory()
           
 GUIAction getDoubleClickAction()
          Gets the action to execute when a row is double-clicked.
 GUITableHeaderFactory<V,E> getHeaderFactory()
           
 ITableEventListFactory<E> getItemListFactory()
           
 DataFactory<ca.odell.glazedlists.matchers.MatcherEditor<E>> getMatcherEditorFactory()
          Returns the factory for the matcher editor used to filter the items in the table.
 TableSelectionMode getSelectionMode()
          Gets the selection mode for the table rows
 String getSelectionPropertyPath()
          Gets the path to the property that contains the selection of the table.
 List<GUIAction> getTableActions()
          Gets the list of actions to register together with the table for the availability of their shortcuts.
 ActionPathList getTableMenu()
          Gets the definition for the contextual menu of the table
 TableStyle getTableStyle()
          Gets the style.
 ActionPathList getTableToolBar()
          Gets the tool bar definition for the table-level tool bar.
 ActionPathList getViewToolBar()
          Gets the tool bar definition for the view-level tool bar.
 ToolBar getWindowToolBar()
          Gets the tool bar definition for the window-level tool bar.
 boolean isItemChanges()
          Checks if the table must listen to changes in the row items.
 boolean isShowColumns()
          Checks if the column headers are displayed.
 void setColumnGenerator(ColumnGenerator<V,E> columnGenerator)
          Sets the generator for the columns of the tabler.
 void setCustomHeaderFactory(CustomHeaderFactory<V,E> customHeaderFactory)
           
 void setDoubleClickAction(GUIAction doubleClickAction)
          Sets the action to execute when a row is double-clicked.
 void setHeaderFactory(GUITableHeaderFactory<V,E> headerFactory)
           
 void setItemChanges(boolean itemChanges)
          Sets if the table must listen to changes in the row items.
 void setItemListFactory(ITableEventListFactory<E> itemListFactory)
           
 void setMatcherEditorFactory(DataFactory<ca.odell.glazedlists.matchers.MatcherEditor<E>> matcherEditorFactory)
          Sets the factory for the matcher editor used to filter the items in the table.
 void setSelectionMode(TableSelectionMode selectionMode)
          Sets the selection mode for the table rows
 void setSelectionPropertyPath(String selectionPropertyPath)
          Sets the path to the property that contains the selection of the table.
 void setShowColumns(boolean showColumns)
          Sets if the column headers are displayed.
 void setTableActions(List<GUIAction> tableActions)
          Sets the list of actions to register together with the table for the availability of their shortcuts.
 void setTableMenu(ActionPathList tableMenu)
          Sets the definition for the contextual menu of the table
 void setTableStyle(TableStyle style)
          Sets the default style to apply on the cells.
 void setTableToolBar(ActionPathList tableToolBar)
          Sets the tool bar definition for the table-level tool bar.
 void setViewToolBar(ActionPathList viewToolBar)
          Sets the tool bar definition for the view-level tool bar.
 void setWindowToolBar(ToolBar windowToolBar)
          Sets the tool bar definition for the window-level tool bar.
 
Methods inherited from class net.sf.doolin.gui.field.AbstractFieldDescriptor
getActionFactory, getConstraint, getDisplayStateHandler, getIconService, getName, getStyle, getTransferHandler, onInit, onShow, setActionFactory, setConstraint, setDisplayState, setDisplayStateHandler, setIconService, setName, setStyle, setTransferHandler
 
Methods inherited from class net.sf.doolin.bus.bean.Bean
getBeanNotificationSupport, getParentBean, notify, setParentBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldTable

public FieldTable()
Method Detail

createField

public Field<V> createField(GUIView<V> view)
Creates a field..

Parameters:
view - the view
Returns:
the field

getColumnGenerator

public ColumnGenerator<V,E> getColumnGenerator()
Gets the column generator.

Returns:
the column generator

getCustomHeaderFactory

public CustomHeaderFactory<V,E> getCustomHeaderFactory()
Returns:
the customHeaderFactory

getDoubleClickAction

public GUIAction getDoubleClickAction()
Gets the action to execute when a row is double-clicked.

Returns:
Action or null

getHeaderFactory

public GUITableHeaderFactory<V,E> getHeaderFactory()
Returns:
the headerFactory

getItemListFactory

public ITableEventListFactory<E> getItemListFactory()

getMatcherEditorFactory

public DataFactory<ca.odell.glazedlists.matchers.MatcherEditor<E>> getMatcherEditorFactory()
Returns the factory for the matcher editor used to filter the items in the table.

Returns:
Factory for the matcher editor

getSelectionMode

public TableSelectionMode getSelectionMode()
Gets the selection mode for the table rows

Returns:
Selection mode

getSelectionPropertyPath

public String getSelectionPropertyPath()
Gets the path to the property that contains the selection of the table. If multiple selections are allowed, this property must hold a List, else if must hold a <E> type.

Returns:
Path to the property

getTableActions

public List<GUIAction> getTableActions()
Gets the list of actions to register together with the table for the availability of their shortcuts.

Returns:
List of actions

getTableMenu

public ActionPathList getTableMenu()
Gets the definition for the contextual menu of the table

Returns:
Menu definition

getTableStyle

public TableStyle getTableStyle()
Gets the style.

Returns:
the style

getTableToolBar

public ActionPathList getTableToolBar()
Gets the tool bar definition for the table-level tool bar.

Returns:
Tool bar definition

getViewToolBar

public ActionPathList getViewToolBar()
Gets the tool bar definition for the view-level tool bar.

Returns:
Tool bar definition

getWindowToolBar

public ToolBar getWindowToolBar()
Gets the tool bar definition for the window-level tool bar.

Returns:
Tool bar definition

isItemChanges

public boolean isItemChanges()
Checks if the table must listen to changes in the row items.

Returns:
true if the table must listen to the changes
See Also:
setItemChanges(boolean)

isShowColumns

public boolean isShowColumns()
Checks if the column headers are displayed.

Returns:
true if the column headers are displayed.

setColumnGenerator

public void setColumnGenerator(ColumnGenerator<V,E> columnGenerator)
Sets the generator for the columns of the tabler.

Parameters:
columnGenerator - the new column generator

setCustomHeaderFactory

public void setCustomHeaderFactory(CustomHeaderFactory<V,E> customHeaderFactory)
Parameters:
customHeaderFactory - the customHeaderFactory to set

setDoubleClickAction

public void setDoubleClickAction(GUIAction doubleClickAction)
Sets the action to execute when a row is double-clicked.

Parameters:
doubleClickAction - Action or null

setHeaderFactory

public void setHeaderFactory(GUITableHeaderFactory<V,E> headerFactory)
Parameters:
headerFactory - the headerFactory to set

setItemChanges

public void setItemChanges(boolean itemChanges)
Sets if the table must listen to changes in the row items. If set to true (it is set to false by default), each time a bean is updated that belongs to the table rows, the corresponding row will be updated.

Parameters:
itemChanges - true if the table must listen to the changes

setItemListFactory

public void setItemListFactory(ITableEventListFactory<E> itemListFactory)

setMatcherEditorFactory

public void setMatcherEditorFactory(DataFactory<ca.odell.glazedlists.matchers.MatcherEditor<E>> matcherEditorFactory)
Sets the factory for the matcher editor used to filter the items in the table.

Parameters:
matcherEditorFactory - Factory for the matcher editor

setSelectionMode

public void setSelectionMode(TableSelectionMode selectionMode)
Sets the selection mode for the table rows

Parameters:
selectionMode - Selection mode

setSelectionPropertyPath

public void setSelectionPropertyPath(String selectionPropertyPath)
Sets the path to the property that contains the selection of the table. If multiple selections are allowed, this property must hold a List, else if must hold a <E> type.

Parameters:
selectionPropertyPath - Path to the property or null if no selection is to be saved

setShowColumns

public void setShowColumns(boolean showColumns)
Sets if the column headers are displayed.

Parameters:
showColumns - true if the column headers are displayed.

setTableActions

public void setTableActions(List<GUIAction> tableActions)
Sets the list of actions to register together with the table for the availability of their shortcuts.

Parameters:
tableActions - List of actions

setTableMenu

public void setTableMenu(ActionPathList tableMenu)
Sets the definition for the contextual menu of the table

Parameters:
tableMenu - Menu definition

setTableStyle

public void setTableStyle(TableStyle style)
Sets the default style to apply on the cells.

Parameters:
style - the new style

setTableToolBar

public void setTableToolBar(ActionPathList tableToolBar)
Sets the tool bar definition for the table-level tool bar.

Parameters:
tableToolBar - Tool bar definition

setViewToolBar

public void setViewToolBar(ActionPathList viewToolBar)
Sets the tool bar definition for the view-level tool bar.

Parameters:
viewToolBar - Tool bar definition

setWindowToolBar

public void setWindowToolBar(ToolBar windowToolBar)
Sets the tool bar definition for the window-level tool bar.

Parameters:
windowToolBar - Tool bar definition


Copyright © 2011. All Rights Reserved.