|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.salespointframework.desktop.models.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 | |
|---|---|
private CatalogItem |
m_ciDescriptor
The CatalogItem part of the record. |
private int |
m_nCount
The number of actually available items. |
| Fields inherited from interface org.salespointframework.core.data.interfaces.CatalogItem |
|---|
VALUE_PROPERTY |
| Fields inherited from interface org.salespointframework.core.data.interfaces.Nameable |
|---|
NAME_PROPERTY |
| Constructor Summary | |
|---|---|
CountingStockTableModel.Record(CatalogItem ci,
int nCount)
Create a new Record. |
|
| Method Summary | |
|---|---|
void |
addNameListener(java.beans.PropertyChangeListener pcl)
Add a PropertyChangeListener that will receive events whenever the "name" property changes. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Register a listener to receive events whenever propertiy changes. |
void |
addValueListener(java.beans.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(java.lang.Object arg0)
|
NameContext |
detachNC()
Detach the current NameContext from this Nameable. |
void |
firePropertyChanged()
Signals persistence layer to update objects values |
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. |
java.awt.image.BufferedImage |
getImage()
Get the image of the CatalogItem |
java.lang.String |
getName()
Get the name of this Nameable object. |
Value |
getValue()
Get the default value of this CatalogItem. |
void |
removeNameListener(java.beans.PropertyChangeListener pcl)
Remove a PropertyChangeListener for the "name" property. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Stop a listener from receiving events whenever a property changes. |
void |
removeValueListener(java.beans.PropertyChangeListener pcl)
Remove a PropertyChangeListener for the "value" property. |
boolean |
setImage(java.net.URI filename)
Set the image of the CatalogItem |
void |
setName(java.lang.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 |
| Field Detail |
|---|
private CatalogItem m_ciDescriptor
private int m_nCount
| 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(java.beans.PropertyChangeListener pcl)
Nameable
addNameListener in interface Nameablepublic void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Nameable
addPropertyChangeListener in interface Nameablepublic void addValueListener(java.beans.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(java.lang.Object arg0)
compareTo in interface java.lang.Comparable<java.lang.Object>public NameContext detachNC()
Nameable
detachNC in interface Nameablepublic Catalog getCatalog()
CatalogItem
getCatalog in interface CatalogItempublic java.lang.String getName()
Nameable
getName in interface NameablegetName in interface SpItempublic Value getValue()
CatalogItemCatalogItemValue adapter.
getValue in interface CatalogItempublic void removeNameListener(java.beans.PropertyChangeListener pcl)
Nameable
removeNameListener in interface Nameablepublic void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Nameable
removePropertyChangeListener in interface Nameablepublic void removeValueListener(java.beans.PropertyChangeListener pcl)
CatalogItem
removeValueListener in interface CatalogItem
public void setName(java.lang.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.NameContextpublic void firePropertyChanged()
CatalogItem
firePropertyChanged in interface CatalogItempublic java.awt.image.BufferedImage getImage()
CatalogItem
getImage in interface CatalogItempublic boolean setImage(java.net.URI filename)
CatalogItem
setImage in interface CatalogItemfilename - uri, pointing to the image file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||