com.ctreber.aclib.gui.MonitoredObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml Show documentation
Show all versions of plantuml Show documentation
PlantUML is a component that allows to quickly write :
* sequence diagram,
* use case diagram,
* class diagram,
* activity diagram,
* component diagram,
* state diagram
* object diagram
The newest version!
package com.ctreber.aclib.gui;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
*
*
*
*
* © 2002 Christian Treber, [email protected]
*
*
* @author Christian Treber, [email protected]
*
*/
abstract public class MonitoredObject {
private List fListeners = new ArrayList();
public void addChangeListener(MOChangeListener pListener) {
fListeners.add(pListener);
}
public void removeChangeListener(MOChangeListener pListener) {
fListeners.remove(pListener);
}
void fireValueChanged() {
final Iterator lIt = fListeners.iterator();
while (lIt.hasNext()) {
MOChangeListener lListener = (MOChangeListener) lIt.next();
lListener.valueChanged(this);
}
}
/**
*
* Check value agains (possibly defined) constraints.
*
* @return True if value is within range or range is not checked.
*/
abstract public boolean checkRange();
}