|
SalesPoint v3.3 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdata.swing.CountingStockTableModel.Record
public static class CountingStockTableModel.Record
A CountingStockTableModel's record.
The record is basically a combination of a CatalogItem and a number indicating the number of
objects available.
| Field Summary |
|---|
| Fields inherited from interface data.CatalogItem |
|---|
VALUE_PROPERTY |
| Fields inherited from interface data.Nameable |
|---|
NAME_PROPERTY |
| Constructor Summary | |
|---|---|
CountingStockTableModel.Record(CatalogItem ci,
int nCount)
Create a new Record. |
|
| Method Summary | |
|---|---|
void |
addNameListener(PropertyChangeListener pcl)
Add a PropertyChangeListener that will receive events whenever the "name" property changes. |
void |
addPropertyChangeListener(PropertyChangeListener pcl)
Register a listener to receive events whenever propertiy changes. |
void |
addValueListener(PropertyChangeListener pcl)
Add a PropertyChangeListener that will receive events whenever the "value" property changes. |
NameContext |
attach(NameContext nc)
Attach a NameContext to this Nameable. |
int |
compareTo(CountingStockTableModel.Record r)
Compare by descriptor. |
int |
compareTo(Object arg0)
|
NameContext |
detachNC()
Detach the current NameContext from this Nameable. |
Catalog |
getCatalog()
Get the Catalog that currently contains this CatalogItem. |
int |
getCount()
Get the number of items in this record. |
CatalogItem |
getDescriptor()
Get the CatalogItem describing the items represented by this record. |
String |
getName()
Get the name of this Nameable object. |
Value |
getValue()
Get the default value of this CatalogItem. |
void |
removeNameListener(PropertyChangeListener pcl)
Remove a PropertyChangeListener for the "name" property. |
void |
removePropertyChangeListener(PropertyChangeListener pcl)
Stop a listener from receiving events whenever a property changes. |
void |
removeValueListener(PropertyChangeListener pcl)
Remove a PropertyChangeListener for the "value" property. |
void |
setName(String sName,
DataBasket db)
Set the Nameable's name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CountingStockTableModel.Record(CatalogItem ci,
int nCount)
| Method Detail |
|---|
public int compareTo(CountingStockTableModel.Record r)
public CatalogItem getDescriptor()
public int getCount()
public void addNameListener(PropertyChangeListener pcl)
Nameable
addNameListener in interface Nameablepublic void addPropertyChangeListener(PropertyChangeListener pcl)
Nameable
addPropertyChangeListener in interface Nameablepublic void addValueListener(PropertyChangeListener pcl)
CatalogItem
addValueListener in interface CatalogItempublic NameContext attach(NameContext nc)
NameableNo naming conventions are checked neither in the old nor in the new NameContext.
attach in interface Nameablenc - the new NameContext of this Nameable object.
public int compareTo(Object arg0)
compareTo in interface Comparable<Object>public NameContext detachNC()
Nameable
detachNC in interface Nameablepublic Catalog getCatalog()
CatalogItem
getCatalog in interface CatalogItempublic String getName()
Nameable
getName in interface Nameablepublic Value getValue()
CatalogItemCatalogItemValue adapter.
getValue in interface CatalogItempublic void removeNameListener(PropertyChangeListener pcl)
Nameable
removeNameListener in interface Nameablepublic void removePropertyChangeListener(PropertyChangeListener pcl)
Nameable
removePropertyChangeListener in interface Nameablepublic void removeValueListener(PropertyChangeListener pcl)
CatalogItem
removeValueListener in interface CatalogItem
public void setName(String sName,
DataBasket db)
throws NameContextException
NameablesetName() must implement the following protocol (Let nc be the Nameable's
current NameContext):
if (nc != null) {
synchronized (nc.getNCMonitor()) {
nc.checkNameChange (db, getName(), sName);
// set the internal name attribute(s), leaving old name in sOldName
nc.nameHasChanged (db, sOldName, getName());
}
}
else {
// set the internal name attribute(s)
}
setName in interface NameablesName - the new name of the objectdb - the DataBasket relative to which the operation is to be performed.
NameContextException - if the name change was not approved of by the NameContext.NameContext
|
SalesPoint v3.3 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||