Class TLcdGXYCompositeController
- All Implemented Interfaces:
ILcdGXYController
,ComponentListener
,KeyListener
,MouseListener
,MouseMotionListener
,MouseWheelListener
,Serializable
,EventListener
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.
- Since:
- 8.0
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdGXYCompositeController
with no controllers assigned to delegate to. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGXYController
(ILcdGXYController aGXYController) Adds a newILcdGXYController
to this composite controller.void
Delegates toComponentListener.componentHidden(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.void
Delegates toComponentListener.componentMoved(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.void
Delegates toComponentListener.componentResized(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.void
Delegates toComponentListener.componentShown(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.Returns the cursor of the first added controller, ornull
if no controller is added.getGXYController
(int aIndex) Returns theILcdGXYController
at the given index.int
Returns the number ofILcdGXYController
s in this composite controller.getIcon()
Returns the icon of the first added controller, ornull
if no controller is added.getName()
Returns the name of the first added controller, ornull
if no controller is added.Returns the short description of the first added controller, ornull
if no controller is added.void
Delegates toKeyListener.keyPressed(java.awt.event.KeyEvent)
for each addedILcdGXYController
that implementsKeyListener
.void
Delegates toKeyListener.keyReleased(java.awt.event.KeyEvent)
for each addedILcdGXYController
that implementsKeyListener
.void
Delegates toKeyListener.keyTyped(java.awt.event.KeyEvent)
for each addedILcdGXYController
that implementsKeyListener
.void
Delegates toMouseListener.mouseClicked(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.void
Delegates toMouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseMotionListener
.void
Delegates toMouseListener.mouseEntered(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.void
Delegates toMouseListener.mouseExited(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.void
Delegates toMouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseMotionListener
.void
Delegates toMouseListener.mousePressed(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.void
Delegates toMouseListener.mouseReleased(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.void
Delegates toMouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)
for each addedILcdGXYController
that implementsMouseWheelListener
.void
Delegates toILcdGXYController.paint(java.awt.Graphics)
for each addedILcdGXYController
.void
removeGXYController
(int aIndex) Removes theILcdGXYController
at the given index.void
startInteraction
(ILcdGXYView aGXYView) Delegates toILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
for each addedILcdGXYController
.void
terminateInteraction
(ILcdGXYView aGXYView) Delegates toILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
for each addedILcdGXYController
.void
viewRepaint
(ILcdGXYView aGXYView) Delegates toILcdGXYController.viewRepaint(com.luciad.view.gxy.ILcdGXYView)
for each addedILcdGXYController
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.view.gxy.ILcdGXYController
getLayered
-
Constructor Details
-
TLcdGXYCompositeController
public TLcdGXYCompositeController()Constructs a newTLcdGXYCompositeController
with no controllers assigned to delegate to.The controller can be populated with
ILcdGXYController
objects usingaddGXYController(com.luciad.view.gxy.ILcdGXYController)
-
-
Method Details
-
addGXYController
Adds a newILcdGXYController
to this composite controller. This should only be done when the composite controller is not active on a view.- Parameters:
aGXYController
- A newILcdGXYController
to add.
-
getGXYController
Returns theILcdGXYController
at the given index.- Parameters:
aIndex
- the index of theILcdGXYController
to retrieve.- Returns:
- the
ILcdGXYController
at the given index.
-
removeGXYController
public void removeGXYController(int aIndex) Removes theILcdGXYController
at the given index. This should only be done when the composite controller is not active on a view.- Parameters:
aIndex
- the index of theILcdGXYController
to remove.
-
getGXYControllerCount
public int getGXYControllerCount()Returns the number ofILcdGXYController
s in this composite controller.- Returns:
- the number of
ILcdGXYController
s in this composite controller.
-
getCursor
Returns the cursor of the first added controller, ornull
if no controller is added.- Specified by:
getCursor
in interfaceILcdGXYController
- Returns:
- the cursor of the first added controller, or
null
if no controller is added.
-
getName
Returns the name of the first added controller, ornull
if no controller is added.- Specified by:
getName
in interfaceILcdGXYController
- Returns:
- the name of the first added controller, or
null
if no controller is added.
-
getShortDescription
Returns the short description of the first added controller, ornull
if no controller is added.- Specified by:
getShortDescription
in interfaceILcdGXYController
- Returns:
- the short description of the first added controller, or
null
if no controller is added.
-
getIcon
Returns the icon of the first added controller, ornull
if no controller is added.- Specified by:
getIcon
in interfaceILcdGXYController
- Returns:
- the icon of the first added controller, or
null
if no controller is added.
-
startInteraction
Delegates to
ILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
for each addedILcdGXYController
.- Specified by:
startInteraction
in interfaceILcdGXYController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
will interact with.- See Also:
-
terminateInteraction
Delegates to
ILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
for each addedILcdGXYController
.- Specified by:
terminateInteraction
in interfaceILcdGXYController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
interacted with.- See Also:
-
viewRepaint
Delegates to
ILcdGXYController.viewRepaint(com.luciad.view.gxy.ILcdGXYView)
for each addedILcdGXYController
.- Specified by:
viewRepaint
in interfaceILcdGXYController
- Parameters:
aGXYView
- theILcdGXYView
to draw on.
-
paint
Delegates to
ILcdGXYController.paint(java.awt.Graphics)
for each addedILcdGXYController
.- Specified by:
paint
in interfaceILcdGXYController
- Parameters:
aGraphics
- the Graphics to paint on.
-
componentResized
Delegates to
ComponentListener.componentResized(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.- Specified by:
componentResized
in interfaceComponentListener
-
componentMoved
Delegates to
ComponentListener.componentMoved(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.- Specified by:
componentMoved
in interfaceComponentListener
-
componentShown
Delegates to
ComponentListener.componentShown(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.- Specified by:
componentShown
in interfaceComponentListener
-
componentHidden
Delegates to
ComponentListener.componentHidden(java.awt.event.ComponentEvent)
for each addedILcdGXYController
that implementsComponentListener
.- Specified by:
componentHidden
in interfaceComponentListener
-
keyTyped
Delegates to
KeyListener.keyTyped(java.awt.event.KeyEvent)
for each addedILcdGXYController
that implementsKeyListener
.- Specified by:
keyTyped
in interfaceKeyListener
-
keyPressed
Delegates to
KeyListener.keyPressed(java.awt.event.KeyEvent)
for each addedILcdGXYController
that implementsKeyListener
.- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
Delegates to
KeyListener.keyReleased(java.awt.event.KeyEvent)
for each addedILcdGXYController
that implementsKeyListener
.- Specified by:
keyReleased
in interfaceKeyListener
-
mouseClicked
Delegates to
MouseListener.mouseClicked(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
Delegates to
MouseListener.mousePressed(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
Delegates to
MouseListener.mouseReleased(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
Delegates to
MouseListener.mouseEntered(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
Delegates to
MouseListener.mouseExited(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseListener
.- Specified by:
mouseExited
in interfaceMouseListener
-
mouseDragged
Delegates to
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseMotionListener
.- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mouseMoved
Delegates to
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
for each addedILcdGXYController
that implementsMouseMotionListener
.- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseWheelMoved
Delegates to
MouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)
for each addedILcdGXYController
that implementsMouseWheelListener
.- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
-