SalesPoint Framework v3.0

data.stdforms
Class TwoTableFormSheet

java.lang.Object
  |
  +--sale.FormSheet
        |
        +--data.stdforms.TwoTableFormSheet

public class TwoTableFormSheet
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 form. The data containers that are supported as source or destination are: Catalog, Stock, DataBasket. There will be two buttons that allow 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 an input line where the user can specify how many items are to be moved. 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.

Hooks:
Move Items Between Containers - GUI
Since:
v2.0
Version:
2.0 20/08/1999
Author:
Steffen Zschaler
See Also:
Serialized Form

Inner classes inherited from class sale.FormSheet
FormSheet.FormButton
 
Field Summary
static String BUTTON_LEFT
          Resource identifier of the '<<' button's label.
static String BUTTON_RIGHT
          Resource identifier of the '>>' button's label.
 
Fields inherited from class sale.FormSheet
BTNID_CANCEL, BTNID_OK, m_fCancelled
 
Constructor Summary
protected TwoTableFormSheet(String sCaption, FormSheetContentCreator fscc, UIGate uigGate, MoveStrategy ms)
          Create a new TwoTableFormSheet.
 
Method Summary
static TwoTableFormSheet create(String sCaption, Catalog cSource, Catalog cDest, DataBasket db, UIGate uigGate)
          Create and return a new TwoTableFormSheet where source and destination are Catalogs.
static TwoTableFormSheet create(String sCaption, Catalog cSource, Catalog cDest, DataBasket db, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CCStrategy ccsMoveStrategy)
          Create and return a new TwoTableFormSheet where source and destination are Catalogs.
static TwoTableFormSheet create(String sCaption, Catalog cSource, CountingStock csDest, DataBasket db, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a CountingStock.
static TwoTableFormSheet create(String sCaption, Catalog cSource, CountingStock csDest, DataBasket db, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, boolean fShowZeros, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CCSStrategy ccssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a CountingStock.
static TwoTableFormSheet create(String sCaption, Catalog cSource, DataBasket dbDest, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, Catalog cSource, DataBasket dbDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, DataBasketEntryGrouper dbegDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CDBStrategy cdbsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, Catalog cSource, DataBasket dbDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CDBStrategy cdbsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, Catalog cSource, StoringStock ssDest, DataBasket db, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CSSStrategy csssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a StoringStock.
static TwoTableFormSheet create(String sCaption, Catalog cSource, StoringStock ssDest, DataBasket db, UIGate uigGate, CSSStrategy csssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a StoringStock.
static TwoTableFormSheet create(String sCaption, CountingStock csSource, CountingStock csDest, DataBasket db, UIGate uigGate)
          Create and return a new TwoTableFormSheet where source and destination are CountingStocks.
static TwoTableFormSheet create(String sCaption, CountingStock csSource, CountingStock csDest, DataBasket db, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, boolean fShowZerosSource, boolean fShowZerosDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CSCSStrategy cscssMoveStrategy)
          Create and return a new TwoTableFormSheet where source and destination are CountingStocks.
static TwoTableFormSheet create(String sCaption, CountingStock csSource, DataBasket dbDest, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a CountingStocks and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, CountingStock csSource, DataBasket dbDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, boolean fShowZeros, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CSDBStrategy csdbsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a CountingStock and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, CountingStock csSource, DataBasket dbDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, DataBasketEntryGrouper dbegDest, boolean fShowZeros, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, CSDBStrategy csdbsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a CountingStock and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, Catalog cDest, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a Catalog.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, Catalog cDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, DataBasketEntryGrouper dbegSource, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, DBCStrategy dbcsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a Catalog.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, Catalog cDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, DBCStrategy dbcsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a Catalog.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, CountingStock csDest, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a CountingStock.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, CountingStock csDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, boolean fShowZeros, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, DBCSStrategy dbcssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a CountingStock.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, CountingStock csDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, DataBasketEntryGrouper dbegSource, boolean fShowZeros, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, DBCSStrategy dbcssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a CountingStock.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, StoringStock ssDest, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a StoringStock.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, StoringStock ssDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, DataBasketEntryGrouper dbegSource, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, DBSSStrategy dbsssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a StoringStock.
static TwoTableFormSheet create(String sCaption, DataBasket dbSource, StoringStock ssDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, DBSSStrategy dbsssMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a DataBasket and the destination is a StoringStock.
static TwoTableFormSheet create(String sCaption, StoringStock ssSource, DataBasket dbDest, UIGate uigGate)
          Create and return a new TwoTableFormSheet where the source is a StoringStock and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, StoringStock ssSource, DataBasket dbDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, DataBasketEntryGrouper dbegDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, SSDBStrategy ssdbsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a StoringStock and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, StoringStock ssSource, DataBasket dbDest, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, SSDBStrategy ssdbsMoveStrategy)
          Create and return a new TwoTableFormSheet where the source is a StoringStock and the destination is a DataBasket.
static TwoTableFormSheet create(String sCaption, StoringStock ssSource, StoringStock ssDest, DataBasket db, UIGate uigGate)
          Create and return a new TwoTableFormSheet where source and destination are StoringStocks.
static TwoTableFormSheet create(String sCaption, StoringStock ssSource, StoringStock ssDest, DataBasket db, UIGate uigGate, Comparator cmpSource, Comparator cmpDest, TableEntryDescriptor tedSource, TableEntryDescriptor tedDest, SSSSStrategy sssssMoveStrategy)
          Create and return a new TwoTableFormSheet where source and destination are StoringStocks.
 UIGate getGate()
          Get the gate at which the FormSheet is being displayed.
 Object getLeftSelectedRecord()
          Get the record currently selected in the left table.
static String getResourceText(String sKey)
          Get a String from the global TwoTableFormSheet resource bundle.
 Object getRightSelectedRecord()
          Get the record currently selected in the right table.
 MoveStrategy getStrategy()
          Get the strategy used when moving items between source and destination.
 void setGate(UIGate uigGate)
          Set the gate at which to display the FormSheet.
 void setStrategy(MoveStrategy ms)
          Set the strategy to be used when moving items between source and destination.
static void setTextResource(ResourceBundle rb)
          Set the resource bundle that knows the labels for the buttons.
 
Methods inherited from class sale.FormSheet
addButton, addButton, addContentCreator, attach, attach, attach, buttonIterator, buttonIterator, cancel, close, detachDisplay, detachProcess, detachSalesPoint, fillBtnPanel, getButton, getButtonsLock, getCaption, getComponent, getComponentLock, getDisplay, getDisplayLock, getProcess, getSalesPoint, isCancelled, ok, removeAllButtons, removeButton, setCaption, setComponent, setWaitResponse, toString, waitResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUTTON_LEFT

public static final String BUTTON_LEFT
Resource identifier of the '<<' button's label. Is "2TableFormSheet.button.left"

BUTTON_RIGHT

public static final String BUTTON_RIGHT
Resource identifier of the '>>' button's label. Is "2TableFormSheet.button.right"
Constructor Detail

TwoTableFormSheet

protected TwoTableFormSheet(String sCaption,
                            FormSheetContentCreator fscc,
                            UIGate uigGate,
                            MoveStrategy ms)
Create a new TwoTableFormSheet. 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

getLeftSelectedRecord

public Object getLeftSelectedRecord()
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.


getRightSelectedRecord

public Object getRightSelectedRecord()
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.


getStrategy

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

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.
Override:
Never.
Parameters:
ms - the new strategy

getGate

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

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(sale.FormSheet) will be called with the FormSheet as a parameter.
Override:
Never.

create

public static TwoTableFormSheet create(String sCaption,
                                       CountingStock csSource,
                                       CountingStock csDest,
                                       DataBasket db,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       boolean fShowZerosSource,
                                       boolean fShowZerosDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CSCSStrategy cscssMoveStrategy)
Create and return a new TwoTableFormSheet 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.
cmpSource - a comparator defining the source sorting order. The objects to be compared will be the keys of the individual items. If null the ordering will be the natural ordering of the keys.
cmpDest - a comparator defining the destination sorting order. The objects to be compared will be the keys of the individual items. If null the ordering will be the natural ordering of the keys.
fShowZerosSource - if false, source lines containing '0' in the "Count" column will be hidden.
fShowZerosDest - if false, destination lines containing '0' in the "Count" column will be hidden.
tedSource - a TableEntryDescriptor that can split individual CountingStockTableModel records into a table's cells. It will be used for the source table. If null and csSource is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csSource.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
tedDest - a TableEntryDescriptor that can split individual CountingStockTableModel records into a table's cells. It will be used for the destination table. If null and csDest is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csDest.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
cscssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CSCSStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       CountingStock csSource,
                                       CountingStock csDest,
                                       DataBasket db,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       StoringStock ssSource,
                                       StoringStock ssDest,
                                       DataBasket db,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       SSSSStrategy sssssMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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 the individual items. If null the ordering will be the natural ordering of the items.
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 StockItems into a table's cells. It will be used for the destination table. If null it defaults to a DefaultStockItemTED.
sssssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a SSSSStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       StoringStock ssSource,
                                       StoringStock ssDest,
                                       DataBasket db,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       CountingStock csSource,
                                       DataBasket dbDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       DataBasketEntryGrouper dbegDest,
                                       boolean fShowZeros,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CSDBStrategy csdbsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
cmpSource - a comparator defining the source sorting order. The objects to be compared will be the keys of the individual items. If null the ordering will be the natural ordering of the keys.
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.
fShowZeros - if false, source lines containing '0' in the "Count" column will be hidden.
tedSource - a TableEntryDescriptor that can split individual CountingStockTableModel records into a table's cells. It will be used for the source table. If null and csSource is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csSource.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
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 DefaultCountingStockDBETableEntryDescriptor.
csdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CSDBStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       CountingStock csSource,
                                       DataBasket dbDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       boolean fShowZeros,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CSDBStrategy csdbsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
cmpSource - a comparator defining the source sorting order. The objects to be compared will be the keys of the individual items. If null the ordering will be the natural ordering of the keys.
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.
fShowZeros - if false, source lines containing '0' in the "Count" column will be hidden.
tedSource - a TableEntryDescriptor that can split individual CountingStockTableModel records into a table's cells. It will be used for the source table. If null and csSource is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csSource.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
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 DefaultCountingStockDBETableEntryDescriptor.
csdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CSDBStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       CountingStock csSource,
                                       DataBasket dbDest,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       CountingStock csDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       DataBasketEntryGrouper dbegSource,
                                       boolean fShowZeros,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       DBCSStrategy dbcssMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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 keys of the individual items. If null the ordering will be the natural ordering of the keys.
dbegSource - a #DataBasketEntryGrouper defining the representation of the DataBasketEntries at the left JDataBasketTable.
fShowZeros - if false, destination lines containing '0' in the "Count" column will be hidden.
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 DefaultCountingStockDBETableEntryDescriptor.
tedDest - a TableEntryDescriptor that can split individual CountingStockTableModel records into a table's cells. It will be used for the destination table. If null and csDest is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csDest.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
dbcssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a DBCSStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       CountingStock csDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       boolean fShowZeros,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       DBCSStrategy dbcssMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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 keys of the individual items. If null the ordering will be the natural ordering of the keys.
fShowZeros - if false, destination lines containing '0' in the "Count" column will be hidden.
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 DefaultCountingStockDBETableEntryDescriptor.
tedDest - a TableEntryDescriptor that can split individual CountingStockTableModel records into a table's cells. It will be used for the destination table. If null and csDest is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csDest.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
dbcssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a DBCSStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       CountingStock csDest,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       StoringStock ssSource,
                                       DataBasket dbDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       DataBasketEntryGrouper dbegDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       SSDBStrategy ssdbsMoveStrategy)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       StoringStock ssSource,
                                       DataBasket dbDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       SSDBStrategy ssdbsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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.

create

public static TwoTableFormSheet create(String sCaption,
                                       StoringStock ssSource,
                                       DataBasket dbDest,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       StoringStock ssDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       DataBasketEntryGrouper dbegSource,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       DBSSStrategy dbsssMoveStrategy)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       StoringStock ssDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       DBSSStrategy dbsssMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       StoringStock ssDest,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       Catalog cDest,
                                       DataBasket db,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CCStrategy ccsMoveStrategy)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       Catalog cDest,
                                       DataBasket db,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       DataBasket dbDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       DataBasketEntryGrouper dbegDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CDBStrategy cdbsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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 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 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 DataBasketEntries into a table's cells. It will be used for the destination table. If null it defaults to a DefaultCatalogItemDBETableEntryDescriptor.
cdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a CDBStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       DataBasket dbDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CDBStrategy cdbsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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 DataBasketEntries. If null the entries will be ordered first by their main and then by their secondary keys.
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 DataBasketEntries into a table's cells. It will be used for the destination table. If null it defaults to a DefaultCatalogItemDBETableEntryDescriptor.
cdbsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a CDBStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       DataBasket dbDest,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       Catalog cDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       DataBasketEntryGrouper dbegSource,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       DBCStrategy dbcsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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.
cmpSource - 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.
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 DefaultCatalogItemDBETableEntryDescriptor.
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.
dbcsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a DBCStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       Catalog cDest,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       DBCStrategy dbcsMoveStrategy)
Create and return a new TwoTableFormSheet 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.
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.
cmpSource - 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 individual DataBasketEntries into a table's cells. It will be used for the source table. If null it defaults to a DefaultCatalogItemDBETableEntryDescriptor.
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.
dbcsMoveStrategy - the strategy to be used when moving items between source and destination. If null it defaults to a DBCStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       DataBasket dbSource,
                                       Catalog cDest,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       StoringStock ssDest,
                                       DataBasket db,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CSSStrategy csssMoveStrategy)
Create and return a new TwoTableFormSheet 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!

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       StoringStock ssDest,
                                       DataBasket db,
                                       UIGate uigGate,
                                       CSSStrategy csssMoveStrategy)
Create and return a new TwoTableFormSheet where the source is a Catalog 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.
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.
csssMoveStrategy - the strategy to be used when moving items between source and destination. Attention: Must not be null!

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       CountingStock csDest,
                                       DataBasket db,
                                       UIGate uigGate,
                                       Comparator cmpSource,
                                       Comparator cmpDest,
                                       boolean fShowZeros,
                                       TableEntryDescriptor tedSource,
                                       TableEntryDescriptor tedDest,
                                       CCSStrategy ccssMoveStrategy)
Create and return a new TwoTableFormSheet where the source is a Catalog and the destination is a CountingStock.
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 keys of the individual items. If null the ordering will be the natural ordering of the keys.
fShowZeros - if false, destination lines containing '0' in the "Count" column will be hidden.
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 CountingStockTableModel records into a table's cells. It will be used for the destination table. If null and csDest is a MoneyBag it defaults to a DefaultMoneyBagItemTED using csDest.getCatalog() to format values. Otherwise, it defaults to a DefaultCountingStockItemTED.
ccssMoveStrategy - the strategy to be used when moving items between source and destination. If null, defaults to a CCSStrategy object.

create

public static TwoTableFormSheet create(String sCaption,
                                       Catalog cSource,
                                       CountingStock csDest,
                                       DataBasket db,
                                       UIGate uigGate)
Create and return a new TwoTableFormSheet 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.
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.

setTextResource

public static final void setTextResource(ResourceBundle rb)
Set the resource bundle that knows the labels for the buttons.

The resource must contain Strings for all items needed by TwoTableFormSheet, specifically BUTTON_LEFT and BUTTON_RIGHT.


getResourceText

public static final String getResourceText(String sKey)
Get a String from the global TwoTableFormSheet resource bundle.
Parameters:
sKey - the key for which to find the text.

SalesPoint Framework v3.0