|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fdda.model.impl.WorkingPart
The implementation of WorkingPart and PropertyHolder, superclass of both Node and Connection. Is also a PropertyListener to react to user changes of the 'working' property.
PropertyHolder
Field Summary | |
protected WorkingPart |
graphicalRepresentation
the graphical representation of the part |
Fields inherited from interface fdda.model.WorkingPart |
WORKING_PROPERTY_NAME |
Constructor Summary | |
WorkingPart(boolean working,
WorkingPart graphicalRepresentation)
Constructor. |
Method Summary | |
void |
addProperty(Property property)
Adds a property to the holder. |
void |
addPropertyListener(PropertyListener listener)
Adds a PropertyListener (Observer pattern). |
void |
changeProperty(Property property)
Changes a property of the holder - i.e., replaces the property with the name of the parameter property with the parameter. |
protected void |
firePropertyAdded(Property property)
Notifies the listeners that a property has been added. |
void |
firePropertyChanged(Property property)
Informs the listeners that a property has been changed. |
protected void |
firePropertyRemoved(Property property)
Notifies the listeners that a property has been removed. |
Iterator |
getProperties()
Returns an Iterator over the properties of the holder. |
Property |
getProperty(String name)
Returns a property of the holder. |
boolean |
isWorking()
Returns whether the part is currently working. |
void |
propertyAdded(PropertyEvent pe)
Called whenever a property is added to the PropertyHolder. |
void |
propertyChanged(PropertyEvent pe)
Called whenever a property of the PropertyHolder is changed. |
void |
propertyRemoved(PropertyEvent pe)
Called whenever a property is removed from the PropertyHolder. |
void |
removeProperty(Property property)
Removes a property from the holder. |
void |
removePropertyListener(PropertyListener listener)
Removes a PropertyListener (Observer pattern). |
void |
setWorking(boolean working)
Sets whether the part is currently working. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected WorkingPart graphicalRepresentation
Constructor Detail |
public WorkingPart(boolean working, WorkingPart graphicalRepresentation)
working
- whether the part is currently workinggraphicalRepresentation
- the graphical representationMethod Detail |
public boolean isWorking()
WorkingPart
isWorking
in interface WorkingPart
public final void setWorking(boolean working)
WorkingPart
setWorking
in interface WorkingPart
working
- whether the part is workingpublic Iterator getProperties()
PropertyHolder
getProperties
in interface PropertyHolder
public Property getProperty(String name)
PropertyHolder
getProperty
in interface PropertyHolder
name
- the name of the property
public void addProperty(Property property)
PropertyHolder
addProperty
in interface PropertyHolder
public void removeProperty(Property property)
PropertyHolder
removeProperty
in interface PropertyHolder
property
- the property to be removed, must not be nullpublic void changeProperty(Property property)
PropertyHolder
changeProperty
in interface PropertyHolder
property
- the new property, must not be nullpublic void addPropertyListener(PropertyListener listener)
PropertyHolder
addPropertyListener
in interface PropertyHolder
listener
- the listener to be addedEventListenerList
public void removePropertyListener(PropertyListener listener)
PropertyHolder
removePropertyListener
in interface PropertyHolder
listener
- the listener to be removedEventListenerList
public void firePropertyChanged(Property property)
PropertyHolder
firePropertyChanged
in interface PropertyHolder
property
- the property that was changed.protected void firePropertyAdded(Property property)
property
- the added propertyEventListenerList
protected void firePropertyRemoved(Property property)
property
- the added propertyEventListenerList
public void propertyChanged(PropertyEvent pe)
PropertyListener
propertyChanged
in interface PropertyListener
pe
- the PropertyEventpublic void propertyAdded(PropertyEvent pe)
PropertyListener
propertyAdded
in interface PropertyListener
pe
- the PropertyEventpublic void propertyRemoved(PropertyEvent pe)
PropertyListener
propertyRemoved
in interface PropertyListener
pe
- the PropertyEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |