public interface TabbedApplication extends GUIApplication
| Modifier and Type | Field and Description |
|---|---|
static char |
FORCE_CLOSE_ALL
Specify that all of the
closeCurrentTab(), closeAllTabs(), and closeOtherTabs() methods will force close by default. |
static char |
FORCE_CLOSE_ALL_TABS
Specify that only the
closeOtherTabs() and closeAllTabs() methods will force close by default. |
static char |
FORCE_CLOSE_NONE
Specify that none of the
closeCurrentTab(), closeAllTabs(), and closeOtherTabs() methods will force close by default. |
static char |
FORCE_CLOSE_OTHER_TABS
Specify that only the
closeOtherTabs() method will force close by default. |
| 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.
|
default SwingFileProperties |
addTab(javax.swing.Icon icon,
SwingFileProperties properties,
java.lang.String tooltip)
Add a tab with a specified name and panel.
|
default SwingFileProperties |
addTab(javax.swing.JComponent comp,
javax.swing.Icon icon,
java.lang.Object obj,
java.lang.String name,
java.lang.String tooltip)
Add an undefined tab.
|
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.An associated undefined
FileProperties will be created. |
SwingFileProperties |
addTab(javax.swing.JComponent comp,
javax.swing.Icon icon,
SwingFileProperties properties,
java.lang.String tooltip)
Add a tab with a specified name and panel.
|
default SwingFileProperties |
addTab(javax.swing.JComponent comp,
java.lang.Object obj,
java.lang.String name)
Add an undefined tab.
|
default SwingFileProperties |
addTab(javax.swing.JComponent comp,
java.lang.Object obj,
java.lang.String name,
boolean isCloseable)
Add an undefined tab.An associated undefined
FileProperties will be created. |
default SwingFileProperties |
addTab(javax.swing.JComponent comp,
SwingFileProperties properties)
Add a tab with a specified name and panel.
|
default SwingFileProperties |
addTab(SwingFileProperties properties)
Add a tab with a specified name and panel.
|
default void |
closeAllTabs()
Close all tabs.
|
void |
closeAllTabs(boolean forceClose)
Close all tabs.
|
default boolean |
closeCurrentTab()
Close the currently opened Tab.
|
boolean |
closeCurrentTab(boolean forceClose)
Close the currently opened Tab.
|
default void |
closeOtherTabs()
Close all Tabs except the current one.
|
void |
closeOtherTabs(boolean forceClose)
Close all Tabs except the current one.
|
java.util.List<MDIApplicationListener> |
getApplicationListeners()
Return the list of application listeners.
|
java.util.Map<java.lang.String,SwingFileProperties> |
getCompatibleTabs(MetaData properties,
boolean excludeSelected)
Return all the panels that are compatible with the given properties Map.
|
default char |
getDefaultForceCloseTab()
Return which of the
closeCurrentTab(), closeAllTabs(), and closeOtherTabs() methods will close each tab even if the
acceptRemoveTab(java.lang.String) return false or FileProperties.isCloseable() return false. |
default SwingFileProperties |
getFilePropertyForTab(java.lang.String name)
Return the file property associated with a tab name.
|
java.lang.String |
getRealNameForTab(java.lang.String tabName)
Return the real name corresponding with a displayed tab name.
|
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.
|
default boolean |
hasGlobalMessageArea()
Return true if there is one global message area..
|
default boolean |
hasPerTabMessageArea()
Return true if there is one message area for each tab.
|
boolean |
isClosableTab()
Return true if this applications use tabs closable with a button on the tabs header.
|
boolean |
isModified(java.lang.String name)
Return true if the tab is modified.
|
boolean |
removeApplicationListener(MDIApplicationListener listener)
Remove an application listener.
|
SwingFileProperties |
removeSelectedTab()
Called when removing the selected tab.
|
SwingFileProperties |
removeTab(java.lang.String name)
Remove a tab of the specified name.
|
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.
|
void |
setModified(java.lang.String name,
boolean isModified)
Set the modified state of a tab.
|
default SwingFileProperties |
setSelectedTab(java.lang.String name)
Set the selected tab.
|
appendError, appendMessage, applyDialog, cancelDialog, getApplicationWindow, getComponent, getComponent, getDefaultDialogOpenType, getDialogHelper, getFileProperties, getMenuBar, getMenuFactory, getMessageArea, getMessageArea, getMessageAreaType, getPluginsEDTSupport, getProperties, getSelectedComponent, getSelectedProperties, getStatusBar, getToolBarPanel, hasSelectedTab, isDialogOpened, setDefaultDialogOpenType, setDialogHelper, showDialog, showDialog, showDialog, showDialog, showDialog, showDialog, showMessageDialog, showMessageDialog, showMessageDialog, updateMenus, updateUIdisposeApplication, endAction, executeAction, executeAction, executeAction, executeAction, getAdditionalPluginTypes, getAllowedPluginTypes, getApplicationDesc, getApplicationID, getCommandLineArguments, getConfigurationManager, getErrorLogger, getPlugin, getPluginForName, getPlugins, getPluginsDeactivationPolicy, getPluginsManager, getPluginsMap, getStartDirectory, getTime, hasPlugin, initConfiguration, initConfiguration, isDefaultBlockingActions, noTimeMessages, noWriteMessages, serializeConfiguration, setDefaultBlockingActions, setPluginsDeactivationPolicy, showActionException, startTime, stopTimestatic final char FORCE_CLOSE_NONE
closeCurrentTab(), closeAllTabs(), and closeOtherTabs() methods will force close by default.static final char FORCE_CLOSE_OTHER_TABS
closeOtherTabs() method will force close by default.static final char FORCE_CLOSE_ALL_TABS
closeOtherTabs() and closeAllTabs() methods will force close by default.static final char FORCE_CLOSE_ALL
closeCurrentTab(), closeAllTabs(), and closeOtherTabs() methods will force close by default.default char getDefaultForceCloseTab()
closeCurrentTab(), closeAllTabs(), and closeOtherTabs() methods will close each tab even if the
acceptRemoveTab(java.lang.String) return false or FileProperties.isCloseable() return false. This method return
FORCE_CLOSE_NONE by default:
FORCE_CLOSE_NONE: none of the methods will force close tabs by defaultFORCE_CLOSE_OTHER_TABS: only the closeOtherTabs() method will force close tabs by defaultFORCE_CLOSE_ALL_TABS: only the closeAllTabs() and closeOtherTabs() methods will force close tabs by defaultFORCE_CLOSE_ALL: both the closeCurrentTab(), closeAllTabs() and closeOtherTabs() methods will force
close tabs by defaultacceptRemoveTab(java.lang.String) return false or
FileProperties.isCloseable()default boolean hasGlobalMessageArea()
GUIApplication.getMessageAreaType()default boolean hasPerTabMessageArea()
GUIApplication.getMessageAreaType()boolean setComponenAt(java.lang.String name,
javax.swing.JComponent comp)
name - the tab namecomp - the componentvoid addApplicationListener(MDIApplicationListener listener)
listener - the application listenerboolean removeApplicationListener(MDIApplicationListener listener)
listener - the application listenerjava.util.List<MDIApplicationListener> getApplicationListeners()
SwingFileProperties removeSelectedTab()
default SwingFileProperties setSelectedTab(java.lang.String name)
name - the tab nameboolean isClosableTab()
java.util.Map<java.lang.String,javax.swing.JComponent> getTabList()
void setCurrentTabModified(boolean isModified)
isModified - true if the current tab is modifiedsetModified(java.lang.String, boolean)void setModified(java.lang.String name,
boolean isModified)
name - thr tab nameisModified - true if the tab is modifiedjava.lang.String getRealNameForTab(java.lang.String tabName)
tabName - the tab displayed namejava.lang.String getTabDisplayedName(java.lang.String name)
name - the tab nameboolean isModified(java.lang.String name)
name - the tab namesetModified(java.lang.String, boolean)boolean acceptRemoveTab(java.lang.String name)
name - the tab namejava.util.Map<java.lang.String,SwingFileProperties> getTabPropertiesList()
default SwingFileProperties getFilePropertyForTab(java.lang.String name)
name - the tab namejava.util.Map<java.lang.String,SwingFileProperties> getCompatibleTabs(MetaData properties, boolean excludeSelected)
The compatible panels are the Panels:
properties - the properties MetaData whose panels properties must be compatibleexcludeSelected - true if the selected tab must be excludeddefault SwingFileProperties addTab(javax.swing.JComponent comp, SwingFileProperties properties)
comp - the component to addproperties - the properties of the panel, advertising the type of the tab, and what can be done with itdefault SwingFileProperties addTab(SwingFileProperties properties)
properties - the properties of the panel, advertising the type of the tab, and what can be done with itdefault SwingFileProperties addTab(javax.swing.Icon icon, SwingFileProperties properties, java.lang.String tooltip)
icon - the iconproperties - the properties of the panel, advertising the type of the tab, and what can be done with ittooltip - the tooltipSwingFileProperties addTab(javax.swing.JComponent comp, javax.swing.Icon icon, SwingFileProperties properties, java.lang.String tooltip)
comp - the component to addicon - the iconproperties - the properties of the panel, advertising the type of the tab, and what can be done with ittooltip - the tooltipdefault SwingFileProperties addTab(javax.swing.JComponent comp, java.lang.Object obj, java.lang.String name)
FileProperties will be created.comp - the component to addobj - the associated objectname - the name of the tabdefault SwingFileProperties addTab(javax.swing.JComponent comp, java.lang.Object obj, java.lang.String name, boolean isCloseable)
FileProperties will be created.comp - the component to addobj - the associated objectname - the name of the tabisCloseable - true if the tab is closeabledefault SwingFileProperties addTab(javax.swing.JComponent comp, javax.swing.Icon icon, java.lang.Object obj, java.lang.String name, java.lang.String tooltip)
FileProperties will be created.comp - the component to addicon - the iconobj - the associated objectname - the name of the tabtooltip - the tooltipSwingFileProperties 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.comp - the component to addicon - the iconobj - the associated objectname - the name of the tabtooltip - the tooltipisCloseable - true if the tab is closeablejavax.swing.JTabbedPane getTabbedPane()
SwingFileProperties removeTab(java.lang.String name)
name - the tab nameint getTabCount()
default void closeAllTabs()
getDefaultForceCloseTab(). This means that the application will check for the
result of acceptRemoveTab(java.lang.String) before closing for each modified tab.void closeAllTabs(boolean forceClose)
forceClose - true if the application should not check for the result of acceptRemoveTab(java.lang.String) before closing if the
current tab content has been modified.default void closeOtherTabs()
getDefaultForceCloseTab().void closeOtherTabs(boolean forceClose)
forceClose - true if the application should not check for the result of acceptRemoveTab(java.lang.String) before closing if the
current tab content has been modifieddefault boolean closeCurrentTab()
getDefaultForceCloseTab().boolean closeCurrentTab(boolean forceClose)
forceClose - true if the application should not check for the result of acceptRemoveTab(java.lang.String) before closing if the
current tab content has been modified