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

java.lang.Object
  extended by net.sf.doolin.gui.field.support.AbstractField<V>
      extended by net.sf.doolin.gui.field.table.support.GUITableField<V,E>
Type Parameters:
V - Type of object for the view
E - Type of item in the table
All Implemented Interfaces:
Field<V>, PropertyContainer

public class GUITableField<V,E>
extends AbstractField<V>

Field for a table.

Author:
Damien Coraboeuf

Constructor Summary
GUITableField(GUIView<V> view, FieldTable<V,E> fieldDescriptor)
          Constructor.
 
Method Summary
 JComponent getCoreComponent()
           
 JComponent getFieldComponent()
          Gets the component for the field.
 ca.odell.glazedlists.EventList<E> getList()
          Gets the event list which is used for the table model.
 ca.odell.glazedlists.EventList<E> getListModel()
          Returns the value model that contains the list of items.
 GUITable<V,E> getTable()
          Returns the associated table component.
 FieldTable<V,E> getTableDescriptor()
          Gets the associated table descriptor.
 
Methods inherited from class net.sf.doolin.gui.field.support.AbstractField
getActionContext, getFieldDescriptor, getProperty, getView, setActionContext, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUITableField

public GUITableField(GUIView<V> view,
                     FieldTable<V,E> fieldDescriptor)
Constructor.

Parameters:
view - Hosting view
fieldDescriptor - Table descriptor
Method Detail

getCoreComponent

public JComponent getCoreComponent()
Specified by:
getCoreComponent in interface Field<V>
Overrides:
getCoreComponent in class AbstractField<V>

getFieldComponent

public JComponent getFieldComponent()
Description copied from interface: Field
Gets the component for the field.

Returns:
Component

getList

public ca.odell.glazedlists.EventList<E> getList()
Gets the event list which is used for the table model.

This list is based on the event list that is returned from the model (see getListModel()) but is wrapped by an ObservableElementList if the itemClass property of the table descriptor is set. This allows the rows to be automatically updated if the item in the row is updated.

Returns:
Event list used by the table model

getListModel

public ca.odell.glazedlists.EventList<E> getListModel()
Returns the value model that contains the list of items.

Returns:
Value model for the list of items

getTable

public GUITable<V,E> getTable()
Returns the associated table component.

Returns:
Table component

getTableDescriptor

public FieldTable<V,E> getTableDescriptor()
Gets the associated table descriptor.

Returns:
Table descriptor


Copyright © 2011. All Rights Reserved.