|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.opensubsystems.inventory.application.swt.CategorizedItemsTable
public abstract class CategorizedItemsTable
Table displaying list of some items which can be filtered using categories.
| Field Summary | |
|---|---|
static int |
DISPLAY_INVENTORY
Show item types in inventory. |
static int |
DISPLAY_ISSUED
Show item types with issued information. |
static int |
DISPLAY_ISSUED_WITHOUT_FILTERS
Show item types with issued information. |
static int |
DISPLAY_UNKNOVN
Constant for showed data type. |
static java.lang.String[] |
FIND_BUTTONS
Constant for Find buttons in char pad. |
protected org.eclipse.swt.widgets.Button |
m_allItemsButton
Button to show all (not only shipped) items. |
protected org.eclipse.swt.widgets.Button |
m_allMainCategories
Button to display all main categories. |
protected org.eclipse.swt.widgets.Button |
m_allSubCategories
Button to display all subcategories for some main category. |
protected org.eclipse.swt.widgets.Button[] |
m_arMainCategoryButtons
Row of buttons displaying main category items. |
protected org.eclipse.swt.widgets.Button[] |
m_arSubCategoryButtons
Row of buttons displaying subcategory items. |
protected org.eclipse.swt.widgets.Composite |
m_categoryRow
Control which contains buttons for main categories. |
protected Inventory |
m_defaultInventory
Inventory which is used to load items from. |
protected int |
m_displayedDataType
What data are displayed in table |
protected org.eclipse.swt.widgets.Button |
m_extraFiltersButton
The most right button with from the series of filter buttons. |
protected org.eclipse.swt.widgets.Button |
m_findItemsButton
Button to show CharacterPad dialog for find function |
protected org.eclipse.swt.widgets.Button |
m_issuedItemsButton
Button to show only shipped items. |
protected java.lang.String |
m_likeText
Like part of sql from CharacterPad |
protected org.opensubsystems.patterns.listdata.util.AsyncDataLoader |
m_loader
The last started loader. |
protected org.opensubsystems.patterns.listdata.data.ListOptions |
m_mainCategoryOptions
Option data for the list of main categories. |
protected org.eclipse.swt.widgets.Button |
m_missingItemsButton
Button to show missing items - that which the user didn't return on time |
protected org.opensubsystems.core.application.ThickClientModule |
m_module
Module displaying this table. |
protected org.eclipse.swt.widgets.Button |
m_nextMainCategories
Button to display next main categories. |
protected org.eclipse.swt.widgets.Button |
m_nextSubCategories
Button to display next subcategories. |
protected org.eclipse.swt.widgets.Button |
m_permanentItemsButton
Button to show permanent items |
protected java.lang.Integer[] |
m_permFilterState
Current permanent button state |
protected org.eclipse.swt.widgets.Button |
m_previousMainCategories
Button to display previous main categories. |
protected org.eclipse.swt.widgets.Button |
m_previousSubCategories
Button to display previous subcategories. |
protected org.eclipse.swt.widgets.Button |
m_recentItemsButton
Button to show recent items - that with order in last 24 hours. |
protected org.eclipse.swt.widgets.Label |
m_selectedCategoriesLabel
Label displaying selected categories. |
protected java.util.Map |
m_selectedMainCategories
What categories are selected in the list. |
protected java.util.Map |
m_selectedSubCategories
What subcategories are selected in the list. |
protected java.util.Set |
m_setListeners
Set where all listeners listening to the event notifications specific to this object are stored. |
protected org.eclipse.swt.widgets.Button |
m_shippedItemsButton
Button to show only shipped items. |
protected int[] |
m_showButtonsState
variable with current show status. |
protected int |
m_specialFlags
Variable for special flags, it is combination of SF_XXX values. |
protected org.opensubsystems.patterns.listdata.data.ListOptions |
m_subCategoryOptions
Option data for the list of subcategories. |
protected org.eclipse.swt.widgets.Composite |
m_subCategoryRow
Control which contains buttons for subcategories. |
protected org.eclipse.swt.widgets.Table |
m_table
Table with list of items. |
static int |
MAIN_CATEGORY_COLUMNS
How many columns to display categories in. |
static int |
MAIN_CATEGORY_COUNT
How many main categories do we display above the list. |
static int |
MAX_FIND_LENGTH_TEXT
Maximal length of text user can search for. |
static int |
SF_ISSUED
Do not create Show Issued button. |
static int |
SF_NOMISSING
Do not create Show Missing button. |
static int |
SF_NONE
No special flags value. |
static int |
SF_NORECENT
Do not create Show Recent button. |
static int |
SF_PERMANENT
Do not create Show Permanent button. |
static int |
SHOW_ALL
constant for show all items status. |
static int |
SHOW_DEFAULT
constant for show all items status. |
static int |
SHOW_ISSUED
constant for show shipped items status. |
static int |
SHOW_MISSING
constant for show missing items status. |
static int |
SHOW_NONE
No filter is selected. |
static int |
SHOW_RECENT
constant for show recent items status. |
static int |
SHOW_SHIPPED
constant for show shipped items status. |
static int |
SUB_CATEGORY_COUNT
How many subcategories do we display above the list. |
| Fields inherited from class org.eclipse.swt.widgets.Composite |
|---|
embeddedHandle |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
|---|
handle |
| Constructor Summary | |
|---|---|
CategorizedItemsTable(org.eclipse.swt.widgets.Composite parent,
org.opensubsystems.core.application.ThickClientModule module,
Inventory defaultInventory,
java.util.Map selectedCategories,
java.util.Map selectedSubCategories,
int[] showState,
int specialFlags,
int displayedDataType,
java.lang.Integer[] permFilterState)
Constructor |
|
| Method Summary | |
|---|---|
void |
addCategorizedItemsTableListener(CategorizedItemsTableListener listener)
Add listener for this dialog. |
protected void |
allItemsButton()
All button pressed |
protected void |
categoriesLoaded(boolean isEmpty)
Called when categories are loaded from db |
protected void |
findItems()
Find in either all items or in the current category |
protected org.opensubsystems.patterns.listdata.logic.ListController |
getListController()
Get list controller to use. |
int |
getSelectedCategoryId()
Get selected category id or DataObject.NEW_ID if subcategory isn't selected. |
int |
getSelectedSubcategoryId()
Get selected subcategory id or DataObject.NEW_ID if subcategory isn't selected. |
org.eclipse.swt.widgets.Table |
getTable()
Get table displaying the items |
protected boolean |
isPermanentState()
Get current permanent button state. |
protected void |
issuedItemsButton()
Issued button pressed |
protected abstract void |
loadItems()
Load items asynchronously. |
protected void |
loadMainCategories()
Load categories to the main category controls. |
protected void |
loadNextMainCategories()
Load next page of categories to the main category controls. |
protected void |
loadNextSubcategories()
Load next page of categories to the subcategory controls. |
protected void |
loadPreviousMainCategories()
Load previous page of categories to the main category controls. |
protected void |
loadPreviousSubcategories()
Load previous page of categories to the subcategory controls. |
protected void |
loadSubcategories()
Load subcategories to the subcategory controls. |
protected void |
missingItemsButton()
Recent button pressed |
protected void |
notifyCategorySelected(int categoryId)
Notification function |
protected void |
permanentItemsButton()
Permanent button pressed |
protected void |
recentItemsButton()
Recent button pressed |
void |
removeCategorizedItemsTableListener(CategorizedItemsTableListener listener)
Remove listener from this ncharacter pad. |
protected void |
setTableLabel()
Set label above the table describing what kind of items does the table contains. |
protected void |
shippedItemsButton()
Shipped button pressed |
protected void |
showAllCategories()
Show all categories. |
protected void |
showAllSubCategories()
Show all subcategories. |
boolean |
stopLoading(org.opensubsystems.patterns.listdata.util.AsyncDataLoader loader)
|
protected void |
updateMainCategoryControls(java.lang.Object[] data)
Update main category controls with the category data loaded using list interface |
protected boolean |
updateMainCategoryControlState(org.eclipse.swt.widgets.Button mainCategoryButton)
Update state of the main category control after user selected some main category. |
protected void |
updateSubCategoryControls(java.lang.Object[] data)
Update subcategory controls with the category data loaded using list interface. |
protected boolean |
updateSubCategoryControlState(org.eclipse.swt.widgets.Button subCategoryButton)
Update state of the subcategory control after user selected some sub category. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, computeSize, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opensubsystems.patterns.listdata.util.AsyncDataLoaderOwner |
|---|
allDataLoaded, getInitialListOptions, processData |
| Field Detail |
|---|
public static final java.lang.String[] FIND_BUTTONS
public static final int MAX_FIND_LENGTH_TEXT
public static final int SF_NONE
public static final int SF_NORECENT
public static final int SF_NOMISSING
public static final int SF_PERMANENT
public static final int SF_ISSUED
public static final int DISPLAY_UNKNOVN
public static final int DISPLAY_INVENTORY
public static final int DISPLAY_ISSUED
public static final int DISPLAY_ISSUED_WITHOUT_FILTERS
public static final int MAIN_CATEGORY_COLUMNS
public static final int MAIN_CATEGORY_COUNT
public static final int SUB_CATEGORY_COUNT
public static final int SHOW_NONE
public static final int SHOW_RECENT
public static final int SHOW_SHIPPED
public static final int SHOW_MISSING
public static final int SHOW_ALL
public static final int SHOW_ISSUED
public static final int SHOW_DEFAULT
protected org.opensubsystems.core.application.ThickClientModule m_module
protected org.opensubsystems.patterns.listdata.util.AsyncDataLoader m_loader
protected org.eclipse.swt.widgets.Button[] m_arMainCategoryButtons
protected org.eclipse.swt.widgets.Button m_allMainCategories
protected org.eclipse.swt.widgets.Button m_previousMainCategories
protected org.eclipse.swt.widgets.Button m_nextMainCategories
protected org.eclipse.swt.widgets.Button[] m_arSubCategoryButtons
protected org.eclipse.swt.widgets.Button m_allSubCategories
protected org.eclipse.swt.widgets.Button m_previousSubCategories
protected org.eclipse.swt.widgets.Button m_nextSubCategories
protected org.eclipse.swt.widgets.Button m_allItemsButton
protected org.eclipse.swt.widgets.Button m_shippedItemsButton
protected org.eclipse.swt.widgets.Button m_issuedItemsButton
protected org.eclipse.swt.widgets.Button m_recentItemsButton
protected org.eclipse.swt.widgets.Button m_missingItemsButton
protected org.eclipse.swt.widgets.Button m_findItemsButton
protected org.eclipse.swt.widgets.Button m_permanentItemsButton
protected org.opensubsystems.patterns.listdata.data.ListOptions m_mainCategoryOptions
protected org.opensubsystems.patterns.listdata.data.ListOptions m_subCategoryOptions
protected java.util.Map m_selectedMainCategories
protected java.util.Map m_selectedSubCategories
protected org.eclipse.swt.widgets.Label m_selectedCategoriesLabel
protected Inventory m_defaultInventory
protected org.eclipse.swt.widgets.Composite m_categoryRow
protected org.eclipse.swt.widgets.Composite m_subCategoryRow
protected org.eclipse.swt.widgets.Table m_table
protected int[] m_showButtonsState
protected java.lang.String m_likeText
protected int m_displayedDataType
protected org.eclipse.swt.widgets.Button m_extraFiltersButton
protected java.lang.Integer[] m_permFilterState
protected java.util.Set m_setListeners
protected int m_specialFlags
| Constructor Detail |
|---|
public CategorizedItemsTable(org.eclipse.swt.widgets.Composite parent,
org.opensubsystems.core.application.ThickClientModule module,
Inventory defaultInventory,
java.util.Map selectedCategories,
java.util.Map selectedSubCategories,
int[] showState,
int specialFlags,
int displayedDataType,
java.lang.Integer[] permFilterState)
throws org.opensubsystems.core.error.OSSException
parent - - who is parent of this screenmodule - - module displaying this tabledefaultInventory - - Inventory which is used in the system.selectedCategories - - what categories are selected in the list
of items. Key is the id, category is the value;selectedSubCategories - - what subcategories are selected in the list
of items. Key is the id, category is the
value.showState - - which show button will be togled
one of DISPLAY_UNKNOVN,
SHOW_RECENT,
SHOW_SHIPPED,
SHOW_MISSING,
SHOW_ALL,
SHOW_DEFAULTspecialFlags - - combination of special flags (SF_XXXX)displayedDataType - - displayed data type constant.
One of DISPLAY_UNKNOVN,
DISPLAY_INVENTORY,
DISPLAY_ISSUED,
DISPLAY_ISSUED_WITHOUT_FILTERSpermFilterState - - permanent button state
org.opensubsystems.core.error.OSSException - - an error initializing the screen| Method Detail |
|---|
public boolean stopLoading(org.opensubsystems.patterns.listdata.util.AsyncDataLoader loader)
stopLoading in interface org.opensubsystems.patterns.listdata.util.AsyncDataLoaderOwnerpublic org.eclipse.swt.widgets.Table getTable()
protected boolean isPermanentState()
public void addCategorizedItemsTableListener(CategorizedItemsTableListener listener)
listener - - listener to addpublic void removeCategorizedItemsTableListener(CategorizedItemsTableListener listener)
listener - - listener to removepublic int getSelectedSubcategoryId()
public int getSelectedCategoryId()
protected void loadMainCategories()
throws org.opensubsystems.core.error.OSSException
org.opensubsystems.core.error.OSSException - - an error loading categoriesprotected void loadPreviousMainCategories()
protected void loadNextMainCategories()
protected void updateMainCategoryControls(java.lang.Object[] data)
data - - data loaded using ListControllerImplprotected boolean updateMainCategoryControlState(org.eclipse.swt.widgets.Button mainCategoryButton)
mainCategoryButton - - button representing main category
protected void showAllCategories()
protected void setTableLabel()
protected void showAllSubCategories()
protected void loadSubcategories()
throws org.opensubsystems.core.error.OSSException
org.opensubsystems.core.error.OSSException - - an error loading categoriesprotected void loadPreviousSubcategories()
protected void loadNextSubcategories()
protected void updateSubCategoryControls(java.lang.Object[] data)
data - - data loaded using ListControllerImplprotected void findItems()
protected void allItemsButton()
protected void shippedItemsButton()
protected void recentItemsButton()
protected void permanentItemsButton()
protected void issuedItemsButton()
protected void missingItemsButton()
protected boolean updateSubCategoryControlState(org.eclipse.swt.widgets.Button subCategoryButton)
subCategoryButton - - button representing subcategory
protected abstract void loadItems()
protected void notifyCategorySelected(int categoryId)
categoryId - - id of selected category or DataObject.NEW_ID for allprotected void categoriesLoaded(boolean isEmpty)
isEmpty - - true if db are no categories
protected org.opensubsystems.patterns.listdata.logic.ListController getListController()
throws org.opensubsystems.core.error.OSSException
org.opensubsystems.core.error.OSSException - - an error has occured
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||