|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.zaval.awt.gdp.Controller
|
+--org.zaval.awt.gdp.DgnController
This designer controller class that can be used to control size and location for the
specified target component. The controller works as follow:
If a mouse button has been pressed on the target component than the controller
tries to activate the controller. The process is described below:
Use
Starting from the moment it is possible to resize and move the target component
using the mouse.
addDgnControllerListener and removeDgnControllerListener
methods to register or un-register DgnControllerListener. Using the interface it is
possible to listen when the designer controller has been activated or deactivated.
| Constructor Summary | |
DgnController(java.awt.Component target)
Constructs a new designer controller with the specified target component. |
|
| Method Summary | |
void |
addDgnControllerListener(DgnControllerListener l)
Adds the specified designer controller listener. |
static DgnController |
getCurrentDgn()
Returns current active designer controller. |
java.awt.Container |
getDgnContainer()
Gets the designer container that is used with the controller. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
moveTarget(int x,
int y)
Moves the target to the new loaction. |
protected void |
perform(int id)
Performs the designer event with the specified event id. |
void |
removeDgnControllerListener(DgnControllerListener l)
Removes the specified designer controller listener. |
void |
resizeTarget(int w,
int h)
Resizes the target to the specified width and height. |
static void |
stopCurrentDgn()
Deactivates current active designer controller, if it is exist. |
protected void |
targetWasChanged(java.awt.Component n,
java.awt.Component o)
The method is called whenever the target component has been changed. |
| Methods inherited from class org.zaval.awt.gdp.Controller |
getTarget, setTarget |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DgnController(java.awt.Component target)
target - the specified target component.
| Method Detail |
public void addDgnControllerListener(DgnControllerListener l)
l - the specified designer controller listener.
public void removeDgnControllerListener(DgnControllerListener l)
l - the specified designer controller listener.
protected void perform(int id)
id - the specified event id.
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListener
public void moveTarget(int x,
int y)
x - the new x coordinate of the target.y - the new y coordinate of the target.
public void resizeTarget(int w,
int h)
w - the new x coordinate of the target.h - the new y coordinate of the target.
public java.awt.Container getDgnContainer()
public static void stopCurrentDgn()
public static DgnController getCurrentDgn()
protected void targetWasChanged(java.awt.Component n,
java.awt.Component o)
targetWasChanged in class Controllern - the specified new target component.o - the specified old target component.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||