public interface JMapGuiService
Modifier and Type | Field and Description |
---|---|
static int |
STATE_AUTOHIDE
Auto-hide means the window is hidden but accessible with a tab.
|
static int |
STATE_DOCKED
Docked means the window is docked inside the main window.
|
static int |
STATE_FLOATING
Floating means the window is in a floating container.
|
static int |
STATE_HIDDEN
Hidden means the window is hidden.
|
Modifier and Type | Method and Description |
---|---|
void |
addDockableComponent(javax.swing.JComponent component,
java.util.HashMap<java.lang.String,java.lang.Object> properties)
Adds a component (usually a panel) into the application.
|
javax.swing.JMenuItem |
addMenuItem(java.lang.String menuKey,
javax.swing.AbstractAction menuAction,
boolean addSeparatorBefore)
Adds a menu action to the the specified menu in the application menu bar.
|
void |
addMenuItem(java.lang.String menuKey,
javax.swing.JMenuItem menuItem,
boolean addSeparatorBefore)
Adds a menu item to the the specified menu in the application menu bar.
|
void |
addStatusBar(javax.swing.JPanel statusBar)
Adds a status bar at the bottom of the application.
|
void |
addToolBar(ToolBar toolBar,
java.util.HashMap<java.lang.String,java.lang.Object> properties)
Adds a tool bar to the application.
|
void |
dispose()
Releases all GUI resources used by this Service.
|
javax.swing.JComponent |
getDockableComponent(java.lang.String componentKey)
Returns the component specified by the componentKey.
|
JMapGuiFactory |
getGuiFactory()
Returns the factory that should be used to create user interface
components for the current application toolkit.
|
LayerBar |
getLayerBar()
Returns the layer bar.
|
LayerTreeBar |
getLayerTreeBar()
Returns the layer tree bar.
|
javax.swing.ButtonGroup |
getMainButtonGroup()
Returns the main button group.
|
javax.swing.JMenu |
getMenu(java.lang.String menuKey)
Returns the menu identified by the specified key.
|
javax.swing.JMenuBar |
getMenuBar()
Returns the application menu bar.
|
javax.swing.JMenuItem |
getMenuItem(java.lang.Class actionClass)
Returns the menu item identified by the specified class.
|
ToolBar |
getToolBar(java.lang.String toolBarKey)
Returns the tool bar identified by the specified key.
|
boolean |
isDockableComponentVisible(java.lang.String componentKey)
To know if a dockable component registered is visible or not
|
void |
removeDockableComponent(java.lang.String componentKey)
Removes the component specified by the componentKey.
|
void |
removeDockableComponent(java.lang.String componentKey,
boolean onlyIfFloating)
Removes the component specified by the componentKey.
|
void |
removeMenuItem(java.lang.String menuKey,
javax.swing.JMenuItem menuItem)
Removes a menu item from the specified menu in the application menu bar.
|
void |
removeStatusBar()
Removes the current status bar.
|
void |
setDockableComponentTitle(java.lang.String componentKey,
java.lang.String title)
Sets the title of a dockable component specified by the componentKey.
|
void |
setDockableComponentVisible(java.lang.String componentKey,
boolean visible)
Show or hide a dockable component specified by the componentKey.
|
void |
setToolBarVisible(java.lang.String toolBarKey,
boolean visible)
Shows or hides a tool bar.
|
static final int STATE_HIDDEN
static final int STATE_FLOATING
static final int STATE_AUTOHIDE
static final int STATE_DOCKED
JMapGuiFactory getGuiFactory()
ToolBar getToolBar(java.lang.String toolBarKey)
null
is returned if
there is no tool bar associated with the key.toolBarKey
- the tool bar keyjavax.swing.JMenu getMenu(java.lang.String menuKey)
null
is returned if
there is no menu associated with the key.menuKey
- the menu keyjavax.swing.JMenuItem getMenuItem(java.lang.Class actionClass)
null
is returned if
there is no menu item associated with the class.actionClass
- the menu action classjavax.swing.JMenuBar getMenuBar()
null
is return if
there is no menu bar in the application.javax.swing.JMenuItem addMenuItem(java.lang.String menuKey, javax.swing.AbstractAction menuAction, boolean addSeparatorBefore)
menuKey
- the menu bar item to add tomenuAction
- the menu action to addaddSeparatorBefore
- if true, a JPopupMenu.Separator
will be added before the menuItemvoid addMenuItem(java.lang.String menuKey, javax.swing.JMenuItem menuItem, boolean addSeparatorBefore)
menuKey
- the menu bar item to add tomenuItem
- the menu item to addaddSeparatorBefore
- if true, a JPopupMenu.Separator
will be added before the menuItemvoid removeMenuItem(java.lang.String menuKey, javax.swing.JMenuItem menuItem)
menuKey
- the menu bar item to remove frommenuItem
- the menu item to removevoid addToolBar(ToolBar toolBar, java.util.HashMap<java.lang.String,java.lang.Object> properties)
CONTEXT_INIT_SIDE
(optional)
with possible values SwingConstants.EAST
, SwingConstants.WEST
,
SwingConstants.NORTH
(default), SwingConstants.SOUTH
toolBar
- the tool bar to addproperties
- the specifications used to place the componentToolBar
void setToolBarVisible(java.lang.String toolBarKey, boolean visible)
toolBarKey
- the tool bar keyvisible
- void addDockableComponent(javax.swing.JComponent component, java.util.HashMap<java.lang.String,java.lang.Object> properties)
KEY
(mandatory) - A unique String
value in the Docking environment
FRAME_ICON
(optional) - The icon used in the title bar
TITLE
(optional) - The text in the title bar
AVAILABLE_BUTTONS
(optional) - TODO : doc
CONTEXT_INIT_MODE
(optional)
with possible values STATE_HIDDEN
, STATE_FLOATING
, STATE_DOCKED
(default)
CONTEXT_INIT_INDEX
(optional) - The index of the docked component. Useful if you have more than one component in the same side
CONTEXT_DOCKED_WIDTH
(optional) - The width of the component
CONTEXT_DOCKED_HEIGHT
(optional) - The height of the component
CONTEXT_FLOATING_X
(optional) - Specify the X position of the component in floating mode
CONTEXT_FLOATING_Y
(optional) - Specify the Y position of the component in floating mode
CONTEXT_INIT_SIDE
(optional)
with possible values SwingConstants.EAST
, SwingConstants.WEST
,
SwingConstants.NORTH
(default), SwingConstants.SOUTH
ADD_TO_VIEW_MENU
(optional) - Add a menu item in the View menu to show the added component
component
- the component to addproperties
- the specifications used to place the componentjavax.swing.JComponent getDockableComponent(java.lang.String componentKey)
null
if the componentKey is not found.componentKey
- the KEY of the component to retrievevoid removeDockableComponent(java.lang.String componentKey)
componentKey
- the KEY of the component to removevoid removeDockableComponent(java.lang.String componentKey, boolean onlyIfFloating)
componentKey
- the KEY of the component to removeonlyIfFloating
- remove only if the component is floatingvoid setDockableComponentVisible(java.lang.String componentKey, boolean visible)
componentKey
- the KEY of the component to show or hidevisible
- the visibility statevoid setDockableComponentTitle(java.lang.String componentKey, java.lang.String title)
componentKey
- the KEY of the component to set the titletitle
- the titlejavax.swing.ButtonGroup getMainButtonGroup()
LayerBar getLayerBar()
null
if the application
doesn't use the layer bar.LayerBar
LayerTreeBar getLayerTreeBar()
null
if the application
doesn't use the layer tree bar.LayerTreeBar
void addStatusBar(javax.swing.JPanel statusBar)
statusBar
- void removeStatusBar()
void dispose()
boolean isDockableComponentVisible(java.lang.String componentKey)
componentKey
-