public class TLspFXCompassNavigationControl
extends javafx.scene.layout.AnchorPane
TLspFXView
in the following ways:
The exact appearance is specified by the following images in png format:
//Create a compass control for the view
TLspFXCompassNavigationControl compassControl = new TLspFXCompassNavigationControl(view);
//Get the overlay panel from the view and add the control to it
view.getOverlayNodes().stream()
.filter(TLcdOverlayPane.class::isInstance)
.map(TLcdOverlayPane.class::cast)
.findFirst()
.ifPresent(aOverlayPane -> aOverlayPane.add(compassControl, TLcdOverlayPane.Location.SOUTH_EAST));
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Modifier and Type | Field and Description |
---|---|
static String |
COMPASS_COMPONENT_DIR
Default name of the subfolder in the navigation controls image folder containing all compass panel
images.
|
static String |
COMPASSPAN_COMPONENT_DIR
Default name of the subfolder in the navigation controls image folder containing all compass panel
images when the compass panel will be used for panning (in 2D for example).
|
Constructor and Description |
---|
TLspFXCompassNavigationControl(TLspFXView aView)
A constructor for the compass component of the navigation controls for a
TLspFXView . |
TLspFXCompassNavigationControl(TLspFXView aView,
boolean aPan)
A constructor for the compass component of the navigation controls for a
TLspFXView . |
TLspFXCompassNavigationControl(TLspFXView aView,
boolean aPan,
String aImagePath)
A constructor for the compass component of the navigation controls for a
TLspFXView . |
Modifier and Type | Method and Description |
---|---|
ILcdMagneticNorthMap |
getMagneticNorthMap()
Returns the magnetic north map to be used to point to the magnetic north.
|
double |
getMaxAnimationDuration()
Gets the maximum duration of the animation used when resetting the orientation to north.
|
double |
getMinAnimationDuration()
Gets the minimum duration of the animation used when resetting the orientation to north.
|
boolean |
isInnerRingPan()
Returns what view navigation happens when the inside ring of the compass navigation is used.
|
void |
setInnerRingPan(boolean aInnerRingPan)
Indicates what view navigation needs to happen when the inside ring of the compass navigation is used.
|
void |
setMagneticNorthMap(ILcdMagneticNorthMap aMagneticNorthMap)
Lets the compass point to the magnetic north instead of true north, using the given
magnetic north map.
|
void |
setMaxAnimationDuration(double aMaxAnimationDuration)
Sets the maximum duration of the animation used when resetting the orientation to north.
|
void |
setMinAnimationDuration(double aMinAnimationDuration)
Sets the minimum duration of the animation used when resetting the orientation to north.
|
clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBottomAnchor, getLeftAnchor, getRightAnchor, getTopAnchor, layoutChildren, setBottomAnchor, setLeftAnchor, setRightAnchor, setTopAnchor
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthProperty
getBaselineOffset, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public static final String COMPASS_COMPONENT_DIR
public static final String COMPASSPAN_COMPONENT_DIR
public TLspFXCompassNavigationControl(TLspFXView aView) throws IOException
TLspFXView
.aView
- The view this panel will interact with.IOException
- when one of the necessary images is missing.public TLspFXCompassNavigationControl(TLspFXView aView, boolean aPan) throws IOException
TLspFXView
.aView
- the view this panel will interact with.aPan
- determines whether the inner ring of the compass is used for panning.IOException
- when one of the necessary images is missing.public TLspFXCompassNavigationControl(TLspFXView aView, boolean aPan, String aImagePath) throws IOException
TLspFXView
.
The default image path is usually the path to the root folder of the navigation controls +
COMPASS_COMPONENT_DIR
or
COMPASSPAN_COMPONENT_DIR
. The directory
COMPASSPAN_COMPONENT_DIR
should contain a set of images to be used when the compass
will be able to pan the view. These constants can be used by factory methods to create a complete set
of navigation controls with a single path to a root folder.aView
- the view this panel will interact with.aPan
- determines whether the inner ring of the compass is used for panning.aImagePath
- the (relative or absolute) path to the directory where the images are stored.
For relative paths, the classpath and the working directory are searched.IOException
- when one of the necessary images is missing.public double getMinAnimationDuration()
setMinAnimationDuration(double)
public void setMinAnimationDuration(double aMinAnimationDuration)
By default, the minimum duration is
0.5
second. Set both this and the setMaxAnimationDuration(double)
maximum
duration } to 0
if no animation is required.
aMinAnimationDuration
- expressed in seconds.setMaxAnimationDuration(double)
public double getMaxAnimationDuration()
setMaxAnimationDuration(double)
public void setMaxAnimationDuration(double aMaxAnimationDuration)
By default, the duration is 1.5
second. et both this and the setMinAnimationDuration(double)
minimum duration }
to 0
if no animation is required.
aMaxAnimationDuration
- expressed in seconds.setMinAnimationDuration(double)
public boolean isInnerRingPan()
false
will trigger rotation (and pitching in a 3D view). This is the default.true
will trigger panning.true
for panning, false
for rotationpublic void setInnerRingPan(boolean aInnerRingPan)
false
will trigger rotation (and pitching in a 3D view). This is the default.true
will trigger panning.aInnerRingPan
- true
for panning, false
for rotationpublic void setMagneticNorthMap(ILcdMagneticNorthMap aMagneticNorthMap)
aMagneticNorthMap
- the map to use. If null, the compass will point to the true northpublic ILcdMagneticNorthMap getMagneticNorthMap()