Class MapMenu

Object
Window
PopupWindow
PopupControl
ContextMenu
MapMenu
All Implemented Interfaces:
Styleable, Event­Target, Skinnable

public class MapMenu extends ContextMenu
A Context­Menu that can be shown in a Map­Canvas. On construction, this menu is initially empty. Items can be added by the following method calls: More choices may be added in a future versions. In current implementation, there is no mechanism for removing menu items.
Since:
1.1

Defined in the sis-javafx module

  • Property Summary

    Properties inherited from class ContextMenu

    on­Action

    Properties inherited from class PopupControl

    id, max­Height, max­Width, min­Height, min­Width, pref­Height, pref­Width, skin, style

    Properties inherited from class PopupWindow

    anchor­Location, anchor­X, anchor­Y, auto­Fix, auto­Hide, consume­Auto­Hiding­Events, hide­On­Escape, on­Auto­Hide, owner­Node, owner­Window

    Properties inherited from class Window

    event­Dispatcher, focused, force­Integer­Render­Scale, height, on­Close­Request, on­Hidden, on­Hiding, on­Showing, on­Shown, opacity, output­Scale­X, output­Scale­Y, render­Scale­X, render­Scale­Y, scene, showing, width, x, y
  • Nested Class Summary

    Nested classes/interfaces inherited from class PopupControl

    Popup­Control​.CSSBridge

    Nested classes/interfaces inherited from class PopupWindow

    Popup­Window​.Anchor­Location
  • Field Summary

    Fields inherited from class PopupControl

    bridge, USE_COMPUTED_SIZE, USE_PREF_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an initially empty menu for the given canvas.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a menu item for copying coordinates at the mouse position where right click occurred.
    void
    Adds menu items for CRS selection.
    Optional<Observable­Object­Value<String>>
    Returns an observable value for showing the currently selected CRS as a text.

    Methods inherited from class ContextMenu

    create­Default­Skin, get­Items, get­On­Action, hide, on­Action­Property, set­On­Action, show, show

    Methods inherited from class PopupControl

    get­Class­Css­Meta­Data, get­Css­Meta­Data, get­Id, get­Max­Height, get­Max­Width, get­Min­Height, get­Min­Width, get­Pref­Height, get­Pref­Width, get­Pseudo­Class­States, get­Skin, get­Style, get­Styleable­Node, get­Styleable­Parent, get­Style­Class, get­Type­Selector, id­Property, max­Height, max­Height­Property, max­Width, max­Width­Property, min­Height, min­Height­Property, min­Width, min­Width­Property, pref­Height, pref­Height­Property, pref­Width, pref­Width­Property, pseudo­Class­State­Changed, set­Id, set­Max­Height, set­Max­Size, set­Max­Width, set­Min­Height, set­Min­Size, set­Min­Width, set­Pref­Height, set­Pref­Size, set­Pref­Width, set­Skin, set­Style, skin­Property, style­Property

    Methods inherited from class PopupWindow

    anchor­Location­Property, anchor­XProperty, anchor­YProperty, auto­Fix­Property, auto­Hide­Property, consume­Auto­Hiding­Events­Property, get­Anchor­Location, get­Anchor­X, get­Anchor­Y, get­Consume­Auto­Hiding­Events, get­On­Auto­Hide, get­Owner­Node, get­Owner­Window, hide­On­Escape­Property, is­Auto­Fix, is­Auto­Hide, is­Hide­On­Escape, on­Auto­Hide­Property, owner­Node­Property, owner­Window­Property, set­Anchor­Location, set­Anchor­X, set­Anchor­Y, set­Auto­Fix, set­Auto­Hide, set­Consume­Auto­Hiding­Events, set­Hide­On­Escape, set­On­Auto­Hide, set­Scene, show, show

    Methods inherited from class Window

    add­Event­Filter, add­Event­Handler, build­Event­Dispatch­Chain, center­On­Screen, event­Dispatcher­Property, fire­Event, focused­Property, force­Integer­Render­Scale­Property, get­Event­Dispatcher, get­Height, get­On­Close­Request, get­On­Hidden, get­On­Hiding, get­On­Showing, get­On­Shown, get­Opacity, get­Output­Scale­X, get­Output­Scale­Y, get­Properties, get­Render­Scale­X, get­Render­Scale­Y, get­Scene, get­User­Data, get­Width, get­Windows, get­X, get­Y, has­Properties, height­Property, is­Focused, is­Force­Integer­Render­Scale, is­Showing, on­Close­Request­Property, on­Hidden­Property, on­Hiding­Property, on­Showing­Property, on­Shown­Property, opacity­Property, output­Scale­XProperty, output­Scale­YProperty, remove­Event­Filter, remove­Event­Handler, render­Scale­XProperty, render­Scale­YProperty, request­Focus, scene­Property, set­Event­Dispatcher, set­Event­Handler, set­Force­Integer­Render­Scale, set­Height, set­On­Close­Request, set­On­Hidden, set­On­Hiding, set­On­Showing, set­On­Shown, set­Opacity, set­Render­Scale­X, set­Render­Scale­Y, set­User­Data, set­Width, set­X, set­Y, show, showing­Property, size­To­Scene, width­Property, x­Property, y­Property
  • Constructor Details

    • MapMenu

      public MapMenu(MapCanvas canvas)
      Creates an initially empty menu for the given canvas.
      Parameters:
      canvas - the canvas for which to create menus.
  • Method Details

    • addReferenceSystems

      public void addReferenceSystems(RecentReferenceSystems preferences)
      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 Positionable­Projection items.
      This method can be invoked at most once.
      Parameters:
      preferences - handler of menu items for selecting a CRS from a list of EPSG codes. Often built from user preferences.
      Throws:
      Illegal­State­Exception - if this method has already been invoked.
      See Also:
    • addCopyOptions

      public void addCopyOptions(StatusBar format)
      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

      public Optional<ObservableObjectValue<String>> selectedReferenceSystem()
      Returns an observable value for showing the currently selected CRS as a text. The value is absent if add­Reference­Systems(Recent­Reference­Systems) has never been invoked.
      Returns:
      the currently selected CRS as a text.
      See Also: