public interface MainFrame extends ThreadSafeDialogs
Modifier and Type | Field and Description |
---|---|
static String |
MAIN_FRAME_EXT_STATE |
static int |
MAIN_FRAME_EXT_STATE_DEFAULT |
static String |
MAIN_FRAME_POS |
static int[] |
MAIN_FRAME_POS_DEFAULT |
static String |
MAIN_FRAME_SIZE |
static int[] |
MAIN_FRAME_SIZE_DEFAULT |
Modifier and Type | Method and Description |
---|---|
void |
addMenu(ActionInfo action,
String text) |
void |
addMenu(Menu menu,
ActionListener listener,
PluginClassLoader loader)
Adds the provided menu to the menu bar.
|
void |
addSelectableTool(ActionInfo action,
String toolBarName,
String groupName,
boolean useText) |
void |
addStatusBarControl(Class<?> extensionClass,
IControl control)
Adds a control to the status bar and associate it with the
provided extension.
|
void |
addTool(ActionInfo action,
String toolBarName) |
void |
addTool(ActionInfo action,
String toolBarName,
boolean useText) |
void |
addTool(ActionInfo action,
String toolBarName,
String dropDownName) |
void |
addToolBarControl(Class<?> extensionClass,
JToolBar control,
String name) |
void |
changeMenuName(String[] menu,
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.
|
JComponent |
getComponentByName(String name)
Gets a previously added JComponent by name (including
tool bars, buttons from tool bars, status bar controls
and menus.
|
JMenuItem |
getMenuEntry(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(String name)
Gets wheter or not this toolbar should be shown by Andami.
|
void |
message(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(String name)
Removes the providedcontrol from the status bar.
|
void |
removeStatusBarLabels(Class<?> clase)
Removes the labels associated with the provided class.
|
void |
setLocale(Locale locale) |
void |
setSelectedTool(String actionCommand)
Sets the tool associated to the provided actionComand
as the selected tool for the currently selected Andami window.
|
void |
setStatusBarLabels(Class<?> clase,
Label[] label)
Sets the provided label-set as the labels associated with the provided
class.
|
void |
setTitle(String titulo)
Sets the main window title.
|
boolean |
setToolbarVisibility(String name,
boolean visibility)
Sets wheter or not this toolbar should be shown by Andami.
|
confirmDialog, messageDialog, showDialog
confirmDialog, createComponent, createComponentWithParams, inputDialog, inputDialog, messageDialog, messageDialog, showChooserDialog, showOpenDirectoryDialog, showOpenFileDialog, showSaveFileDialog
static final String MAIN_FRAME_POS
static final String MAIN_FRAME_SIZE
static final String MAIN_FRAME_EXT_STATE
static final int[] MAIN_FRAME_POS_DEFAULT
static final int[] MAIN_FRAME_SIZE_DEFAULT
static final int MAIN_FRAME_EXT_STATE_DEFAULT
void addMenu(Menu menu, 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 addMenu(ActionInfo action, String text)
void addTool(ActionInfo action, String toolBarName, String dropDownName)
void addTool(ActionInfo action, String toolBarName)
void addTool(ActionInfo action, String toolBarName, boolean useText)
void addSelectableTool(ActionInfo action, String toolBarName, String groupName, boolean useText)
void changeMenuName(String[] menu, 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 removeMenu(Menu menu)
menu
- The menu to delete from the menu barvoid enableControls()
void refreshControls()
NewStatusBar getStatusBar()
void setTitle(String titulo)
titulo
- The title to be set in the main windowJComponent getComponentByName(String name)
name
- void setSelectedTool(String actionCommand)
SelectableToolBar[] getToolbars()
boolean getToolbarVisibility(String name)
name
- The toolbar's nameboolean setToolbarVisibility(String name, boolean visibility)
name
- The toolbar's name.visibility
- JMenuItem getMenuEntry(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
.void addStatusBarControl(Class<?> extensionClass, IControl control)
extensionClass
- Extension which will determine whether the
control is enabled and visible.control
- The control to add.void removeStatusBarControl(String name)
name
- The name of the control to removevoid setStatusBarLabels(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 removeStatusBarLabels(Class<?> clase)
clase
- The class whose associated labels are to be removed.void message(String msg, int messageTyoe)
msg
- to showmessageTyoe
- type of message.void setLocale(Locale locale)