facets.core.app
Class TableView

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.StatefulCore
          extended by facets.core.superficial.app.SelectionView
              extended by facets.core.app.TableView
All Implemented Interfaces:
SView, Stateful, Titled, java.io.Serializable

public abstract class TableView
extends SelectionView

SelectionView that generates tabular viewer data.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface facets.core.superficial.app.SView
NO_VIEW
 
Constructor Summary
TableView(java.lang.String title)
           
 
Method Summary
 boolean allowMultipleSelection()
          Implements interface method.
 boolean allowSelectOnEdit()
           
 java.text.Format getColumnFormat(int col)
           
 java.lang.String getColumnTitle(int col)
           
protected  Stateful[] getRowSources(PathSelection table)
          Return data sources for use by newViewerSelection(SViewer, SSelection).
 boolean isColumnEditable(int col)
           
protected abstract  ValueProxy newRowProxy(Stateful stateful)
          Create a ValueProxy that defines with ValueProxy.valueCount() the row length supplies with ValueProxy.get(int) the values for each column
protected  PathSelection newTableSelection(PathSelection viewable)
          Return a local selection for use by newViewerSelection(SViewer, SSelection).
 SSelection newViewerSelection(SViewer viewer, SSelection viewable)
          Re-implementation that obtains a local PathSelection by passing viewable to newTableSelection(PathSelection) obtains an array of data sources from getRowSources(PathSelection) creates ValueProxy rows by calling newRowProxy(Stateful) for each source returns a PathSelection of ArrayPaths created from the rows and the local selection
 
Methods inherited from class facets.core.superficial.app.SelectionView
isLive
 
Methods inherited from class facets.util.StatefulCore
copyState, setState, setTitle, stateEquals, stateStamp, title, toString, updateStateStamp
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface facets.util.Titled
title
 

Constructor Detail

TableView

public TableView(java.lang.String title)
Method Detail

newViewerSelection

public final SSelection newViewerSelection(SViewer viewer,
                                           SSelection viewable)
Re-implementation that
  1. obtains a local PathSelection by passing viewable to newTableSelection(PathSelection)
  2. obtains an array of data sources from getRowSources(PathSelection)
  3. creates ValueProxy rows by calling newRowProxy(Stateful) for each source
  4. returns a PathSelection of ArrayPaths created from the rows and the local selection

Overrides:
newViewerSelection in class SelectionView
Parameters:
viewer - controlled by this view
viewable - the current SelectingFrame.selection()

newTableSelection

protected PathSelection newTableSelection(PathSelection viewable)
Return a local selection for use by newViewerSelection(SViewer, SSelection).

Default implementation returns the PathSelection passed.

Parameters:
viewable - the SSelection passed to the calling method, cast to a PathSelection

getRowSources

protected Stateful[] getRowSources(PathSelection table)
Return data sources for use by newViewerSelection(SViewer, SSelection).

Default implementation casts the selection content to an array.

Parameters:
table - the SSelection passed to the calling method

newRowProxy

protected abstract ValueProxy newRowProxy(Stateful stateful)
Create a ValueProxy that

Parameters:
stateful - will be the ValueProxy.source

allowMultipleSelection

public boolean allowMultipleSelection()
Description copied from class: SelectionView
Implements interface method.

Default returns false.

Specified by:
allowMultipleSelection in interface SView
Overrides:
allowMultipleSelection in class SelectionView

isColumnEditable

public boolean isColumnEditable(int col)

getColumnTitle

public java.lang.String getColumnTitle(int col)

getColumnFormat

public java.text.Format getColumnFormat(int col)

allowSelectOnEdit

public boolean allowSelectOnEdit()