-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.interactions.InteractionManager
public final class BaseInteractionManager<T extends Object, P extends Position2D<P>> implements InteractionManager<T, P>
An interaction manager that implements pan, select, move, delete and zoom.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBaseInteractionManager.Companion
-
Field Summary
Fields Modifier and Type Field Description private Environment<T, P>environmentprivate Map<Node<T>, P>nodesprivate final KeyboardActionListenerkeyboardListenerprivate final Groupcanvases
-
Constructor Summary
Constructors Constructor Description BaseInteractionManager(AbstractFXDisplay<T, P> monitor)
-
Method Summary
Modifier and Type Method Description Environment<T, P>getEnvironment()The current environment. UnitsetEnvironment(Environment<T, P> environment)The current environment. Map<Node<T>, P>getNodes()The nodes in the environment. UnitsetNodes(Map<Node<T>, P> nodes)The nodes in the environment. KeyboardActionListenergetKeyboardListener()GroupgetCanvases()The canvases used for input/output. Unitrepaint()Clears and then paints every currently active feedback. UnitsetWormhole(Wormhole2D<P> wormhole)Sets the wormhole. UnitsetZoomManager(ZoomManager zoomManager)Sets the zoom manager. UnitonMonitorRepaint()To be called whenever the monitor paints its effects. -
-
Constructor Detail
-
BaseInteractionManager
BaseInteractionManager(AbstractFXDisplay<T, P> monitor)
- Parameters:
monitor- the monitor.
-
-
Method Detail
-
getEnvironment
Environment<T, P> getEnvironment()
The current environment.
-
setEnvironment
Unit setEnvironment(Environment<T, P> environment)
The current environment.
-
getNodes
Map<Node<T>, P> getNodes()
The nodes in the environment. Should be updated as frequently as possible to ensure a representation of the feedback that is consistent with the actual environment.
-
setNodes
Unit setNodes(Map<Node<T>, P> nodes)
The nodes in the environment. Should be updated as frequently as possible to ensure a representation of the feedback that is consistent with the actual environment.
-
getKeyboardListener
KeyboardActionListener getKeyboardListener()
-
getCanvases
Group getCanvases()
The canvases used for input/output.
-
setWormhole
Unit setWormhole(Wormhole2D<P> wormhole)
Sets the wormhole.
-
setZoomManager
Unit setZoomManager(ZoomManager zoomManager)
Sets the zoom manager.
-
onMonitorRepaint
Unit onMonitorRepaint()
To be called whenever the monitor paints its effects.
-
-
-
-