Class TLcdGXYCompositeController
- All Implemented Interfaces:
ILcdGXYController,ComponentListener,KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,Serializable,EventListener
ILcdGXYView, this controller will be registered for the following listener interfaces;
ComponentListenerKeyListenerMouseListenerMouseMotionListenerMouseWheelListener
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
ConstructorsConstructorDescriptionConstructs a newTLcdGXYCompositeControllerwith no controllers assigned to delegate to. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGXYController(ILcdGXYController aGXYController) Adds a newILcdGXYControllerto this composite controller.voidDelegates toComponentListener.componentHidden(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.voidDelegates toComponentListener.componentMoved(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.voidDelegates toComponentListener.componentResized(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.voidDelegates toComponentListener.componentShown(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.Returns the cursor of the first added controller, ornullif no controller is added.getGXYController(int aIndex) Returns theILcdGXYControllerat the given index.intReturns the number ofILcdGXYControllers in this composite controller.getIcon()Returns the icon of the first added controller, ornullif no controller is added.getName()Returns the name of the first added controller, ornullif no controller is added.Returns the short description of the first added controller, ornullif no controller is added.voidDelegates toKeyListener.keyPressed(java.awt.event.KeyEvent)for each addedILcdGXYControllerthat implementsKeyListener.voidDelegates toKeyListener.keyReleased(java.awt.event.KeyEvent)for each addedILcdGXYControllerthat implementsKeyListener.voidDelegates toKeyListener.keyTyped(java.awt.event.KeyEvent)for each addedILcdGXYControllerthat implementsKeyListener.voidDelegates toMouseListener.mouseClicked(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.voidDelegates toMouseMotionListener.mouseDragged(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseMotionListener.voidDelegates toMouseListener.mouseEntered(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.voidDelegates toMouseListener.mouseExited(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.voidDelegates toMouseMotionListener.mouseMoved(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseMotionListener.voidDelegates toMouseListener.mousePressed(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.voidDelegates toMouseListener.mouseReleased(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.voidDelegates toMouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)for each addedILcdGXYControllerthat implementsMouseWheelListener.voidDelegates toILcdGXYController.paint(java.awt.Graphics)for each addedILcdGXYController.voidremoveGXYController(int aIndex) Removes theILcdGXYControllerat the given index.voidstartInteraction(ILcdGXYView aGXYView) Delegates toILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)for each addedILcdGXYController.voidterminateInteraction(ILcdGXYView aGXYView) Delegates toILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)for each addedILcdGXYController.voidviewRepaint(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, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYController
getLayered
-
Constructor Details
-
TLcdGXYCompositeController
public TLcdGXYCompositeController()Constructs a newTLcdGXYCompositeControllerwith no controllers assigned to delegate to.The controller can be populated with
ILcdGXYControllerobjects usingaddGXYController(com.luciad.view.gxy.ILcdGXYController)
-
-
Method Details
-
addGXYController
Adds a newILcdGXYControllerto this composite controller. This should only be done when the composite controller is not active on a view.- Parameters:
aGXYController- A newILcdGXYControllerto add.
-
getGXYController
Returns theILcdGXYControllerat the given index.- Parameters:
aIndex- the index of theILcdGXYControllerto retrieve.- Returns:
- the
ILcdGXYControllerat the given index.
-
removeGXYController
public void removeGXYController(int aIndex) Removes theILcdGXYControllerat the given index. This should only be done when the composite controller is not active on a view.- Parameters:
aIndex- the index of theILcdGXYControllerto remove.
-
getGXYControllerCount
public int getGXYControllerCount()Returns the number ofILcdGXYControllers in this composite controller.- Returns:
- the number of
ILcdGXYControllers in this composite controller.
-
getCursor
Returns the cursor of the first added controller, ornullif no controller is added.- Specified by:
getCursorin interfaceILcdGXYController- Returns:
- the cursor of the first added controller, or
nullif no controller is added.
-
getName
Returns the name of the first added controller, ornullif no controller is added.- Specified by:
getNamein interfaceILcdGXYController- Returns:
- the name of the first added controller, or
nullif no controller is added.
-
getShortDescription
Returns the short description of the first added controller, ornullif no controller is added.- Specified by:
getShortDescriptionin interfaceILcdGXYController- Returns:
- the short description of the first added controller, or
nullif no controller is added.
-
getIcon
Returns the icon of the first added controller, ornullif no controller is added.- Specified by:
getIconin interfaceILcdGXYController- Returns:
- the icon of the first added controller, or
nullif no controller is added.
-
startInteraction
Delegates to
ILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)for each addedILcdGXYController.- Specified by:
startInteractionin interfaceILcdGXYController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
Delegates to
ILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)for each addedILcdGXYController.- Specified by:
terminateInteractionin interfaceILcdGXYController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
viewRepaint
Delegates to
ILcdGXYController.viewRepaint(com.luciad.view.gxy.ILcdGXYView)for each addedILcdGXYController.- Specified by:
viewRepaintin interfaceILcdGXYController- Parameters:
aGXYView- theILcdGXYViewto draw on.
-
paint
Delegates to
ILcdGXYController.paint(java.awt.Graphics)for each addedILcdGXYController.- Specified by:
paintin interfaceILcdGXYController- Parameters:
aGraphics- the Graphics to paint on.
-
componentResized
Delegates to
ComponentListener.componentResized(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.- Specified by:
componentResizedin interfaceComponentListener
-
componentMoved
Delegates to
ComponentListener.componentMoved(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.- Specified by:
componentMovedin interfaceComponentListener
-
componentShown
Delegates to
ComponentListener.componentShown(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.- Specified by:
componentShownin interfaceComponentListener
-
componentHidden
Delegates to
ComponentListener.componentHidden(java.awt.event.ComponentEvent)for each addedILcdGXYControllerthat implementsComponentListener.- Specified by:
componentHiddenin interfaceComponentListener
-
keyTyped
Delegates to
KeyListener.keyTyped(java.awt.event.KeyEvent)for each addedILcdGXYControllerthat implementsKeyListener.- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
Delegates to
KeyListener.keyPressed(java.awt.event.KeyEvent)for each addedILcdGXYControllerthat implementsKeyListener.- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
Delegates to
KeyListener.keyReleased(java.awt.event.KeyEvent)for each addedILcdGXYControllerthat implementsKeyListener.- Specified by:
keyReleasedin interfaceKeyListener
-
mouseClicked
Delegates to
MouseListener.mouseClicked(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
Delegates to
MouseListener.mousePressed(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
Delegates to
MouseListener.mouseReleased(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
Delegates to
MouseListener.mouseEntered(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
Delegates to
MouseListener.mouseExited(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseListener.- Specified by:
mouseExitedin interfaceMouseListener
-
mouseDragged
Delegates to
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseMotionListener.- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
Delegates to
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)for each addedILcdGXYControllerthat implementsMouseMotionListener.- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseWheelMoved
Delegates to
MouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)for each addedILcdGXYControllerthat implementsMouseWheelListener.- Specified by:
mouseWheelMovedin interfaceMouseWheelListener
-