public class TLcdGXYCompositeController extends Object implements ILcdGXYController, ComponentListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener
ILcdGXYView
, this controller will be registered for the following listener interfaces;
ComponentListener
KeyListener
MouseListener
MouseMotionListener
MouseWheelListener
If the delegate controller does not implement the above interface but implements ILcdAWTEventListener
the event is delegated using that interface.
The properties 'cursor', 'name', 'shortDescription' and 'icon' are used from the first added controller,
and are null
if no controllers were added.
Note that dispatching the same event to multiple controllers might result in the controllers taking contradictory actions.
We recommend to chain
controllers rather than composing them.
ILcdGXYChainableController
,
Serialized FormConstructor and Description |
---|
TLcdGXYCompositeController()
Constructs a new
TLcdGXYCompositeController with no controllers assigned to delegate to. |
Modifier and Type | Method and Description |
---|---|
void |
addGXYController(ILcdGXYController aGXYController)
Adds a new
ILcdGXYController to this composite controller. |
void |
componentHidden(ComponentEvent e)
Delegates to
ComponentListener.componentHidden(java.awt.event.ComponentEvent) for each added ILcdGXYController
that implements ComponentListener . |
void |
componentMoved(ComponentEvent e)
Delegates to
ComponentListener.componentMoved(java.awt.event.ComponentEvent) for each added ILcdGXYController
that implements ComponentListener . |
void |
componentResized(ComponentEvent e)
Delegates to
ComponentListener.componentResized(java.awt.event.ComponentEvent) for each added ILcdGXYController
that implements ComponentListener . |
void |
componentShown(ComponentEvent e)
Delegates to
ComponentListener.componentShown(java.awt.event.ComponentEvent) for each added ILcdGXYController
that implements ComponentListener . |
Cursor |
getCursor()
Returns the cursor of the first added controller, or
null if no controller is added. |
ILcdGXYController |
getGXYController(int aIndex)
Returns the
ILcdGXYController at the given index. |
int |
getGXYControllerCount()
Returns the number of
ILcdGXYController s in this composite controller. |
ILcdIcon |
getIcon()
Returns the icon of the first added controller, or
null if no controller is added. |
String |
getName()
Returns the name of the first added controller, or
null if no controller is added. |
String |
getShortDescription()
Returns the short description of the first added controller, or
null if no controller is added. |
void |
keyPressed(KeyEvent e)
Delegates to
KeyListener.keyPressed(java.awt.event.KeyEvent) for each added ILcdGXYController
that implements KeyListener . |
void |
keyReleased(KeyEvent e)
Delegates to
KeyListener.keyReleased(java.awt.event.KeyEvent) for each added ILcdGXYController
that implements KeyListener . |
void |
keyTyped(KeyEvent e)
Delegates to
KeyListener.keyTyped(java.awt.event.KeyEvent) for each added ILcdGXYController
that implements KeyListener . |
void |
mouseClicked(MouseEvent e)
Delegates to
MouseListener.mouseClicked(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseListener . |
void |
mouseDragged(MouseEvent e)
Delegates to
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseMotionListener . |
void |
mouseEntered(MouseEvent e)
Delegates to
MouseListener.mouseEntered(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseListener . |
void |
mouseExited(MouseEvent e)
Delegates to
MouseListener.mouseExited(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseListener . |
void |
mouseMoved(MouseEvent e)
Delegates to
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseMotionListener . |
void |
mousePressed(MouseEvent e)
Delegates to
MouseListener.mousePressed(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseListener . |
void |
mouseReleased(MouseEvent e)
Delegates to
MouseListener.mouseReleased(java.awt.event.MouseEvent) for each added ILcdGXYController
that implements MouseListener . |
void |
mouseWheelMoved(MouseWheelEvent e)
Delegates to
MouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent) for each added ILcdGXYController
that implements MouseWheelListener . |
void |
paint(Graphics aGraphics)
Delegates to
ILcdGXYController.paint(java.awt.Graphics) for each added ILcdGXYController . |
void |
removeGXYController(int aIndex)
Removes the
ILcdGXYController at the given index. |
void |
startInteraction(ILcdGXYView aGXYView)
Delegates to
ILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView) for each added ILcdGXYController . |
void |
terminateInteraction(ILcdGXYView aGXYView)
Delegates to
ILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView) for each added ILcdGXYController . |
void |
viewRepaint(ILcdGXYView aGXYView)
Delegates to
ILcdGXYController.viewRepaint(com.luciad.view.gxy.ILcdGXYView) for each added ILcdGXYController . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLayered
public TLcdGXYCompositeController()
TLcdGXYCompositeController
with no controllers assigned to delegate to.
The controller can be populated with ILcdGXYController
objects using
addGXYController(com.luciad.view.gxy.ILcdGXYController)
public void addGXYController(ILcdGXYController aGXYController)
ILcdGXYController
to this composite controller.
This should only be done when the composite controller is not active on a view.aGXYController
- A new ILcdGXYController
to add.public ILcdGXYController getGXYController(int aIndex)
ILcdGXYController
at the given index.aIndex
- the index of the ILcdGXYController
to retrieve.ILcdGXYController
at the given index.public void removeGXYController(int aIndex)
ILcdGXYController
at the given index.
This should only be done when the composite controller is not active on a view.aIndex
- the index of the ILcdGXYController
to remove.public int getGXYControllerCount()
ILcdGXYController
s in this composite controller.ILcdGXYController
s in this composite controller.public Cursor getCursor()
null
if no controller is added.getCursor
in interface ILcdGXYController
null
if no controller is added.public String getName()
null
if no controller is added.getName
in interface ILcdGXYController
null
if no controller is added.public String getShortDescription()
null
if no controller is added.getShortDescription
in interface ILcdGXYController
null
if no controller is added.public ILcdIcon getIcon()
null
if no controller is added.getIcon
in interface ILcdGXYController
null
if no controller is added.public void startInteraction(ILcdGXYView aGXYView)
Delegates to ILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
for each added ILcdGXYController
.
startInteraction
in interface ILcdGXYController
aGXYView
- the ILcdGXYView
this ILcdGXYController
will interact with.ILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
,
ILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
public void terminateInteraction(ILcdGXYView aGXYView)
Delegates to ILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
for each added ILcdGXYController
.
terminateInteraction
in interface ILcdGXYController
aGXYView
- the ILcdGXYView
this ILcdGXYController
interacted with.ILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
,
ILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
public void viewRepaint(ILcdGXYView aGXYView)
Delegates to ILcdGXYController.viewRepaint(com.luciad.view.gxy.ILcdGXYView)
for each added ILcdGXYController
.
viewRepaint
in interface ILcdGXYController
aGXYView
- the ILcdGXYView
to draw on.public void paint(Graphics aGraphics)
Delegates to ILcdGXYController.paint(java.awt.Graphics)
for each added ILcdGXYController
.
paint
in interface ILcdGXYController
aGraphics
- the Graphics to paint on.public void componentResized(ComponentEvent e)
Delegates to ComponentListener.componentResized(java.awt.event.ComponentEvent)
for each added ILcdGXYController
that implements ComponentListener
.
componentResized
in interface ComponentListener
public void componentMoved(ComponentEvent e)
Delegates to ComponentListener.componentMoved(java.awt.event.ComponentEvent)
for each added ILcdGXYController
that implements ComponentListener
.
componentMoved
in interface ComponentListener
public void componentShown(ComponentEvent e)
Delegates to ComponentListener.componentShown(java.awt.event.ComponentEvent)
for each added ILcdGXYController
that implements ComponentListener
.
componentShown
in interface ComponentListener
public void componentHidden(ComponentEvent e)
Delegates to ComponentListener.componentHidden(java.awt.event.ComponentEvent)
for each added ILcdGXYController
that implements ComponentListener
.
componentHidden
in interface ComponentListener
public void keyTyped(KeyEvent e)
Delegates to KeyListener.keyTyped(java.awt.event.KeyEvent)
for each added ILcdGXYController
that implements KeyListener
.
keyTyped
in interface KeyListener
public void keyPressed(KeyEvent e)
Delegates to KeyListener.keyPressed(java.awt.event.KeyEvent)
for each added ILcdGXYController
that implements KeyListener
.
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
Delegates to KeyListener.keyReleased(java.awt.event.KeyEvent)
for each added ILcdGXYController
that implements KeyListener
.
keyReleased
in interface KeyListener
public void mouseClicked(MouseEvent e)
Delegates to MouseListener.mouseClicked(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseListener
.
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
Delegates to MouseListener.mousePressed(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseListener
.
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
Delegates to MouseListener.mouseReleased(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseListener
.
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
Delegates to MouseListener.mouseEntered(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseListener
.
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
Delegates to MouseListener.mouseExited(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseListener
.
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent e)
Delegates to MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseMotionListener
.
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
Delegates to MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
for each added ILcdGXYController
that implements MouseMotionListener
.
mouseMoved
in interface MouseMotionListener
public void mouseWheelMoved(MouseWheelEvent e)
Delegates to MouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)
for each added ILcdGXYController
that implements MouseWheelListener
.
mouseWheelMoved
in interface MouseWheelListener