public interface MainFrame extends ThreadSafeDialogs
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MAIN_FRAME_EXT_STATE |
static int |
MAIN_FRAME_EXT_STATE_DEFAULT |
static java.lang.String |
MAIN_FRAME_POS |
static int[] |
MAIN_FRAME_POS_DEFAULT |
static java.lang.String |
MAIN_FRAME_SIZE |
static int[] |
MAIN_FRAME_SIZE_DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
void |
addMenu(ActionInfo action,
java.lang.String text) |
void |
addMenu(Menu menu,
java.awt.event.ActionListener listener,
PluginClassLoader loader)
Adds the provided menu to the menu bar.
|
void |
addSelectableTool(ActionInfo action,
java.lang.String toolBarName,
java.lang.String groupName,
boolean useText) |
void |
addStatusBarControl(java.lang.Class<?> extensionClass,
org.gvsig.gui.beans.controls.IControl control)
Adds a control to the status bar and associate it with the
provided extension.
|
void |
addTool(ActionInfo action,
java.lang.String toolBarName) |
void |
addTool(ActionInfo action,
java.lang.String toolBarName,
boolean useText) |
void |
addTool(ActionInfo action,
java.lang.String toolBarName,
java.lang.String dropDownName) |
void |
addToolBarControl(java.lang.Class<?> extensionClass,
javax.swing.JToolBar control,
java.lang.String name) |
void |
changeMenuName(java.lang.String[] menu,
java.lang.String newName,
PluginClassLoader loader)
Changes the menu name, and thus also its location, as the name determines
the location of the menu.
|
void |
enableControls()
It checks whether each extension is enabled and visible, in order to
enable/disable and show/hide their associated controls.
|
javax.swing.JComponent |
getComponentByName(java.lang.String name)
Gets a previously added JComponent by name (including
tool bars, buttons from tool bars, status bar controls
and menus.
|
javax.swing.JMenuItem |
getMenuEntry(java.lang.String[] menuPath)
Gets the menu entry corresponding the provided menu path.
|
NewStatusBar |
getStatusBar()
Gets the status bar, the bar located in the bottom part of the main window.
|
SelectableToolBar[] |
getToolbars()
Gets an array containing all the toolbars.
|
boolean |
getToolbarVisibility(java.lang.String name)
Gets wheter or not this toolbar should be shown by Andami.
|
void |
message(java.lang.String msg,
int messageTyoe)
Show the message in the status bar of the application.
|
void |
refreshControls()
This method is thread safe.
|
void |
removeMenu(Menu menu)
Deletes the provided menu, if found.
|
void |
removeStatusBarControl(java.lang.String name)
Removes the providedcontrol from the status bar.
|
void |
removeStatusBarLabels(java.lang.Class<?> clase)
Removes the labels associated with the provided class.
|
void |
setLocale(java.util.Locale locale) |
void |
setSelectedTool(java.lang.String actionCommand)
Sets the tool associated to the provided actionComand
as the selected tool for the currently selected Andami window.
|
void |
setStatusBarLabels(java.lang.Class<?> clase,
Label[] label)
Sets the provided label-set as the labels associated with the provided
class.
|
void |
setTitle(java.lang.String titulo)
Sets the main window title.
|
boolean |
setToolbarVisibility(java.lang.String name,
boolean visibility)
Sets wheter or not this toolbar should be shown by Andami.
|
confirmDialog, messageDialog, showDialogconfirmDialog, createComponent, createComponentWithParams, inputDialog, inputDialog, messageDialog, messageDialog, showChooserDialog, showChooserDialog, showChooserDialog, showOpenDirectoryDialog, showOpenFileDialog, showSaveFileDialogstatic final java.lang.String MAIN_FRAME_EXT_STATE
static final int MAIN_FRAME_EXT_STATE_DEFAULT
static final java.lang.String MAIN_FRAME_POS
static final int[] MAIN_FRAME_POS_DEFAULT
static final java.lang.String MAIN_FRAME_SIZE
static final int[] MAIN_FRAME_SIZE_DEFAULT
void addMenu(ActionInfo action, java.lang.String text)
void addMenu(Menu menu, java.awt.event.ActionListener listener, PluginClassLoader loader)
menu - A Menu object containing the menu definitionlistener - Object which receives the menu eventsloader - ClassLoader of the plug-in that installs this menuvoid addSelectableTool(ActionInfo action, java.lang.String toolBarName, java.lang.String groupName, boolean useText)
void addStatusBarControl(java.lang.Class<?> extensionClass,
org.gvsig.gui.beans.controls.IControl control)
extensionClass - Extension which will determine whether the
control is enabled and visible.control - The control to add.void addTool(ActionInfo action, java.lang.String toolBarName)
void addTool(ActionInfo action, java.lang.String toolBarName, boolean useText)
void addTool(ActionInfo action, java.lang.String toolBarName, java.lang.String dropDownName)
void addToolBarControl(java.lang.Class<?> extensionClass,
javax.swing.JToolBar control,
java.lang.String name)
void changeMenuName(java.lang.String[] menu,
java.lang.String newName,
PluginClassLoader loader)
throws NoSuchMenuException
menu - An array of Strings which represents the full menu path,
for example, {"Vista", "export", "imagen"} is a reference to the menu
"Vista/export/imagen" (that is, the menu Image within the submenu
View-Export). Menu names are translation keys, "Vista", "export", etc will
be translated to the suitable language when they are displayed.newName - New menu's name, in the syntax "Vista/export/symbols". Each
part of the name is a translation key.loader - ClassLoader of the plug-in that added the menuNoSuchMenuException - If there is no menu matching the provided
menu pathvoid enableControls()
javax.swing.JComponent getComponentByName(java.lang.String name)
name - javax.swing.JMenuItem getMenuEntry(java.lang.String[] menuPath)
menuPath - The menu path to the menu entry that we want to
retrieve. For example, if we want to retrieve the menu entry
corresponding to the XML menu "Layer/Export/Export_to_PDF" we
will provide an array containing ["Layer", "Export", "Export_to_PDF"].javax.swing.JMenuItem,
javax.swing.JMenu or
com.iver.andami.ui.mdiFrame.JMenuItem.NewStatusBar getStatusBar()
SelectableToolBar[] getToolbars()
boolean getToolbarVisibility(java.lang.String name)
name - The toolbar's namevoid message(java.lang.String msg,
int messageTyoe)
message in interface org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManagermsg - to showmessageTyoe - type of message.void refreshControls()
void removeMenu(Menu menu)
menu - The menu to delete from the menu barvoid removeStatusBarControl(java.lang.String name)
name - The name of the control to removevoid removeStatusBarLabels(java.lang.Class<?> clase)
clase - The class whose associated labels are to be removed.void setLocale(java.util.Locale locale)
void setSelectedTool(java.lang.String actionCommand)
void setStatusBarLabels(java.lang.Class<?> clase,
Label[] label)
clase - The class which will be associated to the label-set. The
labels will be visible if the currently selected Andami window is an
instance of this class.label - An array of Labels. Each label has an ID which will be
used to write text on them.void setTitle(java.lang.String titulo)
titulo - The title to be set in the main windowboolean setToolbarVisibility(java.lang.String name,
boolean visibility)
name - The toolbar's name.visibility - Copyright © 2025 gvSIG Association. All rights reserved.