Module xaos.ui

Class NavigatorController

  • All Implemented Interfaces:
    Styleable, EventTarget

    public class NavigatorController
    extends AnchorPane
    A JavaFX control with 9 buttons to navigate a graphical area. Zoom, pan and undo/redo buttons are provided and can be bound to the application code through the provided EventHandler methods.

    The navigation buttons can be activated by means of keyboard accelerators (Shortcut stands for Ctrl on Windows or Linux, and Command on macOS):

     
    Pan DownShortcut+DOWN
    Pan LeftShortcut+LEFT
    Pan RightShortcut+RIGHT
    Pan UpShortcut+UP
    RedoShift+Shortcut+Z
    UndoShortcut+Z
    Zoom InShift+Shortcut+UP
    Zoom OutShift+Shortcut+DOWN
    Zoom To OneShortcut+EQUALS
    Author:
    claudio.rosati@esss.se
    • Field Detail

      • ON_PAN_DOWN

        public static final EventType<Event> ON_PAN_DOWN
        Called when the navigator's panDown button is pressed.
      • ON_PAN_LEFT

        public static final EventType<Event> ON_PAN_LEFT
        Called when the navigator's panLeft button is pressed.
      • ON_PAN_RIGHT

        public static final EventType<Event> ON_PAN_RIGHT
        Called when the navigator's panRight button is pressed.
      • ON_PAN_UP

        public static final EventType<Event> ON_PAN_UP
        Called when the navigator's panUp button is pressed.
      • ON_REDO

        public static final EventType<Event> ON_REDO
        Called when the navigator's redo button is pressed.
      • ON_UNDO

        public static final EventType<Event> ON_UNDO
        Called when the navigator's undo button is pressed.
      • ON_ZOOM_IN

        public static final EventType<Event> ON_ZOOM_IN
        Called when the navigator's zoomIn button is pressed.
      • ON_ZOOM_OUT

        public static final EventType<Event> ON_ZOOM_OUT
        Called when the navigator's zoomOut button is pressed.
      • ON_ZOOM_TO_ONE

        public static final EventType<Event> ON_ZOOM_TO_ONE
        Called when the navigator's zoomToOne button is pressed.
      • PAN_DOWN_ACCELERATOR

        public static final KeyCombination PAN_DOWN_ACCELERATOR
      • PAN_LEFT_ACCELERATOR

        public static final KeyCombination PAN_LEFT_ACCELERATOR
      • PAN_RIGHT_ACCELERATOR

        public static final KeyCombination PAN_RIGHT_ACCELERATOR
      • PAN_UP_ACCELERATOR

        public static final KeyCombination PAN_UP_ACCELERATOR
      • REDO_ACCELERATOR

        public static final KeyCombination REDO_ACCELERATOR
      • UNDO_ACCELERATOR

        public static final KeyCombination UNDO_ACCELERATOR
      • ZOOM_IN_ACCELERATOR

        public static final KeyCombination ZOOM_IN_ACCELERATOR
      • ZOOM_OUT_ACCELERATOR

        public static final KeyCombination ZOOM_OUT_ACCELERATOR
      • ZOOM_TO_ONE_ACCELERATOR

        public static final KeyCombination ZOOM_TO_ONE_ACCELERATOR
    • Constructor Detail

      • NavigatorController

        public NavigatorController()
    • Method Detail

      • getOnPanDown

        public final EventHandler<Event> getOnPanDown()
        Gets the value of the property onPanDown.
        Property description:
        Called when the panDown button is pressed.
      • setOnPanDown

        public final void setOnPanDown​(EventHandler<Event> value)
        Sets the value of the property onPanDown.
        Property description:
        Called when the panDown button is pressed.
      • getOnPanLeft

        public final EventHandler<Event> getOnPanLeft()
        Gets the value of the property onPanLeft.
        Property description:
        Called when the panLeft button is pressed.
      • setOnPanLeft

        public final void setOnPanLeft​(EventHandler<Event> value)
        Sets the value of the property onPanLeft.
        Property description:
        Called when the panLeft button is pressed.
      • getOnPanRight

        public final EventHandler<Event> getOnPanRight()
        Gets the value of the property onPanRight.
        Property description:
        Called when the panRight button is pressed.
      • setOnPanRight

        public final void setOnPanRight​(EventHandler<Event> value)
        Sets the value of the property onPanRight.
        Property description:
        Called when the panRight button is pressed.
      • getOnPanUp

        public final EventHandler<Event> getOnPanUp()
        Gets the value of the property onPanUp.
        Property description:
        Called when the panUp button is pressed.
      • setOnPanUp

        public final void setOnPanUp​(EventHandler<Event> value)
        Sets the value of the property onPanUp.
        Property description:
        Called when the panUp button is pressed.
      • getOnRedo

        public final EventHandler<Event> getOnRedo()
        Gets the value of the property onRedo.
        Property description:
        Called when the redo button is pressed.
      • setOnRedo

        public final void setOnRedo​(EventHandler<Event> value)
        Sets the value of the property onRedo.
        Property description:
        Called when the redo button is pressed.
      • getOnUndo

        public final EventHandler<Event> getOnUndo()
        Gets the value of the property onUndo.
        Property description:
        Called when the undo button is pressed.
      • setOnUndo

        public final void setOnUndo​(EventHandler<Event> value)
        Sets the value of the property onUndo.
        Property description:
        Called when the undo button is pressed.
      • getOnZoomIn

        public final EventHandler<Event> getOnZoomIn()
        Gets the value of the property onZoomIn.
        Property description:
        Called when the zoomIn button is pressed.
      • setOnZoomIn

        public final void setOnZoomIn​(EventHandler<Event> value)
        Sets the value of the property onZoomIn.
        Property description:
        Called when the zoomIn button is pressed.
      • getOnZoomOut

        public final EventHandler<Event> getOnZoomOut()
        Gets the value of the property onZoomOut.
        Property description:
        Called when the zoomOut button is pressed.
      • setOnZoomOut

        public final void setOnZoomOut​(EventHandler<Event> value)
        Sets the value of the property onZoomOut.
        Property description:
        Called when the zoomOut button is pressed.
      • getOnZoomToOne

        public final EventHandler<Event> getOnZoomToOne()
        Gets the value of the property onZoomToOne.
        Property description:
        Called when the zoomToOne button is pressed.
      • setOnZoomToOne

        public final void setOnZoomToOne​(EventHandler<Event> value)
        Sets the value of the property onZoomToOne.
        Property description:
        Called when the zoomToOne button is pressed.
      • isPanDownDisabled

        public final boolean isPanDownDisabled()
        Gets the value of the property panDownDisabled.
        Property description:
        Indicates whether or not the panDown button is disabled.
      • setPanDownDisabled

        public final void setPanDownDisabled​(boolean disabled)
        Sets the value of the property panDownDisabled.
        Property description:
        Indicates whether or not the panDown button is disabled.
      • isPanLeftDisabled

        public final boolean isPanLeftDisabled()
        Gets the value of the property panLeftDisabled.
        Property description:
        Indicates whether or not the panLeft button is disabled.
      • setPanLeftDisabled

        public final void setPanLeftDisabled​(boolean disabled)
        Sets the value of the property panLeftDisabled.
        Property description:
        Indicates whether or not the panLeft button is disabled.
      • isPanRightDisabled

        public final boolean isPanRightDisabled()
        Gets the value of the property panRightDisabled.
        Property description:
        Indicates whether or not the panRight button is disabled.
      • setPanRightDisabled

        public final void setPanRightDisabled​(boolean disabled)
        Sets the value of the property panRightDisabled.
        Property description:
        Indicates whether or not the panRight button is disabled.
      • isPanUpDisabled

        public final boolean isPanUpDisabled()
        Gets the value of the property panUpDisabled.
        Property description:
        Indicates whether or not the panUp button is disabled.
      • setPanUpDisabled

        public final void setPanUpDisabled​(boolean disabled)
        Sets the value of the property panUpDisabled.
        Property description:
        Indicates whether or not the panUp button is disabled.
      • isRedoDisabled

        public final boolean isRedoDisabled()
        Gets the value of the property redoDisabled.
        Property description:
        Indicates whether or not the redo button is disabled.
      • setRedoDisabled

        public final void setRedoDisabled​(boolean disabled)
        Sets the value of the property redoDisabled.
        Property description:
        Indicates whether or not the redo button is disabled.
      • isUndoDisabled

        public final boolean isUndoDisabled()
        Gets the value of the property undoDisabled.
        Property description:
        Indicates whether or not the undo button is disabled.
      • setUndoDisabled

        public final void setUndoDisabled​(boolean disabled)
        Sets the value of the property undoDisabled.
        Property description:
        Indicates whether or not the undo button is disabled.
      • isZoomInDisabled

        public final boolean isZoomInDisabled()
        Gets the value of the property zoomInDisabled.
        Property description:
        Indicates whether or not the zoomIn button is disabled.
      • setZoomInDisabled

        public final void setZoomInDisabled​(boolean disabled)
        Sets the value of the property zoomInDisabled.
        Property description:
        Indicates whether or not the zoomIn button is disabled.
      • isZoomOutDisabled

        public final boolean isZoomOutDisabled()
        Gets the value of the property zoomOutDisabled.
        Property description:
        Indicates whether or not the zoomOut button is disabled.
      • setZoomOutDisabled

        public final void setZoomOutDisabled​(boolean disabled)
        Sets the value of the property zoomOutDisabled.
        Property description:
        Indicates whether or not the zoomOut button is disabled.
      • isZoomToOneDisabled

        public final boolean isZoomToOneDisabled()
        Gets the value of the property zoomToOneDisabled.
        Property description:
        Indicates whether or not the zoomToOne button is disabled.
      • setZoomToOneDisabled

        public final void setZoomToOneDisabled​(boolean disabled)
        Sets the value of the property zoomToOneDisabled.
        Property description:
        Indicates whether or not the zoomToOne button is disabled.