|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.inventory.application.swt.ItemUnitPage
public class ItemUnitPage
Unit page of item dialog.
| Field Summary | |
|---|---|
protected org.eclipse.swt.widgets.Button |
m_addButton
Add unit button. |
protected boolean |
m_bConsumable
Cached value of current consumable flag for the item since it affects computation of average cost. |
protected org.eclipse.swt.widgets.Composite |
m_clientArea
Client area containing all the other controls. |
protected double |
m_defaultCost
Default cost value for newly created units. |
protected org.eclipse.swt.widgets.Button |
m_editNumberButton
Button for not unique internal number. |
protected org.eclipse.swt.widgets.Label |
m_editNumberLabel
Label for not unique internal number. |
protected org.eclipse.swt.widgets.Text |
m_editNumberText
Edit text for not unique internal number. |
protected ItemDialog |
m_itemDialog
Dialog this gui is representing. |
protected java.util.List |
m_lstUnits
List of all units in table. |
protected org.eclipse.swt.widgets.Button |
m_modifyButton
Modify unit button. |
protected org.eclipse.swt.widgets.Button |
m_removeButton
Remove unit button. |
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.Table |
m_table
Table with units. |
| Constructor Summary | |
|---|---|
ItemUnitPage()
|
|
| Method Summary | |
|---|---|
void |
addItemUnitPageListener(ItemUnitPageListener listener)
Add listener for this dialog. |
org.eclipse.swt.widgets.Composite |
createClientArea(ItemDialog itemDialog,
org.eclipse.swt.widgets.TabFolder tab,
Item itemData,
java.lang.String strInternalNumber)
Create client area of this page. |
int |
getAvailableCount()
Get sum of all available units. |
double |
getAverageCost()
Get average cost of all units. |
java.lang.String |
getInternalNumber()
Get internal number for non uniquely tracked items |
protected org.opensubsystems.patterns.listdata.logic.ListController |
getListController()
Get list controller to use. |
int |
getShippedCount()
Get sum of all shipped units. |
java.util.List |
getUnits()
Get list of units. |
protected void |
loadUnits(int iItemId)
Load all units into a table |
protected void |
notifyAvailableCountChanged(int iCount)
Notify all listeners when average count changes. |
protected void |
notifyAverageCostChanged(double dAverageCost)
Notify all listeners when average cost changes. |
protected void |
notifyShippedCountChanged(int iCount)
Notify all listeners when shipped count changes. |
void |
removeItemUnitPageListener(ItemUnitPageListener listener)
Remove listener from this dialog. |
void |
setConsumable(boolean bConsumable)
Set new consumable state if it has changed. |
protected void |
updateTable()
Update the table based on changes to units. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Set m_setListeners
protected org.eclipse.swt.widgets.Label m_editNumberLabel
protected org.eclipse.swt.widgets.Text m_editNumberText
protected org.eclipse.swt.widgets.Button m_editNumberButton
protected org.eclipse.swt.widgets.Table m_table
protected org.eclipse.swt.widgets.Button m_addButton
protected org.eclipse.swt.widgets.Button m_modifyButton
protected org.eclipse.swt.widgets.Button m_removeButton
protected org.eclipse.swt.widgets.Composite m_clientArea
protected ItemDialog m_itemDialog
protected java.util.List m_lstUnits
protected double m_defaultCost
protected boolean m_bConsumable
| Constructor Detail |
|---|
public ItemUnitPage()
| Method Detail |
|---|
public org.eclipse.swt.widgets.Composite createClientArea(ItemDialog itemDialog,
org.eclipse.swt.widgets.TabFolder tab,
Item itemData,
java.lang.String strInternalNumber)
throws org.opensubsystems.core.error.OSSException
itemDialog - - dialog displaying this pagetab - - control this page belongs toitemData - - item to create or editstrInternalNumber - - internal identification number it this is a non
uniquely tracked item or if the item is not
unitquely tracked, can be null. If this is
a new item it should be the next available
value (of course this is just a suggestion
since the availability can change by the time
they are done)
org.opensubsystems.core.error.OSSException - - an error has occuredpublic void addItemUnitPageListener(ItemUnitPageListener listener)
listener - - listener to addpublic void removeItemUnitPageListener(ItemUnitPageListener listener)
listener - - listener to removepublic java.lang.String getInternalNumber()
public java.util.List getUnits()
public int getShippedCount()
public int getAvailableCount()
public double getAverageCost()
protected void loadUnits(int iItemId)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of the item to load units for
org.opensubsystems.core.error.OSSException - - an error has occuredprotected void updateTable()
public void setConsumable(boolean bConsumable)
bConsumable - - new consumable state of the itemprotected void notifyAverageCostChanged(double dAverageCost)
dAverageCost - - new average costprotected void notifyShippedCountChanged(int iCount)
iCount - - new shipped countprotected void notifyAvailableCountChanged(int iCount)
iCount - - new average count
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 | ||||||||