public interface TabbedApplication extends GUIApplication
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.
|
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,
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,
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.
|
void |
closeAllTabs()
Close all tabs.
|
void |
closeAllTabs(boolean forceClose)
Close all tabs.
|
void |
closeCurrentTab()
Close the currently opened Tab.
|
void |
closeCurrentTab(boolean forceClose)
Close the currently opened Tab.
|
void |
closeOtherTabs()
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.
|
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.
|
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.
|
applyDialog, cancelDialog, getApplicationWindow, getComponent, getComponent, getDefaultDialogOpenType, getDialogHelper, getFileProperties, getMenuBar, getMenuFactory, getMessageArea, getPluginsEDTSupport, getProperties, getSelectedComponent, getSelectedProperties, getStatusBar, getToolBarPanel, hasSelectedTab, isDialogOpened, setDefaultDialogOpenType, setDialogHelper, showDialog, showDialog, showDialog, showDialog, showDialog, showDialog, showMessageDialog, showMessageDialog, showMessageDialog, updateMenus, updateUI
disposeApplication, endAction, executeAction, executeAction, executeAction, executeAction, getAdditionalPluginTypes, getAllowedPluginTypes, getApplicationDesc, getApplicationID, getCommandLineArguments, getConfigurationManager, getErrorLogger, getPlugin, getPluginForName, getPlugins, getPluginsManager, getPluginsMap, getStartDirectory, getTime, hasPlugin, isDefaultBlockingActions, noTimeMessages, noWriteMessages, setDefaultBlockingActions, showActionException, startTime, stopTime
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()
java.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 tabSwingFileProperties 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 tooltipjavax.swing.JTabbedPane getTabbedPane()
SwingFileProperties removeTab(java.lang.String name)
name
- the tab nameint getTabCount()
void closeAllTabs()
closeAllTabs(boolean)
with false for the
forceClose
argument. This means that the application will check for the result of
acceptRemoveTab(java.lang.String)
before closing for each modified tabvoid 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 modifiedvoid closeOtherTabs()
void closeCurrentTab()
closeCurrentTab(boolean)
with false for the
forceClose
argument. This means that the application will check for the result of
acceptRemoveTab(java.lang.String)
before closing if the current tab content has been modified.void 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