public abstract class AbstractMDIApplication extends AbstractApplication implements TabbedApplication
MDIApplication implementation, which have a GUI. It provides:
 | Modifier and Type | Class and Description | 
|---|---|
| protected class  | AbstractMDIApplication.MDIFrame | 
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.List<MDIApplicationListener> | appListenersThe list of application listeners registeed in the Application. | 
| protected SwingMessageArea | messageThe MDIApplication associated Message Area. | 
| protected MDIMenuFactory | mfactoryThe MDIApplication associated Menu Factory. | 
| protected java.util.Map<java.lang.String,java.lang.String> | nameToTabThis Maps the real name of the element in the tab to the tab name. | 
| protected java.util.Map<java.lang.String,SwingFileProperties> | propertiesThe properties Map. | 
| protected StatusBar | statusBarThe MDIApplication associated Status bar. | 
| protected javax.swing.JTabbedPane | tabTabbed pane containing the panels imported or created by the application | 
| protected java.util.Map<java.lang.String,javax.swing.JComponent> | tablistThe tab list. | 
| protected java.util.Map<java.lang.String,java.lang.String> | tabToNameThis Maps the tab name to the real name of the element in the tab. | 
additionalPluginTypes, allowedPluginTypes, appDesc, argsMap, commandLineHandler, conf, confmanager, customActions, errorLogger, plugins, pluginsConfiguration, pluginsDefInFile, pluginsDir, pluginsManager, pluginsMap, preventOpening, queue, timeFORCE_CLOSE_ALL, FORCE_CLOSE_ALL_TABS, FORCE_CLOSE_NONE, FORCE_CLOSE_OTHER_TABS| Constructor and Description | 
|---|
| AbstractMDIApplication()Constructor, with a default title. | 
| AbstractMDIApplication(java.lang.String title)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | acceptRemoveTab(java.lang.String name)Return true if the tab of the specified name can be removed. | 
| void | addApplicationListener(MDIApplicationListener listener)Add an application listener. | 
| SwingFileProperties | addTab(javax.swing.JComponent comp,
      javax.swing.Icon icon,
      java.lang.Object obj,
      java.lang.String name,
      java.lang.String tooltip,
      boolean isCloseable)Add an undefined tab. | 
| SwingFileProperties | addTab(javax.swing.JComponent comp,
      javax.swing.Icon icon,
      SwingFileProperties prop,
      java.lang.String tooltip)Add a tab with a specified name and panel. | 
| protected void | appendMessage(java.lang.String message,
             java.lang.String htmlColor) | 
| void | applyDialog(MDIDialog dialog)Apply a dialog. | 
| void | cancelDialog(MDIDialog dialog)Cancel a dialog. | 
| void | closeAllTabs(boolean forceClose)Close all tabs. | 
| boolean | closeCurrentTab(boolean forceClose)Close the currently opened Tab. | 
| void | closeOtherTabs(boolean forceClose)Close all Tabs except the current one. | 
| protected ThreadQueue | createThreadQueue()Create the ThreadQueue. | 
| void | dispose()Provided for convenience. | 
| void | endAction(MDIAction action)Ends a generic action. | 
| void | executeAction(MDIAction action,
             short blockingType)Execute a generic Action. | 
| void | executeAction(MDIAction action,
             short blockingType,
             java.lang.ClassLoader loader)Execute a generic Action, using a specific Classloader. | 
| protected boolean | fireTabBeforeClosing(SwingFileProperties prop)Fired before a tab is removed. | 
| protected void | fireTabChanged(SwingFileProperties prop)Fired when the current selected Tab change. | 
| protected void | fireTabRemoved(SwingFileProperties prop)Fired when a tab is removed. | 
| java.util.List<MDIApplicationListener> | getApplicationListeners()Return the list of application listeners. | 
| javax.swing.JFrame | getApplicationWindow()Return the frame. | 
| java.util.Map<java.lang.String,SwingFileProperties> | getCompatibleTabs(MetaData properties,
                 boolean excludeSelected)Return all the panels that are compatible with the given properties Map. | 
| javax.swing.JComponent | getComponent(java.lang.Object object)Return the Tab component for the specified object. | 
| javax.swing.JComponent | getComponent(java.lang.String name)Return the panel of the specified name, or null if there is no panel with this name. | 
| MDIDialogType | getDefaultDialogOpenType()Return the default dialog opening type. | 
| char | getDefaultForceCloseTab()Return which of the  TabbedApplication.closeCurrentTab(),TabbedApplication.closeAllTabs(), andTabbedApplication.closeOtherTabs()methods will close each tab even if theacceptRemoveTab(java.lang.String)return false orFileProperties.isCloseable()return false. | 
| MDIDialogHelper | getDialogHelper()Return the dialog helper. | 
| SwingFileProperties | getFileProperties(java.lang.Object object)Return the FileProperties for the specified object. | 
| javax.swing.JMenuBar | getMenuBar()Return the menu bar. | 
| MDIMenuFactory | getMenuFactory()Return the associated menu factory. | 
| SwingMessageArea | getMessageArea()Return the MDIApplication Message Area. | 
| SwingMessageArea | getMessageArea(SwingFileProperties properties)Return the MDIApplication MessageArea for a specified properties. | 
| short | getMessageAreaType()Return the message area type. | 
| PluginsEDTSupport | getPluginsEDTSupport(PluginsManager manager)Return the Swing support class for the GUI initialization of Plugins. | 
| SwingFileProperties | getProperties(java.lang.String name)Return the FileProperties for a tab of a specified name. | 
| java.lang.String | getRealNameForTab(java.lang.String tabName)Return the real name corresponding with a tab name. | 
| javax.swing.JComponent | getSelectedComponent()Return the selected component. | 
| SwingFileProperties | getSelectedProperties()Return the FileProperties for the selected tab. | 
| StatusBar | getStatusBar()Return the Statusbar associated with the main window, and create it before if it does not exist. | 
| javax.swing.JTabbedPane | getTabbedPane()Return the tabbed pane used by the MDI Application. | 
| int | getTabCount()Return the number of tabs. | 
| java.lang.String | getTabDisplayedName(java.lang.String name)Return the displayed tab name corresponding with a name. | 
| java.util.Map<java.lang.String,javax.swing.JComponent> | getTabList()Return the list of tabs as a Map, associating the tabs names with their Component. | 
| java.util.Map<java.lang.String,SwingFileProperties> | getTabPropertiesList()Return the list of tabs properties as a Map. | 
| java.lang.String | getTitle()Return the GUI frame title | 
| javax.swing.JPanel | getToolBarPanel()Return the panel containing the toolbars. | 
| protected java.lang.String | getUnusedName(java.lang.String name)Return an unused name beginning with the name String. | 
| boolean | hasClosableTab(boolean hasClosableTab)Try to define this application as having closable tabs. | 
| boolean | hasGlobalMessageArea()Return true if there is one global message area. | 
| boolean | hasPerTabMessageArea()Return true if there is one message area for each tab. | 
| boolean | hasSelectedTab()Return true if there is a selected tab. | 
| protected boolean | hasStatusBar() | 
| boolean | hasTab(java.lang.String name)Return true if the application has a tab of a specified name. | 
| protected boolean | hasToolBar() | 
| protected boolean | isChangeTabsAllowed()Return true if future changes in tabs must be listened to trigger Application actions. | 
| boolean | isClosableTab()Return true if this applications use tabs closable with a button on the tabs header. | 
| boolean | isDialogOpened(MDIDialog dialog)Return true if a dialog is currently opened. | 
| boolean | isEditableMessageArea()Return true if the message area is editable. | 
| boolean | isModified(java.lang.String name)Return true if the tab is modified. | 
| protected void | manageTabs(java.awt.event.MouseEvent e) | 
| void | noTimeMessages()Avoid to write time in messages for the current MDIAction. | 
| void | noWriteMessages()Avoid to write messages for the current MDIAction. | 
| protected void | preparePanels()The last method called for preparing the panels of the application. | 
| protected void | preparePanels(boolean hasStatusbar,
             boolean hasToolBar,
             MDIMenuFactory mfactory)Prepare the various panels of the MDIApplication, without any Message Area. | 
| protected void | preparePanels(int messageAreaSize,
             boolean hasStatusbar,
             boolean hasToolBar,
             MDIMenuFactory mfactory)Prepare the various panels of the MDIApplication. | 
| protected void | preparePanels(int messageAreaSize,
             int messageAreaType,
             boolean hasStatusbar,
             boolean hasToolBar,
             MDIMenuFactory mfactory)Prepare the various panels of the MDIApplication.The application window present:
 
 A Menu bar
 An optional toolbar
 The main panel of the application, presenting the various files opened and/or created by the application itself or plugins
 An optional message area
 An optional status bar
 
 This is necessary to add all GUI elements in the application, and can be configured in a number of ways:
 
 the initial size of the message area can be set.Note that the application comes with a default message area (see
  DefaultMessageArea), but that any specific message area implementation can be provided (seeSwingMessageArea). | 
| protected void | preparePanels(int messageAreaSize,
             MDIMenuFactory mfactory)Prepare the various panels of the MDIApplication, with a message area, a toolbar, and a status bar. | 
| protected void | preparePanels(MDIApplicationProperties appProperties)Prepare the various panels of the MDIApplication. | 
| protected void | preparePanels(SwingMessageArea area,
             boolean hasStatusbar,
             boolean hasToolBar,
             MDIMenuFactory mfactory)Prepare the various panels of the MDIApplication. | 
| boolean | removeApplicationListener(MDIApplicationListener listener)Remove an application listener. | 
| SwingFileProperties | removeSelectedTab()Remove the currently selected tab. | 
| SwingFileProperties | removeTab(java.lang.String name)Remove a tab of the specified name. | 
| void | renameTab(java.lang.String oldName,
         java.lang.String newName)Rename a tab of the specified name. | 
| protected void | setChangeTabsAllowed(boolean changeTabsAllowed)Set if future changes in tabs must be listened to trigger Application actions. | 
| boolean | setCloseBackground(java.awt.Color color)Set the close button background color when the close button is focused. | 
| boolean | setCloseIcon(javax.swing.Icon icon)Set the close Icon for the tabs header, and try to define this application as having a closable tab. | 
| boolean | setCloseIcon(java.net.URL icon)Set the close Icon for the tabs header, and try to define this application as having a closable tab. | 
| boolean | setComponenAt(java.lang.String name,
             javax.swing.JComponent comp)Set the component to use for a selected Tab name. | 
| void | setCurrentTabModified(boolean isModified)Set the modified state of the currently selected tab. | 
| boolean | setDefaultCloseIcon()Use the default icon for the close button. | 
| void | setDefaultDialogOpenType(MDIDialogType openType)Set the default dialog opening type. | 
| void | setDefaultForceCloseTab(char defaultForceCloseTabs)Set which of the  TabbedApplication.closeCurrentTab(),TabbedApplication.closeAllTabs(), andTabbedApplication.closeOtherTabs()methods will close each tab even if theacceptRemoveTab(java.lang.String)return false orFileProperties.isCloseable()return false. | 
| void | setDialogHelper(MDIDialogHelper helper)Set the dialog helper. | 
| void | setMenuFactory(MDIMenuFactory mfactory)Set the associated menu factory. | 
| protected void | setMessageArea(SwingMessageArea message)Set the MDIApplication Message Area. | 
| void | setModified(java.lang.String name,
           boolean isModified)Set the modified state of a tab. | 
| SwingFileProperties | setSelectedTab(java.lang.String name)Set the selected tab. | 
| void | setSize(int width,
       int height)Provided for convenience. | 
| void | setTitle(java.lang.String title)Set the GUI frame title. | 
| void | setVisible(boolean visible)Provided for convenience. | 
| void | showActionException(java.lang.String message,
                   java.lang.Exception e)Show the Exception stackTrace by default. | 
| int | showDialog(MDIDialog dialog)Show a dialog, with the default dialog opening type. | 
| int | showDialog(MDIDialog dialog,
          javax.swing.AbstractAction action)Show a dialog, with the default dialog opening type. | 
| int | showDialog(MDIDialog dialog,
          javax.swing.AbstractAction action,
          MDIDialogType openType)Show a dialog. | 
| int | showDialog(MDIDialogBuilder builder)Show a dialog. | 
| int | showDialog(MDIDialogBuilder builder,
          MDIDialogType openType)Show a dialog. | 
| int | showDialog(MDIDialog dialog,
          MDIDialogType openType)Show a dialog. | 
| int | showMessageDialog(java.lang.String title,
                 int messageType,
                 boolean isModal,
                 boolean isResizable,
                 java.lang.String... messages)Show a message dialog, with an OK button. | 
| void | startTime(MDIAction action)Start to count the time for the last operation, and show the statusBar progress. | 
| long | stopTime(MDIAction action)Return the time after the last operation and stop the progress bar if there is any. | 
| void | updateUI()Update the UI of the application content | 
addAdditionalPluginType, addCustomAction, addPluginDirectory, applyCommandLineArguments, disposeApplication, executeCustomAction, executeCustomAction, getAdditionalPluginTypes, getAllowedPluginTypes, getApplicationDesc, getCommandLineArguments, getCommandLineHandler, getConfigurationManager, getErrorLogger, getPlugin, getPluginForName, getPlugins, getPluginsManager, getPluginsMap, getStartDirectory, getThreadQueue, getTime, hasPlugin, hasPluginsDirectories, hasPluginsDirectoryList, hasSinglePluginsDirectory, initConfiguration, initConfiguration, initConfiguration, initConfiguration, initConfiguration, initProcessFromRegister, isDefaultBlockingActions, loadResources, pluginsActionPerformed, preventOpeningApplication, registerPlugins, serializeConfiguration, setAllowedPluginTypes, setCommandLineArguments, setCommandLineArguments, setCommandLineArguments, setCommandLineHandler, setConfiguration, setDefaultBlockingActions, setErrorLogger, setPluginsConfiguration, setPluginsConfiguration, setPluginsConfigurationFileclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTab, addTab, addTab, addTab, addTab, addTab, closeAllTabs, closeCurrentTab, closeOtherTabs, getFilePropertyForTabappendError, appendMessage, showMessageDialog, showMessageDialog, updateMenusdisposeApplication, executeAction, executeAction, getAdditionalPluginTypes, getAllowedPluginTypes, getApplicationDesc, getApplicationID, getCommandLineArguments, getConfigurationManager, getErrorLogger, getPlugin, getPluginForName, getPlugins, getPluginsManager, getPluginsMap, getStartDirectory, getTime, hasPlugin, isDefaultBlockingActions, setDefaultBlockingActionsgetCommandLineConfiguration, handleCommandLineArguments, handleCommandLineArguments, handleCommandLineExceptionprotected MDIMenuFactory mfactory
protected javax.swing.JTabbedPane tab
protected java.util.Map<java.lang.String,javax.swing.JComponent> tablist
protected java.util.Map<java.lang.String,java.lang.String> nameToTab
protected java.util.Map<java.lang.String,java.lang.String> tabToName
protected java.util.Map<java.lang.String,SwingFileProperties> properties
protected StatusBar statusBar
protected SwingMessageArea message
protected final java.util.List<MDIApplicationListener> appListeners
public AbstractMDIApplication()
public AbstractMDIApplication(java.lang.String title)
title - the GUI frame titlepublic void setTitle(java.lang.String title)
title - the titlepublic java.lang.String getTitle()
public void setDefaultForceCloseTab(char defaultForceCloseTabs)
TabbedApplication.closeCurrentTab(), TabbedApplication.closeAllTabs(), and TabbedApplication.closeOtherTabs() methods will close each tab even if the
 acceptRemoveTab(java.lang.String) return false or FileProperties.isCloseable() return false.
 TabbedApplication.FORCE_CLOSE_NONE: none of the methods will force close tabs by defaultTabbedApplication.FORCE_CLOSE_OTHER_TABS: only the TabbedApplication.closeOtherTabs() method will force close tabs by defaultTabbedApplication.FORCE_CLOSE_ALL_TABS: only the TabbedApplication.closeAllTabs() and TabbedApplication.closeOtherTabs() methods will force close tabs by defaultTabbedApplication.FORCE_CLOSE_ALL: both the TabbedApplication.closeCurrentTab(), TabbedApplication.closeAllTabs() and TabbedApplication.closeOtherTabs() methods will force
 close tabs by defaultdefaultForceCloseTabs - sets which close methods for tabs do not take into account acceptRemoveTab(java.lang.String) return false
 or FileProperties.isCloseable()public char getDefaultForceCloseTab()
TabbedApplication.closeCurrentTab(), TabbedApplication.closeAllTabs(), and TabbedApplication.closeOtherTabs() methods will close each tab even if the
 acceptRemoveTab(java.lang.String) return false or FileProperties.isCloseable() return false. This method return
 TabbedApplication.FORCE_CLOSE_NONE by default:
 TabbedApplication.FORCE_CLOSE_NONE: none of the methods will force close tabs by defaultTabbedApplication.FORCE_CLOSE_OTHER_TABS: only the TabbedApplication.closeOtherTabs() method will force close tabs by defaultTabbedApplication.FORCE_CLOSE_ALL_TABS: only the TabbedApplication.closeAllTabs() and TabbedApplication.closeOtherTabs() methods will force close tabs by defaultTabbedApplication.FORCE_CLOSE_ALL: both the TabbedApplication.closeCurrentTab(), TabbedApplication.closeAllTabs() and TabbedApplication.closeOtherTabs() methods will force
 close tabs by defaultgetDefaultForceCloseTab in interface TabbedApplicationacceptRemoveTab(java.lang.String) return false or
 FileProperties.isCloseable()protected ThreadQueue createThreadQueue()
createThreadQueue in class AbstractApplicationpublic PluginsEDTSupport getPluginsEDTSupport(PluginsManager manager)
getPluginsEDTSupport in interface MDIApplicationgetPluginsEDTSupport in interface GUIApplicationmanager - the PluginsManagerpublic boolean hasClosableTab(boolean hasClosableTab)
preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory))hasClosableTab - true if this application should have closable tabsisClosableTab(), 
preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory)public boolean setCloseIcon(javax.swing.Icon icon)
preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory))icon - the close iconpreparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory)public boolean setCloseIcon(java.net.URL icon)
preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory))icon - the close icon URLpreparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory)public boolean setCloseBackground(java.awt.Color color)
preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory))color - the background colorpreparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory)public boolean setDefaultCloseIcon()
preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory))preparePanels(boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory)public boolean isClosableTab()
isClosableTab in interface TabbedApplicationpublic final void setMenuFactory(MDIMenuFactory mfactory)
mfactory - the menu factorypublic final MDIMenuFactory getMenuFactory()
getMenuFactory in interface GUIApplicationpublic final javax.swing.JFrame getApplicationWindow()
getApplicationWindow in interface GUIApplicationprotected void setChangeTabsAllowed(boolean changeTabsAllowed)
changeTabsAllowed - true if future changes in tabs must be listened to trigger Application actionsprotected boolean isChangeTabsAllowed()
public boolean isEditableMessageArea()
protected void fireTabChanged(SwingFileProperties prop)
MDIApplicationListeners registered in the
 Application.prop - the selected tab FilePropertiesprotected boolean fireTabBeforeClosing(SwingFileProperties prop)
MDIApplicationListeners registered in the Application.prop - the FileProperties that is under the tab before it is removedprotected void fireTabRemoved(SwingFileProperties prop)
MDIApplicationListeners registered in the Application.prop - the FileProperties that is under the tab that was removedpublic void addApplicationListener(MDIApplicationListener listener)
addApplicationListener in interface TabbedApplicationlistener - the application listenerpublic boolean removeApplicationListener(MDIApplicationListener listener)
removeApplicationListener in interface TabbedApplicationlistener - the application listenerpublic java.util.List<MDIApplicationListener> getApplicationListeners()
getApplicationListeners in interface TabbedApplicationpublic void executeAction(MDIAction action, short blockingType)
BlockingType.DEFAULT: use the default blocking type of the applicationBlockingType.BLOCKING: if the action should be blockingBlockingType.NOT_BLOCKING: if the action should not be blockingBlockingType.UI_NOT_BLOCKING:The UI not blocking type, the action must be performed in the UI ThreadBlockingType.UI_BLOCKING:The UI blocking type, the action must be performed in the UI ThreadexecuteAction in interface MDIApplicationexecuteAction in class AbstractApplicationaction - the ActionblockingType - the enumeration specifying if the action should be blockingpublic void executeAction(MDIAction action, short blockingType, java.lang.ClassLoader loader)
BlockingType.DEFAULT: use the default blocking type of the applicationBlockingType.BLOCKING: if the action should be blockingBlockingType.NOT_BLOCKING: if the action should not be blockingBlockingType.UI_NOT_BLOCKING:The UI not blocking type, the action must be performed in the UI ThreadBlockingType.UI_BLOCKING:The UI blocking type, the action must be performed in the UI ThreadexecuteAction in interface MDIApplicationexecuteAction in class AbstractApplicationaction - the ActionblockingType - the enumeration specifying if the action should be blockingloader - the ClassLoader to execute the actionprotected void preparePanels()
protected void preparePanels(boolean hasStatusbar,
                             boolean hasToolBar,
                             MDIMenuFactory mfactory)
hasStatusbar - true if there is a StatusbarhasToolBar - true if there is a ToolBarmfactory - theAbstractMDIMenuFactory used with this MDIApplicationprotected void preparePanels(SwingMessageArea area, boolean hasStatusbar, boolean hasToolBar, MDIMenuFactory mfactory)
area - the Message Area (can be null if there is no Message Area)hasStatusbar - true if there is a Status barhasToolBar - true if there is a ToolBarmfactory - theAbstractMDIMenuFactoryy used with this MDIApplicationprotected void preparePanels(int messageAreaSize,
                             MDIMenuFactory mfactory)
messageAreaSize - the number of rows of the Message Area, or 0 or less if there is no Message Areamfactory - the MDIMenuFactory used with this MDIApplicationpreparePanels(int, boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory)protected void preparePanels(int messageAreaSize,
                             boolean hasStatusbar,
                             boolean hasToolBar,
                             MDIMenuFactory mfactory)
DefaultMessageArea), but that any specific message area implementation can be provided (see
 SwingMessageArea).messageAreaSize - the number of rows of the Message Area, or 0 or less if there is no Message AreahasStatusbar - true if there is a Status barhasToolBar - true if there is a ToolBarmfactory - the MDIMenuFactory used with this MDIApplicationprotected void preparePanels(int messageAreaSize,
                             int messageAreaType,
                             boolean hasStatusbar,
                             boolean hasToolBar,
                             MDIMenuFactory mfactory)
DefaultMessageArea), but that any specific message area implementation can be provided (see
 SwingMessageArea).messageAreaSize - the number of rows of the Message Area, or 0 or less if there is no Message AreamessageAreaType - the message area typehasStatusbar - true if there is a Status barhasToolBar - true if there is a ToolBarmfactory - the MDIMenuFactory used with this MDIApplicationprotected void preparePanels(MDIApplicationProperties appProperties)
DefaultMessageArea), but that any specific message area implementation can be provided (see
 SwingMessageArea).appProperties - the application propertiespublic SwingMessageArea getMessageArea(SwingFileProperties properties)
getMessageArea in interface GUIApplicationproperties - the propertiespublic final SwingMessageArea getMessageArea()
getMessageAreaType() methods returns, if can be the global message area,
 or the message area associated with the currently selected tab.getMessageArea in interface GUIApplicationprotected final void setMessageArea(SwingMessageArea message)
preparePanels(int, boolean, boolean, org.mdi.bootstrap.swing.MDIMenuFactory).message - the MDIApplication Message Areapublic final void setDialogHelper(MDIDialogHelper helper)
setDialogHelper in interface GUIApplicationhelper - the dialog helperpublic final MDIDialogHelper getDialogHelper()
getDialogHelper in interface GUIApplicationpublic void setDefaultDialogOpenType(MDIDialogType openType)
setDefaultDialogOpenType in interface GUIApplicationopenType - the default dialog opening typepublic MDIDialogType getDefaultDialogOpenType()
getDefaultDialogOpenType in interface GUIApplicationpublic int showDialog(MDIDialog dialog)
showDialog in interface GUIApplicationdialog - the dialogJFileChooser.APPROVE_OPTION, or JFileChooser.CANCEL_OPTIONMDIDialogTypepublic int showDialog(MDIDialog dialog, javax.swing.AbstractAction action)
showDialog in interface GUIApplicationdialog - the dialogaction - the associated ActionJFileChooser.APPROVE_OPTION, or JFileChooser.CANCEL_OPTIONMDIDialogTypepublic int showDialog(MDIDialog dialog, MDIDialogType openType)
showDialog in interface GUIApplicationdialog - the dialogopenType - the opening type of the dialogJFileChooser.APPROVE_OPTION, or JFileChooser.CANCEL_OPTIONMDIDialogTypepublic int showDialog(MDIDialogBuilder builder, MDIDialogType openType)
showDialog in interface GUIApplicationbuilder - the dialog builderopenType - the opening type of the dialogJFileChooser.APPROVE_OPTION, or JFileChooser.CANCEL_OPTIONMDIDialogTypepublic int showDialog(MDIDialogBuilder builder)
showDialog in interface GUIApplicationbuilder - the dialog builderJFileChooser.APPROVE_OPTION, or JFileChooser.CANCEL_OPTIONMDIDialogTypepublic int showMessageDialog(java.lang.String title,
                             int messageType,
                             boolean isModal,
                             boolean isResizable,
                             java.lang.String... messages)
showMessageDialog in interface GUIApplicationtitle - the dialog titlemessageType - the message typeisModal - true if the dialog is modalisResizable - true if the dialog is resizablemessages - the list of messages, which will be shown in a vertical gridJFileChooser.APPROVE_OPTIONpublic void cancelDialog(MDIDialog dialog)
cancelDialog in interface GUIApplicationdialog - the dialogpublic void applyDialog(MDIDialog dialog)
applyDialog in interface GUIApplicationdialog - the dialogpublic int showDialog(MDIDialog dialog, javax.swing.AbstractAction action, MDIDialogType openType)
showDialog in interface GUIApplicationdialog - the dialogaction - the associated ActionopenType - the opening type of the dialogJFileChooser.APPROVE_OPTION, or JFileChooser.CANCEL_OPTIONMDIDialogTypepublic boolean isDialogOpened(MDIDialog dialog)
isDialogOpened in interface GUIApplicationdialog - the dialogpublic void startTime(MDIAction action)
startTime in interface MDIApplicationstartTime in class AbstractApplicationaction - the Actionpublic long stopTime(MDIAction action)
stopTime in interface MDIApplicationstopTime in class AbstractApplicationaction - the Actionprotected java.lang.String getUnusedName(java.lang.String name)
name - the tab namepublic boolean setComponenAt(java.lang.String name,
                             javax.swing.JComponent comp)
setComponenAt in interface TabbedApplicationname - the tab namecomp - the componentpublic short getMessageAreaType()
MessageAreaType.MESSAGEAREA_NONE: No message areaMessageAreaType.MESSAGEAREA_GLOBAL: A global message area for all tabsMessageAreaType.MESSAGEAREA_PER_TAB: One message area for each tabgetMessageAreaType in interface GUIApplicationMessageAreaTypepublic boolean hasPerTabMessageArea()
hasPerTabMessageArea in interface TabbedApplicationgetMessageAreaType()public boolean hasGlobalMessageArea()
hasGlobalMessageArea in interface TabbedApplicationgetMessageAreaType()public SwingFileProperties addTab(javax.swing.JComponent comp, javax.swing.Icon icon, SwingFileProperties prop, java.lang.String tooltip)
addTab in interface TabbedApplicationcomp - the component to addicon - the iconprop - the properties of the panel, advertising the type of the tab, and what can be done with ittooltip - the tooltippublic SwingFileProperties addTab(javax.swing.JComponent comp, javax.swing.Icon icon, java.lang.Object obj, java.lang.String name, java.lang.String tooltip, boolean isCloseable)
FileProperties will be created.addTab in interface TabbedApplicationcomp - the component to addicon - the iconobj - the associated objectname - the name of the tabtooltip - the tooltipisCloseable - true if the tab is closeablepublic void closeAllTabs(boolean forceClose)
closeAllTabs in interface TabbedApplicationforceClose - true if the application should not check for the result of acceptRemoveTab(java.lang.String) before closing if the
 current tab content has been modifiedpublic void closeOtherTabs(boolean forceClose)
closeOtherTabs in interface TabbedApplicationforceClose - true if the application should not check for the result of acceptRemoveTab(java.lang.String) before closing if the
 current tab content has been modifiedpublic boolean closeCurrentTab(boolean forceClose)
closeCurrentTab in interface TabbedApplicationforceClose - true if the application should not check for the result of acceptRemoveTab(java.lang.String) before closing if the
 current tab content has been modifiedpublic javax.swing.JTabbedPane getTabbedPane()
getTabbedPane in interface TabbedApplicationpublic int getTabCount()
getTabCount in interface TabbedApplicationpublic void setCurrentTabModified(boolean isModified)
setCurrentTabModified in interface TabbedApplicationisModified - true if the current tab is modifiedsetModified(java.lang.String, boolean)public void setModified(java.lang.String name,
                        boolean isModified)
setModified in interface TabbedApplicationname - thr tab nameisModified - true if the tab is modifiedpublic java.lang.String getRealNameForTab(java.lang.String tabName)
getRealNameForTab in interface TabbedApplicationtabName - the tab displayed namepublic java.lang.String getTabDisplayedName(java.lang.String name)
getTabDisplayedName in interface TabbedApplicationname - the tab namepublic boolean isModified(java.lang.String name)
isModified in interface TabbedApplicationname - the tab namesetModified(java.lang.String, boolean)public void renameTab(java.lang.String oldName,
                      java.lang.String newName)
oldName - the old tab namenewName - the new tab namepublic boolean acceptRemoveTab(java.lang.String name)
 public boolean acceptRemoveTab(String name) {
   if (tabToName.containsKey(name)) {
      name = tabToName.get(name);
     if (isModified(name)) {
        FileProperties prop = properties.get(name);
        Object o = prop.getObject();
        // here save the associated object, the code will depend on the application
     }
   }
   return true;
 }
 acceptRemoveTab in interface TabbedApplicationname - the tab namepublic SwingFileProperties removeTab(java.lang.String name)
removeTab in interface TabbedApplicationname - the tab nameprotected void manageTabs(java.awt.event.MouseEvent e)
public SwingFileProperties setSelectedTab(java.lang.String name)
setSelectedTab in interface TabbedApplicationname - the tab namepublic SwingFileProperties removeSelectedTab()
removeSelectedTab in interface TabbedApplicationpublic java.util.Map<java.lang.String,javax.swing.JComponent> getTabList()
getTabList in interface TabbedApplicationpublic boolean hasTab(java.lang.String name)
name - the tab namepublic java.util.Map<java.lang.String,SwingFileProperties> getTabPropertiesList()
getTabPropertiesList in interface TabbedApplicationpublic java.util.Map<java.lang.String,SwingFileProperties> getCompatibleTabs(MetaData properties, boolean excludeSelected)
The compatible panels are the Panels :
getCompatibleTabs in interface TabbedApplicationproperties - the properties MetaData whose panels properties must be compatibleexcludeSelected - true if the selected tab must be excludedpublic final javax.swing.JComponent getComponent(java.lang.String name)
getComponent in interface GUIApplicationname - the tab namepublic javax.swing.JComponent getComponent(java.lang.Object object)
FileProperties.getObject(). Note that it is guaranteed that
 even if two objects for which the Object.equals(java.lang.Object) methods returns true, and they are associated with different tabs, the
 respective correct tabs will be returned for reach object.getComponent in interface GUIApplicationobject - the objectpublic SwingFileProperties getFileProperties(java.lang.Object object)
FileProperties.getObject(). Note that it is guaranteed that
 even if two objects for which the Object.equals(java.lang.Object) methods returns true, and they are associated with different tabs, the
 respective correct FileProperties will be returned for reach object.getFileProperties in interface GUIApplicationobject - the objectpublic final SwingFileProperties getProperties(java.lang.String name)
getProperties in interface GUIApplicationname - the tab namepublic final javax.swing.JComponent getSelectedComponent()
getSelectedComponent in interface GUIApplicationprotected boolean hasStatusBar()
protected boolean hasToolBar()
public boolean hasSelectedTab()
hasSelectedTab in interface GUIApplicationpublic final SwingFileProperties getSelectedProperties()
getSelectedProperties in interface GUIApplicationpublic StatusBar getStatusBar()
If (and only if) the Status bar is null it will be created beforehand. Since this method is used at creation, it can be therefore used to specialize the status bar.
getStatusBar in interface GUIApplicationpublic final javax.swing.JPanel getToolBarPanel()
getToolBarPanel in interface GUIApplicationpublic javax.swing.JMenuBar getMenuBar()
getMenuBar in interface GUIApplicationpublic void showActionException(java.lang.String message,
                                java.lang.Exception e)
showActionException in interface MDIApplicationshowActionException in class AbstractApplicationmessage - the message to showe - the Exceptionpublic void noWriteMessages()
noWriteMessages in interface MDIApplicationnoWriteMessages in class AbstractApplicationpublic void noTimeMessages()
noTimeMessages in interface MDIApplicationnoTimeMessages in class AbstractApplicationprotected void appendMessage(java.lang.String message,
                             java.lang.String htmlColor)
public void endAction(MDIAction action)
endAction in interface MDIApplicationendAction in class AbstractApplicationaction - the actionpublic void updateUI()
updateUI in interface GUIApplicationpublic void dispose()
AbstractApplication.disposeApplication().public void setSize(int width,
                    int height)
width - the frame widthheight - the frame heightpublic void setVisible(boolean visible)
visible - true if the underlying Frame should be visible