|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.salespointframework.core.FormSheet
org.salespointframework.desktop.formsheets.ListViewFormSheet
public class ListViewFormSheet
The List view formsheet represents a JList
with an Slider for dynamic cell scaling
and a JModelFilter
for search. This FormSheet can be used for Catalogs, Stocks,
UserManagers as well as for DataBaskets.
The View provides four different orientations defined by ListViewOrientation enumeration.
as renderer you can use any ListCellRenderer
. The use of the AbstractListViewRenderer
is recommended. There already exists a set of derived classes for special rendering tasks
JList
,
AbstractListViewRenderer
,
CatalogListViewRenderer
,
CountingStockListViewRenderer
,
StoringStockListViewRenderer
,
DataBasketListViewRenderer
,
JUserList.UserListCellRenderer
Nested Class Summary | |
---|---|
private static class |
ListViewFormSheet.SLVFSContentCreator
Abstract content creator for the ListViewFormSheet |
Nested classes/interfaces inherited from class org.salespointframework.core.FormSheet |
---|
FormSheet.FormButton |
Field Summary | |
---|---|
private DataBasket |
db
Databasket used for visibility |
private JListView |
listView
internal JListView reference |
private int[] |
selection
current selection index |
private java.lang.Object |
source
source of JListView |
private UIGate |
uiGate
the UIGate, the formsheet is attached to |
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 | |
---|---|
ListViewFormSheet(java.lang.String caption,
UIGate uiGate,
FormSheetContentCreator fscc)
Default constructor |
Method Summary | |
---|---|
static ListViewFormSheet |
create(java.lang.String caption)
Creates a new instance of ListViewFormSheet from a UserManager source
uses UserManager.getInstance() as source |
static ListViewFormSheet |
create(java.lang.String caption,
Catalog c)
create an instance of ListViewFormSheet from a Catalog source |
static ListViewFormSheet |
create(java.lang.String caption,
Catalog c,
DataBasket db)
create an instance of ListViewFormSheet from a Catalog source |
static ListViewFormSheet |
create(java.lang.String caption,
CountingStock stock)
create a new instance of ListViewFormSheet from a CountingStock source |
static ListViewFormSheet |
create(java.lang.String caption,
CountingStock stock,
DataBasket db)
create a new instance of ListViewFormSheet from a CountingStock source |
static ListViewFormSheet |
create(java.lang.String caption,
DataBasket db)
creates a new instance of ListViewFormSheet from a DataBasket source |
static ListViewFormSheet |
create(java.lang.String caption,
DataBasket db,
DataBasketCondition dbc)
creates a new instance of ListViewFormSheet from a DataBasket source |
static ListViewFormSheet |
create(java.lang.String caption,
StoringStock stock)
creates a new instance of ListViewFormSheet from a StoringStock source |
static ListViewFormSheet |
create(java.lang.String caption,
StoringStock stock,
DataBasket db)
creates a new instance of ListViewFormSheet from a StoringStock source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
Catalog c,
DataBasket db,
java.util.Comparator<CatalogItem> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer)
create an instance of ListViewFormSheet from a Catalog source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
Catalog c,
DataBasket db,
java.util.Comparator<CatalogItem> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer,
boolean categorize,
Category defaultCategory)
create an instance of ListViewFormSheet from a Catalog source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
CountingStock stock,
DataBasket db,
java.util.Comparator<CatalogItem> cmp,
boolean showZeros,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer)
create a new instance of ListViewFormSheet from a CountingStock source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
CountingStock stock,
DataBasket db,
java.util.Comparator<CatalogItem> cmp,
boolean showZeros,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer,
boolean categorize,
Category defaulCategory)
create a new instance of ListViewFormSheet from a CountingStock source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
DataBasket db,
DataBasketCondition dbc,
java.util.Comparator<DataBasketEntry> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer)
creates a new instance of ListViewFormSheet from a DataBasket source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
DataBasket db,
DataBasketCondition dbc,
java.util.Comparator<DataBasketEntry> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer,
boolean categorize,
Category defaulCategory,
DataBasketEntryGrouper dbeg)
creates a new instance of ListViewFormSheet from a DataBasket source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
StoringStock stock,
DataBasket db,
java.util.Comparator<StockItem> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer)
creates a new instance of ListViewFormSheet from a StoringStock source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
StoringStock stock,
DataBasket db,
java.util.Comparator<StockItem> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer,
boolean categorize,
Category defaultCategory)
creates a new instance of ListViewFormSheet from a StoringStock source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
UserManager um,
UserFilter filter,
java.util.Comparator<User> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer)
Creates a new instance of ListViewFormSheet from a UserManager source |
static ListViewFormSheet |
create(java.lang.String caption,
UIGate uiGate,
UserManager um,
UserFilter filter,
java.util.Comparator<User> cmp,
JListView.ListViewOrientation orientation,
javax.swing.ListCellRenderer renderer,
boolean categorize,
Category defaulCategory)
Creates a new instance of ListViewFormSheet from a UserManager source |
DataBasket |
getDataBasket()
get databasket used for visibility |
UIGate |
getGate()
get UIGate the formsheet is attached to |
JListView |
getListView()
get JListView component |
java.lang.Object |
getSelectedItem()
get the currently selected item |
java.lang.Object |
getSource()
get listview source |
void |
setCellConstraints(float minimum,
float maximum,
float initial,
float cellRatio)
set the cell constraints. |
void |
setGate(UIGate uiGate)
set the uigate, the formsheet is attached to |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private UIGate uiGate
private int[] selection
private JListView listView
JListView
reference
private java.lang.Object source
JListView
private DataBasket db
Constructor Detail |
---|
public ListViewFormSheet(java.lang.String caption, UIGate uiGate, FormSheetContentCreator fscc)
caption
- formsheet captionuiGate
- uigate, the formsheet will be attached tofscc
- additional FormSheetContentCreator
Method Detail |
---|
public void setGate(UIGate uiGate)
uiGate
- new UIGate
public UIGate getGate()
UIGate
the formsheet is attached to
public JListView getListView()
JListView
component
public java.lang.Object getSource()
public DataBasket getDataBasket()
public java.lang.Object getSelectedItem()
public void setCellConstraints(float minimum, float maximum, float initial, float cellRatio)
minimum
- minimum of slider rangemaximum
- maximum of slider rangeinitial
- initial slider positioncellRatio
- aspect ration of cellJListView.setCellConstraints(float, float, float, float)
public static ListViewFormSheet create(java.lang.String caption, Catalog c)
ListViewFormSheet
from a Catalog source
caption
- FormSheet
captionc
- Catalog
source
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, Catalog c, DataBasket db)
ListViewFormSheet
from a Catalog source
caption
- FormSheet
captionc
- Catalog
sourcedb
- DataBasket used for visibility
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, Catalog c, DataBasket db, java.util.Comparator<CatalogItem> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer)
ListViewFormSheet
from a Catalog source
caption
- FormSheet
captionc
- Catalog
sourcedb
- DataBasket used for visibilitycmp
- comparator to use for sorting. comparator should be aware of categories.orientation
- orientation of listrenderer
- cell renderer to use
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, Catalog c, DataBasket db, java.util.Comparator<CatalogItem> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer, boolean categorize, Category defaultCategory)
ListViewFormSheet
from a Catalog source
caption
- FormSheet
captionc
- Catalog
sourcedb
- DataBasket used for visibilitycmp
- comparator to use for sorting. comparator should be aware of categories if categorize is true.orientation
- orientation of listrenderer
- cell renderer to usecategorize
- true if categories should be displayeddefaultCategory
- default category for items with no category
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, CountingStock stock)
ListViewFormSheet
from a CountingStock
source
caption
- FormSheet
captionstock
- source for list
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, CountingStock stock, DataBasket db)
ListViewFormSheet
from a CountingStock
source
caption
- FormSheet
captionstock
- source for listdb
- databasket used for visibility
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, CountingStock stock, DataBasket db, java.util.Comparator<CatalogItem> cmp, boolean showZeros, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer)
ListViewFormSheet
from a CountingStock
source
caption
- FormSheet
captionstock
- source for listdb
- databasket used for visibilitycmp
- Comparator used for sorting. should be aware of categories.showZeros
- show items with zero countuiGate
- UIgate to attach this FormSheet
orientation
- list orientationrenderer
- renderer used for cell rendering
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, CountingStock stock, DataBasket db, java.util.Comparator<CatalogItem> cmp, boolean showZeros, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer, boolean categorize, Category defaulCategory)
ListViewFormSheet
from a CountingStock
source
caption
- FormSheet
captionstock
- source for listdb
- databasket used for visibilitycmp
- Comparator used for sorting. should be aware of categories, if categorize is true.showZeros
- show items with zero countuiGate
- UIgate to attach this FormSheet
orientation
- list orientationrenderer
- renderer used for cell renderingcategorize
- display categoriesdefaulCategory
- category used for items with no category set.
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, StoringStock stock)
ListViewFormSheet
from a StoringStock
source
caption
- FormSheet
captionstock
- StoringStock
source
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, StoringStock stock, DataBasket db)
ListViewFormSheet
from a StoringStock
source
caption
- FormSheet
captionstock
- StoringStock
sourcedb
- Databasket used for visibility
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, StoringStock stock, DataBasket db, java.util.Comparator<StockItem> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer)
ListViewFormSheet
from a StoringStock
source
caption
- FormSheet
captionstock
- StoringStock
sourcedb
- Databasket used for visibilityuiGate
- UIgate the FormSheet
wille be attached tocmp
- Comparator used for sorting. should be aware of categories.orientation
- listview orientationrenderer
- cell renderer
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, StoringStock stock, DataBasket db, java.util.Comparator<StockItem> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer, boolean categorize, Category defaultCategory)
ListViewFormSheet
from a StoringStock
source
caption
- FormSheet
captionstock
- StoringStock
sourcedb
- Databasket used for visibilityuiGate
- UIgate the FormSheet
wille be attached tocmp
- Comparator used for sorting. should be aware of categories.orientation
- listview orientationrenderer
- cell renderercategorize
- if true, categories will be displayed in listdefaultCategory
- category used for items with no Category
set.
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption)
ListViewFormSheet
from a UserManager
source
uses UserManager.getInstance()
as source
caption
- FormSheet
caption
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, UserManager um, UserFilter filter, java.util.Comparator<User> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer)
ListViewFormSheet
from a UserManager
source
caption
- FormSheet
captionuiGate
- UIGate the FormSheet
will be attached toum
- usermanager to use a sourcefilter
- filters userscmp
- Comparator used for sorting. should be aware of categories.orientation
- orientation of listviewrenderer
- cell renderer
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, UserManager um, UserFilter filter, java.util.Comparator<User> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer, boolean categorize, Category defaulCategory)
ListViewFormSheet
from a UserManager
source
caption
- FormSheet
captionuiGate
- UIGate the FormSheet
will be attached toum
- usermanager to use a sourcefilter
- filters userscmp
- Comparator used for sorting. should be aware of categories.orientation
- orientation of listviewrenderer
- cell renderercategorize
- if true, categories will be displayed. otherwise not.defaulCategory
- category used for items with no category set
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, DataBasket db)
ListViewFormSheet
from a DataBasket
source
caption
- FormSheet
captiondb
- list source
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, DataBasket db, DataBasketCondition dbc)
ListViewFormSheet
from a DataBasket
source
caption
- FormSheet
captiondb
- list sourcedbc
- condition for filtering DataBasketEntry
s
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, DataBasket db, DataBasketCondition dbc, java.util.Comparator<DataBasketEntry> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer)
ListViewFormSheet
from a DataBasket
source
caption
- FormSheet
captiondb
- list sourcedbc
- condition for filtering DataBasketEntry
suiGate
- UIgate the FormSheet
will be attached tocmp
- Comparator used for entry sorting. should be aware of categories.orientation
- listview orientationrenderer
- cell renderer
ListViewFormSheet
public static ListViewFormSheet create(java.lang.String caption, UIGate uiGate, DataBasket db, DataBasketCondition dbc, java.util.Comparator<DataBasketEntry> cmp, JListView.ListViewOrientation orientation, javax.swing.ListCellRenderer renderer, boolean categorize, Category defaulCategory, DataBasketEntryGrouper dbeg)
ListViewFormSheet
from a DataBasket
source
caption
- FormSheet
captiondb
- list sourcedbc
- condition for filtering DataBasketEntry
suiGate
- UIgate the FormSheet
will be attached tocmp
- Comparator used for entry sorting. should be aware of categories.orientation
- listview orientationrenderer
- cell renderercategorize
- true, if categories should be displayeddefaulCategory
- category used for items with no category setthe
- DataBasketEntryGrouper
ListViewFormSheet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |