org.zaval.lw.gdp
Class Controller
java.lang.Object
|
+--org.zaval.lw.gdp.Controller
- Direct Known Subclasses:
- DgnController, ShapeController
- public abstract class Controller
- extends java.lang.Object
This abstract class is a base for classes that want to control behaviour different
lightweight components. The controlled component is defined as a target
component and can be specified by the setTarget method.
|
Constructor Summary |
Controller(LwComponent target)
Constructs a new controller with the specified target component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
protected LwComponent target
Controller
public Controller(LwComponent target)
- Constructs a new controller with the specified target component.
- Parameters:
target - the specified target component.
setTarget
public void setTarget(LwComponent c)
- Sets the specified target component.
- Parameters:
c - the specified target component.
getTarget
public LwComponent getTarget()
- Gets the current target component.
- Returns:
- a current target component.
targetWasChanged
protected abstract void targetWasChanged(LwComponent newTarget,
LwComponent oldTarget)
- The method is called whenever the target component has been changed. Use the method
to remove appropriate listeners for the old target instance and set a new listener set
for the new target component.
- Parameters:
newTarget - the specified new target component.oldTarget - the specified old target component.
|