Object
Window
PopupWindow
PopupControl
ContextMenu
MapMenu
- All Implemented Interfaces:
Styleable
,EventTarget
,Skinnable
A
ContextMenu
that can be shown in a MapCanvas
.
On construction, this menu is initially empty.
Items can be added by the following method calls:
addReferenceSystems(RecentReferenceSystems)
:- Reference system with some items from EPSG database.
- Centered projection with the list of
PositionableProjection
items.
- Since:
- 1.1
-
Property Summary
Properties inherited from class ContextMenu
onAction
Properties inherited from class PopupControl
id, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth, skin, style
Properties inherited from class PopupWindow
anchorLocation, anchorX, anchorY, autoFix, autoHide, consumeAutoHidingEvents, hideOnEscape, onAutoHide, ownerNode, ownerWindow
Properties inherited from class Window
eventDispatcher, focused, forceIntegerRenderScale, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, opacity, outputScaleX, outputScaleY, renderScaleX, renderScaleY, scene, showing, width, x, y
-
Nested Class Summary
Nested classes/interfaces inherited from class PopupControl
PopupControl.CSSBridge
Nested classes/interfaces inherited from class PopupWindow
PopupWindow.AnchorLocation
-
Field Summary
Fields inherited from class PopupControl
bridge, USE_COMPUTED_SIZE, USE_PREF_SIZE
-
Constructor Summary
ConstructorDescriptionMapMenu
(MapCanvas canvas) Creates an initially empty menu for the given canvas. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCopyOptions
(StatusBar format) Adds a menu item for copying coordinates at the mouse position where right click occurred.void
addReferenceSystems
(RecentReferenceSystems preferences) Adds menu items for CRS selection.Returns an observable value for showing the currently selected CRS as a text.Methods inherited from class ContextMenu
createDefaultSkin, getItems, getOnAction, hide, onActionProperty, setOnAction, show, show
Methods inherited from class PopupControl
getClassCssMetaData, getCssMetaData, getId, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, getPseudoClassStates, getSkin, getStyle, getStyleableNode, getStyleableParent, getStyleClass, getTypeSelector, idProperty, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, pseudoClassStateChanged, setId, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setPrefHeight, setPrefSize, setPrefWidth, setSkin, setStyle, skinProperty, styleProperty
Methods inherited from class PopupWindow
anchorLocationProperty, anchorXProperty, anchorYProperty, autoFixProperty, autoHideProperty, consumeAutoHidingEventsProperty, getAnchorLocation, getAnchorX, getAnchorY, getConsumeAutoHidingEvents, getOnAutoHide, getOwnerNode, getOwnerWindow, hideOnEscapeProperty, isAutoFix, isAutoHide, isHideOnEscape, onAutoHideProperty, ownerNodeProperty, ownerWindowProperty, setAnchorLocation, setAnchorX, setAnchorY, setAutoFix, setAutoHide, setConsumeAutoHidingEvents, setHideOnEscape, setOnAutoHide, setScene, show, show
Methods inherited from class Window
addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, forceIntegerRenderScaleProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getOutputScaleX, getOutputScaleY, getProperties, getRenderScaleX, getRenderScaleY, getScene, getUserData, getWidth, getWindows, getX, getY, hasProperties, heightProperty, isFocused, isForceIntegerRenderScale, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, outputScaleXProperty, outputScaleYProperty, removeEventFilter, removeEventHandler, renderScaleXProperty, renderScaleYProperty, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setForceIntegerRenderScale, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setRenderScaleX, setRenderScaleY, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yProperty
-
Constructor Details
-
MapMenu
Creates an initially empty menu for the given canvas.- Parameters:
canvas
- the canvas for which to create menus.
-
-
Method Details
-
addReferenceSystems
Adds menu items for CRS selection. The menu items are in two groups:- Reference system with some items from EPSG database.
- Centered projection with the list of
PositionableProjection
items.
- Parameters:
preferences
- handler of menu items for selecting a CRS from a list of EPSG codes. Often built from user preferences.- Throws:
IllegalStateException
- if this method has already been invoked.- See Also:
-
addCopyOptions
Adds a menu item for copying coordinates at the mouse position where right click occurred. The coordinate reference system is determined by the status bar; it is not necessarily the coordinate reference system of the map.- Parameters:
format
- status bar determining the CRS and format to use for coordinate values.
-
selectedReferenceSystem
Returns an observable value for showing the currently selected CRS as a text. The value is absent ifaddReferenceSystems(RecentReferenceSystems)
has never been invoked.- Returns:
- the currently selected CRS as a text.
- See Also:
-