|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.replication.unit.UsageMasterItem
UsageMasterItem is a model class for manipulating WTPartUsageLinks.
UsageMasterItem implements the wt.explorer.Explorable interface to allow for use in the WTExplorer.
It contains many methods which it delegates to the contained uses PartMasterItem to allow for easy integration with the PartExplorer.
Supported API: false
Extendable: false
WTExplorer
,
PartMasterItem
,
wt.clients.replication.unit.PartExplorer
,
WTPartUsageLink
Field Summary | |
private String |
id
|
private boolean |
modified
|
private static int |
newUsageCounter
|
private double |
quantity
|
private QuantityUnit |
unit
|
private WTPartUsageLink |
usageLink
|
private PartMasterItem |
uses
|
Constructor Summary | |
UsageMasterItem()
Create an empty usage item. |
|
UsageMasterItem(PartMasterItem uses,
WTPartUsageLink usage_link)
Create a usage item between the specified part items using the specified usage link. |
Method Summary | |
Explorable[] |
getContents()
Return the contents of the uses part item |
String |
getId()
Get an identifier for this object. |
String |
getIdentity()
Return the identity icon of the uses part item |
String |
getName()
Get the name of the uses part. |
String |
getNumber()
Get the number of the uses part. |
Object |
getObject()
Get the contained object. |
Image |
getOpenIcon()
Return the open icon of the uses part item |
WTPartUsageLink |
getPartUsageLink()
Get the contained usage link. |
double |
getQuantity()
Get the quantity amount in the usage link |
String |
getQuantityString()
|
Image |
getStandardIcon()
Gets the image to display for this object. |
String |
getUniqueIdentity()
Return the unique identity icon of the uses part item |
String |
getUnitName()
Get a string representation of the units |
QuantityUnit |
getUnits()
Get the units for the quantity. |
Explorable[] |
getUses()
Return the objects used by the uses part item. |
PartMasterItem |
getUsesPart()
Get the uses part item |
boolean |
isModified()
Return the modified flag |
void |
setModified(boolean modified_flag)
Set the modified flag. |
void |
setObject(Object obj)
Set the contained object. |
void |
setPartUsageLink(WTPartUsageLink usage_link)
Set the contained usage link. |
void |
setQuantity(double a_quantity)
Set the quantity amount in the usage link. |
void |
setUnit(QuantityUnit a_unit)
Set the units for the quantity. |
void |
setUses(PartMasterItem uses)
Set the uses part item. |
String |
toString()
Return a string with debug information |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private WTPartUsageLink usageLink
private static int newUsageCounter
private boolean modified
private String id
private double quantity
private QuantityUnit unit
private PartMasterItem uses
Constructor Detail |
public UsageMasterItem()
public UsageMasterItem(PartMasterItem uses, WTPartUsageLink usage_link)
uses
- the uses partusage_link
- the actual usage linkMethod Detail |
public void setModified(boolean modified_flag)
modified_flag
- the new value for the modified flagpublic boolean isModified()
public void setPartUsageLink(WTPartUsageLink usage_link)
usage_link
- the usage link to contain.public WTPartUsageLink getPartUsageLink()
public void setUses(PartMasterItem uses)
uses
- the uses part itempublic PartMasterItem getUsesPart()
public String getId()
public void setQuantity(double a_quantity)
a_quantity
- the amountpublic String getQuantityString()
public double getQuantity()
public void setUnit(QuantityUnit a_unit)
a_unit
- the unit to usepublic QuantityUnit getUnits()
public String getUnitName()
public String toString()
public Explorable[] getUses() throws WTException
getUses
in interface Explorable
WTException
WTException
public Image getStandardIcon()
Identifiable
getStandardIcon
in interface Identifiable
public Image getOpenIcon()
getOpenIcon
in interface Identifiable
public String getIdentity()
getIdentity
in interface Identifiable
public String getUniqueIdentity()
getUniqueIdentity
in interface Identifiable
public Explorable[] getContents() throws WTException
getContents
in interface Explorable
WTException
WTException
public void setObject(Object obj)
Implements the ReferenceHolder interface.
setObject
in interface ReferenceHolder
obj
- the contained objectpublic Object getObject()
Implements the ReferenceHolder interface.
getObject
in interface ReferenceHolder
public String getName()
public String getNumber()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |