|
|||||||||
| Home >> All >> com >> paradoxpoint >> libitina >> [ monument overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.paradoxpoint.libitina.monument
Class AbstractItem

java.lang.Objectcom.paradoxpoint.libitina.monument.AbstractItem
- All Implemented Interfaces:
- Item, PositionBias, java.io.Serializable
- public abstract class AbstractItem
- extends java.lang.Object
- implements Item
- extends java.lang.Object
Abstract class representing an item in a Monument.
| Field Summary | |
protected boolean |
bias
|
protected boolean |
editable
|
protected java.lang.String |
name
|
protected int |
positionBias
|
protected java.beans.PropertyChangeSupport |
propertySupport
|
protected boolean |
visible
|
| Constructor Summary | |
protected |
AbstractItem(java.lang.String name)
Creates an item with the specified name |
protected |
AbstractItem(java.lang.String name,
int positionBias)
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers PropertyChangeListener to receive events. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
void |
firePropertyChange(java.beans.PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. |
void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
Report a boolean bound property update to any registered listeners. |
void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
Report an int bound property update to any registered listeners. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Report a bound property update to any registered listeners. |
java.lang.String |
getName()
Getter for property name. |
int |
getPositionBias()
Getter for property preferredPosition. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the listeners that were added to the PropertyChangeSupport object with addPropertyChangeListener(). |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns an array of all the listeners which have been associated with the named property. |
boolean |
hasBias()
Getter for property preference. |
boolean |
hasListeners(java.lang.String propertyName)
Check if there are any listeners for a specific property. |
boolean |
isEditable()
Getter for property editable. |
boolean |
isVisible()
Getter for property visible. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
setEditable(boolean editable)
Setter for property editable. |
void |
setVisible(boolean visible)
Setter for property visible. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
propertySupport
protected java.beans.PropertyChangeSupport propertySupport
name
protected java.lang.String name
positionBias
protected int positionBias
bias
protected boolean bias
visible
protected boolean visible
editable
protected boolean editable
| Constructor Detail |
AbstractItem
protected AbstractItem(java.lang.String name)
- Creates an item with the specified name
AbstractItem
protected AbstractItem(java.lang.String name, int positionBias)
| Method Detail |
getName
public java.lang.String getName()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getPositionBias
public int getPositionBias()
- Getter for property preferredPosition.
- Specified by:
getPositionBiasin interfacePositionBias
hasBias
public boolean hasBias()
- Getter for property preference.
- Specified by:
hasBiasin interfacePositionBias
isVisible
public boolean isVisible()
- Description copied from interface:
Item - Getter for property visible.
setVisible
public void setVisible(boolean visible)
- Description copied from interface:
Item - Setter for property visible.
- Specified by:
setVisiblein interfaceItem
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Registers PropertyChangeListener to receive events.
- Specified by:
addPropertyChangeListenerin interfaceItem
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Removes PropertyChangeListener from the list of listeners.
- Specified by:
removePropertyChangeListenerin interfaceItem
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
- Add a PropertyChangeListener for a specific property. The listener
will be invoked only when a call on firePropertyChange names that
specific property.
- Specified by:
addPropertyChangeListenerin interfaceItem
firePropertyChange
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
- Report a bound property update to any registered listeners.
No event is fired if old and new are equal and non-null.
firePropertyChange
public void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
- Report an int bound property update to any registered listeners.
No event is fired if old and new are equal and non-null.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
firePropertyChange
public void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
- Report a boolean bound property update to any registered listeners.
No event is fired if old and new are equal and non-null.
This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.
firePropertyChange
public void firePropertyChange(java.beans.PropertyChangeEvent evt)
- Fire an existing PropertyChangeEvent to any registered listeners.
No event is fired if the given event's old and new values are
equal and non-null.
getPropertyChangeListeners
public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
- Returns an array of all the listeners that were added to the
PropertyChangeSupport object with addPropertyChangeListener().
If some listeners have been added with a named property, then the returned array will be a mixture of PropertyChangeListeners and
PropertyChangeListenerProxys. If the calling method is interested in distinguishing the listeners then it must test each element to see if it's aPropertyChangeListenerProxy, perform the cast, and examine the parameter.PropertyChangeListener[] listeners = bean.getPropertyChangeListeners(); for (int i = 0; i < listeners.length; i++) { if (listeners[i] instanceof PropertyChangeListenerProxy) { PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy)listeners[i]; if (proxy.getPropertyName().equals("foo")) { // proxy is a PropertyChangeListener which was associated // with the property named "foo" } } }- Since:
- 1.4
getPropertyChangeListeners
public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
- Returns an array of all the listeners which have been associated
with the named property.
hasListeners
public boolean hasListeners(java.lang.String propertyName)
- Check if there are any listeners for a specific property.
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
- Remove a PropertyChangeListener for a specific property.
- Specified by:
removePropertyChangeListenerin interfaceItem
isEditable
public boolean isEditable()
- Getter for property editable.
- Specified by:
isEditablein interfaceItem
setEditable
public void setEditable(boolean editable)
- Setter for property editable.
- Specified by:
setEditablein interfaceItem
|
|||||||||
| Home >> All >> com >> paradoxpoint >> libitina >> [ monument overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.paradoxpoint.libitina.monument.AbstractItem