org.salespointframework.desktop.formsheets
Class DataExchangeFormSheet

java.lang.Object
  extended by org.salespointframework.core.FormSheet
      extended by org.salespointframework.desktop.formsheets.DataExchangeFormSheet

public class DataExchangeFormSheet
extends FormSheet

A FormSheet that will display the contents of two data containers, a source and a destination, and will allow the user to move items between the two.

Source and destination are displayed in a tabular or list form. The data containers that are supported as source or destination are: Catalog, Stock, DataBasket. There will be drag'n drop support which allows to move items from the source into the destination table and vice-versa. If at least one of source and destination is a CountingStock there will also be support for moving multiple items. The actual moving will be implemented as sub-process of the process that displays the FormSheet. The concrete sub-process implementations are provided by MoveStrategy strategy objects.

A quite comprehensive set of create() functions is provided to allow to easily create TwoTableFormSheets by simply supplying some parameters.

Since:
v2.0 as TwoTableFormSheet
Version:
4.0 03/04/2009
Author:
Steffen Zschaler, Thomas Kissinger

Nested Class Summary
static class DataExchangeFormSheet.DataExchangeOption
          Common options for Components DataExchangeFormSheet.ListViewDataExchangeOption defines additional options for JListViews DataExchangeFormSheet.TableDataExchangeOption defines additional options for JAbstractTables
static class DataExchangeFormSheet.DataExchangeOptions
          This class defines specific options for source and destination components and the DataExchangeFormSheet.DataExchangeView There are four default options available: OPTION_LISTVIEW_LISTVIEW : source and destination are JListViews OPTION_LISTVIEW_TABLE : source is JListView, destination is JAbstractTable OPTION_TABLE_LISTVIEW : source is JAbstractTable, destination is JListView OPTION_TABLE_TABLE : source and destination are both JAbstractTables you can also set the OPTION_DEFAULT to set default options.
static class DataExchangeFormSheet.DataExchangeView
          The view defines where both components will be place on formshete
static class DataExchangeFormSheet.ListViewDataExchangeOption
          This option defines options for the JListView
static class DataExchangeFormSheet.TableDataExchangeOption
          Options for JAbstractTables
 
Nested classes/interfaces inherited from class org.salespointframework.core.FormSheet
FormSheet.FormButton
 
Field Summary
private static javax.swing.ImageIcon DOWN_ICON
          Icon with an arrow pointing downwards.
protected static boolean helpHintDisplayed
          indicates whether the help hint has already been displayed
private static javax.swing.ImageIcon LEFT_ICON
          Icon with an arrow pointing left.
private  int[] m_anDestSelection
          Reference to the currently selected index.
private  int[] m_anSrcSelection
          Reference to the currently selected index.
private  AbstractTableModel m_atmDestModel
          The TableModel of the destination table displayed.
private  AbstractTableModel m_atmSrcModel
          The TableModel of the source table displayed.
private  DataBasket m_db
          The DataBasket used.
private  javax.swing.JComponent m_destComponent
          The destination component
private  java.lang.Object m_destSource
          The source for the destination component.
private  javax.swing.ListModel m_lmDestModel
          The ListModel of the destination JListView
private  javax.swing.ListModel m_lmSrcModel
          The ListModel of the source JListView
private  MoveStrategy m_ms
          The strategy used when moving items between source and destination.
private  javax.swing.JComponent m_srcComponent
          The source component
private  java.lang.Object m_srcSource
          The source for the source component.
private  UIGate m_uigGate
          The gate at which the FormSheet is displayed.
static DataExchangeFormSheet.DataExchangeOptions OPTION_DEFAULT
          this default option is used if null is passed as view parameter
static DataExchangeFormSheet.DataExchangeOptions OPTION_LISTVIEW_LISTVIEW
          this preset option uses a JListView for source and destination component
static DataExchangeFormSheet.DataExchangeOptions OPTION_LISTVIEW_TABLE
          this preset option uses a JListView as source component and a JAbstractTable as destination component
static DataExchangeFormSheet.DataExchangeOptions OPTION_TABLE_LISTVIEW
          this peset option uses a JAbstractTable as source component and a JListView as destination component
static DataExchangeFormSheet.DataExchangeOptions OPTION_TABLE_TABLE
          this preset option uses a JAbstractTable for source and destination source
private static javax.swing.ImageIcon RIGHT_ICON
          Icon with an arrow pointing right.
private static javax.swing.ImageIcon UP_ICON
          Icon with an arrow pointing upwards.
static DataExchangeFormSheet.DataExchangeView VIEW_DEFAULT
          The default view
 
Fields inherited from class org.salespointframework.core.FormSheet
BTNID_CANCEL, BTNID_OK, BUTTONBAR_BOTTOM, BUTTONBAR_LEFT, BUTTONBAR_NONE, BUTTONBAR_RIGHT, BUTTONBAR_TOP, m_fCancelled
 
Constructor Summary
protected DataExchangeFormSheet(java.lang.String sCaption, FormSheetContentCreator fscc, UIGate uigGate, MoveStrategy ms)
          Create a new DataExchangeFormSheet.
 
Method Summary
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, Catalog cDest, DataBasket db, UIGate uigGate, CCStrategy ccsMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where source and destination are Catalogs.
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, Catalog cDest, DataBasket db, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where source and destination are Catalogs.
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, CountingStock csDest, DataBasket db, UIGate uigGate, CCSStrategy ccssMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a CountingStock.
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, CountingStock csDest, DataBasket db, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a CountingStock.
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, DataBasket dbDest, UIGate uigGate, CDBStrategy cdbsMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a DataBasket.
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, DataBasket dbDest, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a DataBasket.
static DataExchangeFormSheet create(java.lang.String sCaption, Catalog cSource, StoringStock ssDest, DataBasket db, UIGate uigGate, CSSStrategy csssMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a StoringStock.
static DataExchangeFormSheet create(java.lang.String sCaption, CountingStock csSource, CountingStock csDest, DataBasket db, UIGate uigGate, CSCSStrategy cscssMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where source and destination are CountingStocks.
static DataExchangeFormSheet create(java.lang.String sCaption, CountingStock csSource, CountingStock csDest, DataBasket db, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where source and destination are CountingStocks.
static DataExchangeFormSheet create(java.lang.String sCaption, CountingStock csSource, DataBasket dbDest, UIGate uigGate, CSDBStrategy csdbsMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a CountingStock and the destination is a DataBasket.
static DataExchangeFormSheet create(java.lang.String sCaption, CountingStock csSource, DataBasket dbDest, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a CountingStocks and the destination is a DataBasket.
static DataExchangeFormSheet create(java.lang.String sCaption, DataBasket dbSource, Catalog cDest, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a Catalog.
static DataExchangeFormSheet create(java.lang.String sCaption, DataBasket dbSource, Catalog cDest, UIGate uigGate, DBCStrategy dbcsMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a Catalog.
static DataExchangeFormSheet create(java.lang.String sCaption, DataBasket dbSource, CountingStock csDest, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a CountingStock.
static DataExchangeFormSheet create(java.lang.String sCaption, DataBasket dbSource, CountingStock csDest, UIGate uigGate, DBCSStrategy dbcssMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a CountingStock.
static DataExchangeFormSheet create(java.lang.String sCaption, DataBasket dbSource, StoringStock ssDest, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a StoringStock.
static DataExchangeFormSheet create(java.lang.String sCaption, DataBasket dbSource, StoringStock ssDest, UIGate uigGate, DBSSStrategy dbsssMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a StoringStock.
static DataExchangeFormSheet create(java.lang.String sCaption, StoringStock ssSource, DataBasket dbDest, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a StoringStock and the destination is a DataBasket.
static DataExchangeFormSheet create(java.lang.String sCaption, StoringStock ssSource, DataBasket dbDest, UIGate uigGate, SSDBStrategy ssdbsMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where the source is a StoringStock and the destination is a DataBasket.
static DataExchangeFormSheet create(java.lang.String sCaption, StoringStock ssSource, StoringStock ssDest, DataBasket db, UIGate uigGate, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where source and destination are StoringStocks.
static DataExchangeFormSheet create(java.lang.String sCaption, StoringStock ssSource, StoringStock ssDest, DataBasket db, UIGate uigGate, SSSSStrategy sssssMoveStrategy, DataExchangeFormSheet.DataExchangeOptions options)
          Create and return a new DataExchangeFormSheet where source and destination are StoringStocks.
private static javax.swing.JComponent createComponent(java.lang.Object datasource, DataExchangeFormSheet.DataExchangeOption option, DataBasket db, boolean isRight, DataExchangeFormSheet defs)
          Create the source or destination component based on DataExchangeFormSheet.DataExchangeOption
private static javax.swing.JSplitPane createForm(MoveAction moveToDest, MoveAction moveToSource, javax.swing.JComponent jSource, javax.swing.JComponent jDest, DataExchangeFormSheet defs, DataExchangeFormSheet.DataExchangeOptions options)
          Helper method that positions all elements of the formsheet according to the given direction.
 DataBasket getDataBasket()
          Get the currently attached DataBasket.
 javax.swing.JComponent getDestComponent()
          Get the destination component.
 java.lang.Object getDestComponentSource()
          Get the source of the right table.
 java.lang.Object getDestSelectedRecord()
          Get the record currently selected in the right table.
 UIGate getGate()
          Get the gate at which the FormSheet is being displayed.
 javax.swing.JComponent getSourceComponent()
          Get the source component.
 java.lang.Object getSourceComponentSource()
          Get the source of the left table.
 java.lang.Object getSourceSelectedRecord()
          Get the record currently selected in the left table.
 MoveStrategy getStrategy()
          Get the strategy used when moving items between source and destination.
 void setDestTable(Catalog m_catalogSource, TableEntryDescriptor ted)
          Set the source of the destination table.
 void setDestTable(CountingStock m_csSource, boolean fShowZeros, TableEntryDescriptor ted)
          Set the source of the destination table.
 void setDestTable(DataBasket m_dbSource, DataBasketCondition dbc, DataBasketEntryGrouper dbeg, TableEntryDescriptor ted)
          Set the source of the destination table.
 void setDestTable(StoringStock m_stSource, TableEntryDescriptor ted)
          Set the source of the destination table.
 void setGate(UIGate uigGate)
          Set the gate at which to display the FormSheet.
 void setSourceTable(Catalog m_catalogSource, TableEntryDescriptor ted)
          Set the source of the source table.
 void setSourceTable(CountingStock m_csSource, boolean fShowZeros, TableEntryDescriptor ted)
          Set the source of the source table.
 void setSourceTable(DataBasket m_dbSource, DataBasketCondition dbc, DataBasketEntryGrouper dbeg, TableEntryDescriptor ted)
          Set the source of the source table.
 void setSourceTable(StoringStock m_stSource, TableEntryDescriptor ted)
          Set the source of the source table.
 void setStrategy(MoveStrategy ms)
          Set the strategy to be used when moving items between source and destination.
 
Methods inherited from class org.salespointframework.core.FormSheet
addButton, addButton, addContentCreator, attach, attach, attach, buttonIterator, buttonIterator, cancel, close, copyFormSheetDnDComponents, customizeButtonbar, detachDisplay, detachProcess, detachSalesPoint, fillBtnPanel, getButton, getButtonbarPosition, getButtonsLock, getCaption, getComponent, getComponentLock, getDisplay, getDisplayLock, getDragLayer, getModalLayer, getPopupLayer, getProcess, getSalesPoint, getWrappedComponent, isCancelled, letFollowComponentOnDragLayer, ok, paintButtonBarBackground, registerDnDComponent, removeAllButtons, removeAllDndComponents, removeButton, removeDnDComponent, setButtonbarPosition, setCaption, setComponent, setFormsheetCustomizationListener, setWaitResponse, stopFollowComponentOnDragLayer, toString, waitResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VIEW_DEFAULT

public static DataExchangeFormSheet.DataExchangeView VIEW_DEFAULT
The default view


OPTION_TABLE_TABLE

public static final DataExchangeFormSheet.DataExchangeOptions OPTION_TABLE_TABLE
this preset option uses a JAbstractTable for source and destination source


OPTION_LISTVIEW_LISTVIEW

public static final DataExchangeFormSheet.DataExchangeOptions OPTION_LISTVIEW_LISTVIEW
this preset option uses a JListView for source and destination component


OPTION_TABLE_LISTVIEW

public static final DataExchangeFormSheet.DataExchangeOptions OPTION_TABLE_LISTVIEW
this peset option uses a JAbstractTable as source component and a JListView as destination component


OPTION_LISTVIEW_TABLE

public static final DataExchangeFormSheet.DataExchangeOptions OPTION_LISTVIEW_TABLE
this preset option uses a JListView as source component and a JAbstractTable as destination component


OPTION_DEFAULT

public static DataExchangeFormSheet.DataExchangeOptions OPTION_DEFAULT
this default option is used if null is passed as view parameter


m_db

private DataBasket m_db
The DataBasket used.


m_srcSource

private java.lang.Object m_srcSource
The source for the source component.


m_destSource

private java.lang.Object m_destSource
The source for the destination component.


m_srcComponent

private javax.swing.JComponent m_srcComponent
The source component


m_destComponent

private javax.swing.JComponent m_destComponent
The destination component


m_ms

private MoveStrategy m_ms
The strategy used when moving items between source and destination.


m_uigGate

private UIGate m_uigGate
The gate at which the FormSheet is displayed.


m_atmSrcModel

private AbstractTableModel m_atmSrcModel
The TableModel of the source table displayed.


m_atmDestModel

private AbstractTableModel m_atmDestModel
The TableModel of the destination table displayed.


m_lmSrcModel

private javax.swing.ListModel m_lmSrcModel
The ListModel of the source JListView


m_lmDestModel

private javax.swing.ListModel m_lmDestModel
The ListModel of the destination JListView


m_anSrcSelection

private final int[] m_anSrcSelection
Reference to the currently selected index.


m_anDestSelection

private final int[] m_anDestSelection
Reference to the currently selected index.


helpHintDisplayed

protected static boolean helpHintDisplayed
indicates whether the help hint has already been displayed


RIGHT_ICON

private static final javax.swing.ImageIcon RIGHT_ICON
Icon with an arrow pointing right.


LEFT_ICON

private static final javax.swing.ImageIcon LEFT_ICON
Icon with an arrow pointing left.


UP_ICON

private static final javax.swing.ImageIcon UP_ICON
Icon with an arrow pointing upwards.


DOWN_ICON

private static final javax.swing.ImageIcon DOWN_ICON
Icon with an arrow pointing downwards.

Constructor Detail

DataExchangeFormSheet

protected DataExchangeFormSheet(java.lang.String sCaption,
                                FormSheetContentCreator fscc,
                                UIGate uigGate,
                                MoveStrategy ms)
Create a new DataExchangeFormSheet. Instead of calling this constructor directly, use one of the many create() functions provided.

Parameters:
sCaption - the caption of the FormSheet.
fscc - the content creator to be used.
uigGate - the gate at which to display the FormSheet.
ms - the strategy to be used when moving items between source and destination.
Method Detail

getSourceSelectedRecord

public java.lang.Object getSourceSelectedRecord()
Get the record currently selected in the left table.

The actual class of the record depends on the concrete type of TableModel used. See the TableModel's getRecord() method for details.


getDestSelectedRecord

public java.lang.Object getDestSelectedRecord()
Get the record currently selected in the right table.

The actual class of the record depends on the concrete type of TableModel used. See the TableModel's getRecord() method for details.


getDataBasket

public DataBasket getDataBasket()
Get the currently attached DataBasket.


getSourceComponentSource

public java.lang.Object getSourceComponentSource()
Get the source of the left table.


getDestComponentSource

public java.lang.Object getDestComponentSource()
Get the source of the right table.


setSourceTable

public void setSourceTable(Catalog m_catalogSource,
                           TableEntryDescriptor ted)
Set the source of the source table. New source is a Catalog

Parameters:
m_catalogSource - the new datasource as Catalog
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setSourceTable

public void setSourceTable(CountingStock m_csSource,
                           boolean fShowZeros,
                           TableEntryDescriptor ted)
Set the source of the source table. New source is a CountingStock

Parameters:
m_csSource - the new datasource as CoutingStock
fShowZeros - if true, lines informing about a zero amount of objects will be shown. Only necessary if prior TableModel is different from actual TableModel.
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setSourceTable

public void setSourceTable(StoringStock m_stSource,
                           TableEntryDescriptor ted)
Set the source of the source table. New source is a StoringStock

Parameters:
m_stSource - the new datasource as StoringStock
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setSourceTable

public void setSourceTable(DataBasket m_dbSource,
                           DataBasketCondition dbc,
                           DataBasketEntryGrouper dbeg,
                           TableEntryDescriptor ted)
Set the source of the source table. New source is a DataBasket

Parameters:
m_dbSource - the new datasource as Databasket
dbc - a condition specifying the DataBasketEntries to be part of the model. Only necessary if prior TableModel is different from actual TableModel.
dbeg - dbeg a strategy that will group individual DataBasketEntries together for display. If null, no grouping will occur. Only necessary if prior TableModel is different from actual TableModel.
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setDestTable

public void setDestTable(Catalog m_catalogSource,
                         TableEntryDescriptor ted)
Set the source of the destination table. New source is a Catalog

Parameters:
m_catalogSource - the new datasource as Catalog
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setDestTable

public void setDestTable(CountingStock m_csSource,
                         boolean fShowZeros,
                         TableEntryDescriptor ted)
Set the source of the destination table. New source is a CountingStock

Parameters:
m_csSource - the new datasource as CoutingStock
fShowZeros - if true, lines informing about a zero amount of objects will be shown. Only necessary if prior TableModel is different from actual TableModel.
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setDestTable

public void setDestTable(StoringStock m_stSource,
                         TableEntryDescriptor ted)
Set the source of the destination table. New source is a StoringStock

Parameters:
m_stSource - the new datasource as StoringStock
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

setDestTable

public void setDestTable(DataBasket m_dbSource,
                         DataBasketCondition dbc,
                         DataBasketEntryGrouper dbeg,
                         TableEntryDescriptor ted)
Set the source of the destination table. New source is a DataBasket

Parameters:
m_dbSource - the new datasource as Databasket
dbc - a condition specifying the DataBasketEntries to be part of the model. Only necessary if prior TableModel is different from actual TableModel.
dbeg - dbeg a strategy that will group individual DataBasketEntries together for display. If null, no grouping will occur. Only necessary if prior TableModel is different from actual TableModel.
ted - the new TableEntryDescriptor for the DataBasket. Only necessary if prior TableModel is different from actual TableModel.

getSourceComponent

public javax.swing.JComponent getSourceComponent()
Get the source component.


getDestComponent

public javax.swing.JComponent getDestComponent()
Get the destination component.


getStrategy

public MoveStrategy getStrategy()
Get the strategy used when moving items between source and destination.


setStrategy

public void setStrategy(MoveStrategy ms)
Set the strategy to be used when moving items between source and destination. Note, that the new strategy's MoveStrategy.canMoveToDest() and MoveStrategy.canMoveToSource() methods will have no effect. Also, it is your responsibility to make sure, that the actual class of the strategy matches the source/destination combination.

Parameters:
ms - the new strategy

getGate

public UIGate getGate()
Get the gate at which the FormSheet is being displayed.


setGate

public void setGate(UIGate uigGate)
Set the gate at which to display the FormSheet. The FormSheet will be moved to the new gate, i.e. UIGate.setFormSheet(org.salespointframework.core.FormSheet) will be called with the FormSheet as a parameter.


create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           CountingStock csSource,
                                           CountingStock csDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           CSCSStrategy cscssMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where source and destination are CountingStocks.

There will be an input line where the user can specify how many items to move with the next action.

Parameters:
sCaption - the caption of the FormSheet.
csSource - the source Stock.
csDest - the destination Stock.
db - the DataBasket relative to which to perform all operations.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
cscssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CSCSStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           CountingStock csSource,
                                           CountingStock csDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where source and destination are CountingStocks.

Calls the appropriate fully parameterized function, passing default values (i.e. null or false) for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
csSource - the source Stock.
csDest - the destination Stock.
db - the DataBasket relative to which to perform all operations.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           StoringStock ssSource,
                                           StoringStock ssDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           SSSSStrategy sssssMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where source and destination are StoringStocks.

Parameters:
sCaption - the caption of the FormSheet.
ssSource - the source Stock.
ssDest - the destination Stock.
db - the DataBasket relative to which to perform all operations.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
sssssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a SSSSStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           StoringStock ssSource,
                                           StoringStock ssDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where source and destination are StoringStocks.

Calls the appropriate fully parameterized function, passing null for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
ssSource - the source Stock.
ssDest - the destination Stock.
db - the DataBasket relative to which to perform all operations.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           CountingStock csSource,
                                           DataBasket dbDest,
                                           UIGate uigGate,
                                           CSDBStrategy csdbsMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a CountingStock and the destination is a DataBasket.

There will be an input line where the user can specify how many items to move with the next action.

Parameters:
sCaption - the caption of the FormSheet.
csSource - the source Stock.
dbDest - the destination DataBasket.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
csdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CSDBStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           CountingStock csSource,
                                           DataBasket dbDest,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a CountingStocks and the destination is a DataBasket.

Calls the appropriate fully parameterized function, passing default values (i.e. null or false) for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
csSource - the source Stock.
dbDest - the destination DataBasket.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           DataBasket dbSource,
                                           CountingStock csDest,
                                           UIGate uigGate,
                                           DBCSStrategy dbcssMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a CountingStock.

There will be an input line where the user can specify how many items to move with the next action.

Parameters:
sCaption - the caption of the FormSheet.
dbSource - the source DataBasket.
csDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
dbcssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a DBCSStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           DataBasket dbSource,
                                           CountingStock csDest,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a CountingStock.

Calls the appropriate fully parameterized function, passing default values (i.e. null or false) for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
dbSource - the source DataBasket.
csDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           StoringStock ssSource,
                                           DataBasket dbDest,
                                           UIGate uigGate,
                                           SSDBStrategy ssdbsMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a StoringStock and the destination is a DataBasket.

Parameters:
sCaption - the caption of the FormSheet.
ssSource - the source Stock.
dbDest - the destination DataBasket.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
cmpSource - a comparator defining the source sorting order. The objects to be compared will be the individual items. If null the ordering will be the natural ordering of the items.
cmpDest - a comparator defining the destination sorting order. The objects to be compared will be DataBasketEntries. If null the entries will be ordered first by their main and then by their secondary keys.
dbegDest - a DataBasketEntryGrouper defining the representation of the DataBasketEntries at the right JDataBasketTable.
tedSource - a TableEntryDescriptor that can split individual StockItems into a table's cells. It will be used for the source table. If null it defaults to a DefaultStockItemTED.
tedDest - a TableEntryDescriptor that can split individual DataBasketEntries into a table's cells. It will be used for the destination table. If null it defaults to a DefaultStoringStockDBETableEntryDescriptor.
ssdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a SSDBStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           StoringStock ssSource,
                                           DataBasket dbDest,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a StoringStock and the destination is a DataBasket.

Calls the appropriate fully parameterized function, passing null for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
ssSource - the source Stock.
dbDest - the destination DataBasket.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           DataBasket dbSource,
                                           StoringStock ssDest,
                                           UIGate uigGate,
                                           DBSSStrategy dbsssMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a StoringStock.

Parameters:
sCaption - the caption of the FormSheet.
dbSource - the source DataBasket.
ssDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
cmpSource - a comparator defining the source sorting order. The objects to be compared will be DataBasketEntries. If null the entries will be ordered first by their main and then by their secondary keys.
cmpDest - a comparator defining the destination sorting order. The objects to be compared will be the individual items. If null the ordering will be the natural ordering of the items.
dbegSource - a DataBasketEntryGrouper defining the representation of the DataBasketEntries at the left JDataBasketTable.
tedSource - a TableEntryDescriptor that can split individual DataBasketEntries into a table's cells. It will be used for the source table. If null it defaults to a DefaultStoringStockDBETableEntryDescriptor.
tedDest - a TableEntryDescriptor that can split individual StockItems into a table's cells. It will be used for the destination table. If null it defaults to a DefaultStockItemTED.
dbsssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a DBSSStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           DataBasket dbSource,
                                           StoringStock ssDest,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a StoringStock.

Calls the appropriate fully parameterized function, passing null for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
dbSource - the source DataBasket.
ssDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           Catalog cDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           CCStrategy ccsMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where source and destination are Catalogs.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
cDest - the destination Catalog.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
cmpSource - a comparator defining the source sorting order. The items to be compared are CatalogItems. If null the items will be sorted according to their natural ordering.
cmpDest - a comparator defining the destination sorting order. The items to be compared are CatalogItems. If null the items will be sorted according to their natural ordering.
tedSource - a TableEntryDescriptor that can split CatalogItems into a table's cells. It will be used for the source table. If null and cSource is a Currency it defaults to a DefaultCurrencyItemTED using cSource to format values. Otherwise, it defaults to a DefaultCatalogItemTED.
tedDest - a TableEntryDescriptor that can split CatalogItems into a table's cells. It will be used for the destination table. If null and cDest is a Currency it defaults to a DefaultCurrencyItemTED using cDest to format values. Otherwise, it defaults to a DefaultCatalogItemTED.
ccsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a CCStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           Catalog cDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where source and destination are Catalogs.

Calls the appropriate fully parameterized function, passing null for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
cDest - the destination Catalog.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           DataBasket dbDest,
                                           UIGate uigGate,
                                           CDBStrategy cdbsMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a DataBasket.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
dbDest - the destination Databasket.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
cdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a CDBStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           DataBasket dbDest,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a DataBasket.

Calls the appropriate fully parameterized function, passing null for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
dbDest - the destination Databasket.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           DataBasket dbSource,
                                           Catalog cDest,
                                           UIGate uigGate,
                                           DBCStrategy dbcsMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a Catalog.

Parameters:
sCaption - the caption of the FormSheet.
dbSource - the source Databasket.
cDest - the destination Catalog.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
dbcsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a DBCStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           DataBasket dbSource,
                                           Catalog cDest,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a DataBasket and the destination is a Catalog.

Calls the appropriate fully parameterized function, passing null for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
dbSource - the source Databasket.
cDest - the destination Catalog.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           StoringStock ssDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           CSSStrategy csssMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a StoringStock.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
ssDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
cmpSource - a comparator defining the source sorting order. The items to be compared are CatalogItems. If null the items will be sorted according to their natural ordering.
cmpDest - a comparator defining the destination sorting order. The objects to be compared will be the individual items. If null the ordering will be the natural ordering of the items.
tedSource - a TableEntryDescriptor that can split CatalogItems into a table's cells. It will be used for the source table. If null and cSource is a Currency it defaults to a DefaultCurrencyItemTED using cSource to format values. Otherwise, it defaults to a DefaultCatalogItemTED.
tedDest - a TableEntryDescriptor that can split individual StockItems into a table's cells. It will be used for the destination table. If null it defaults to a DefaultStockItemTED.
csssMoveStrategy - the strategy to be used when moving items between source and destination. Attention: Must not be null!
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           CountingStock csDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           CCSStrategy ccssMoveStrategy,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a CountingStock.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
csDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
ccssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CCSStrategy object.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

create

public static DataExchangeFormSheet create(java.lang.String sCaption,
                                           Catalog cSource,
                                           CountingStock csDest,
                                           DataBasket db,
                                           UIGate uigGate,
                                           DataExchangeFormSheet.DataExchangeOptions options)
Create and return a new DataExchangeFormSheet where the source is a Catalog and the destination is a CountingStock.

Calls the appropriate fully parameterized function, passing default values (i.e. null or false) for the missing parameters.

Parameters:
sCaption - the caption of the FormSheet.
cSource - the source Catalog.
csDest - the destination Stock.
uigGate - the Gate at which the FormSheet will be displayed. If this is null it must be set before actually using the FormSheet.
options - the DataExchangeFormSheet.DataExchangeOptions defining elements properties, null for default

createComponent

private static final javax.swing.JComponent createComponent(java.lang.Object datasource,
                                                            DataExchangeFormSheet.DataExchangeOption option,
                                                            DataBasket db,
                                                            boolean isRight,
                                                            DataExchangeFormSheet defs)
Create the source or destination component based on DataExchangeFormSheet.DataExchangeOption

Parameters:
datasource - source for the component (Catalog, Stock, ...)
option - options used for construction
isRight - true if component will be used as destination component
defs - Formsheet, the component will be positioned on

createForm

private static final javax.swing.JSplitPane createForm(MoveAction moveToDest,
                                                       MoveAction moveToSource,
                                                       javax.swing.JComponent jSource,
                                                       javax.swing.JComponent jDest,
                                                       DataExchangeFormSheet defs,
                                                       DataExchangeFormSheet.DataExchangeOptions options)
Helper method that positions all elements of the formsheet according to the given direction.