: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
On-line Demo
Further Plans
Docs
API
FAQ
Download
Latest version

Home > GDP > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

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.


Field Summary
protected  LwComponent target
           
 
Constructor Summary
Controller(LwComponent target)
          Constructs a new controller with the specified target component.
 
Method Summary
 LwComponent getTarget()
          Gets the current target component.
 void setTarget(LwComponent c)
          Sets the specified target component.
protected abstract  void targetWasChanged(LwComponent newTarget, LwComponent oldTarget)
          The method is called whenever the target component has been changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected LwComponent target
Constructor Detail

Controller

public Controller(LwComponent target)
Constructs a new controller with the specified target component.
Parameters:
target - the specified target component.
Method Detail

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.


: up