public class IlvMDITabbedPane extends JTabbedPane implements IlvMDIClient, IlvMDIContainerTemplate
IlvMDIClient interface
that manages child IlvMDITab containers.JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListenerJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SETTINGS_NAME
Default name for tabbed panes within the settings.
|
static String |
PANE_CLASS_ATTRIBUTE
Name of the attribute that stores the class of the pane to construct.
|
static String |
TABBED_PANE_SETTINGS_TYPE
Settings type for storing preferences of a tabbed pane
|
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUTlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDEFAULT_WINDOW_LIST_COMMANDBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
IlvMDITabbedPane()
Creates a new MDI tabbed pane.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMDICLientListener(MDIClientListener listener)
Adds the specified MDI client listener to receive events from this
MDI client.
|
void |
addViewContainer(IlvMDIViewContainer viewContainer)
Adds a newly created tab to the tabbed pane.
|
protected IlvMDITab |
createTab(IlvDocument document)
Factory method for creating a tab for the specified document.
|
IlvMDIViewContainer |
createViewContainer(IlvDocument document)
Creates a new MDI tab for the specified document.
|
protected void |
fireMDIClientEvent(int id,
IlvMDIViewContainer container)
Fires a client event for the specified
id event
and the specified container. |
IlvMDIViewContainer |
getActiveViewContainer()
Returns the MDI tab currently active in the MDI client.
|
IlvApplication |
getApplication()
Returns the application associated with this tabbed pane.
|
Container |
getClientContainer()
Returns the container that owns all the MDI child containers.
|
String |
getDocumentListActionCommand()
Gets the command name of the action list that is used for
displaying the list of opened documents in this MDI client.
|
IlvSettings |
getSettings()
Returns the settings that initialize the tabbed pane.
|
IlvSettingsElement |
getSettingsElement()
Returns the settings element that provides the settings for this
MDI tabbed pane.
|
String |
getSettingsName()
Returns the name that identifies the MDI tab pane within the settings.
|
IlvSettingsQuery |
getSettingsQuery()
Returns the query that selects the settings element that provides
the settings of this MDI tabbed pane.
|
String |
getSettingsType()
Returns the type of the settings elements that provides the settings for
MDI tab panes.
|
protected void |
readSettings(IlvSettingsElement settingsElement)
Initializes the tabbed pane with the specified settings element.
|
void |
remove(Component component)
Removes the specified
Component from the tabbed pane. |
void |
remove(int index)
Removes the tab which corresponds to the specified index.
|
void |
removeAll()
Removes all the tabs and their corresponding components.
|
void |
removeMDIClientListener(MDIClientListener listener)
Removes the specified MDI client listener so that it no longer receives
MDI client events from this MDI client.
|
void |
removeTabAt(int index)
Removes the tab at the specified
index. |
void |
setApplication(IlvApplication application)
Sets the application associated with this tabbed pane.
|
void |
setDocumentListActionCommand(String command)
Sets the command name of the action list that is used for
displaying the list of opened documents in this MDI client.
|
void |
setSelectedIndex(int index)
Sets the selected index for this tabbed pane.
|
void |
setSettings(IlvSettings settings)
Sets the settings that initialize the tabbed pane.
|
void |
setSettingsElement(IlvSettingsElement element)
Forces the settings of the MDI tabbed pane to be read and written from the
specified settings element.
|
void |
setSettingsName(String settingsName)
Sets the name that identifies the MDI tab pane within the settings.
|
void |
setSettingsQuery(IlvSettingsQuery query)
Sets the query that selects the settings element that provides the settings
for this MDI tabbed pane.
|
void |
setSettingsType(String settingsType)
Sets the type of the settings elements that provides the settings for
MDI tabbed panes.
|
void |
setTitleAt(int index,
String title)
Sets the title at
index to title, which
can be null. |
void |
setTitleFrame(JFrame frame)
Sets the frame whose title will be completed with the title of the
active tab of this tabbed pane.
|
void |
setToolTipTextAt(int index,
String toolTipText)
Sets the tooltip text at
index to
toolTipText, which can be null. |
protected void |
writeSettings(IlvSettingsElement settingsElement)
Writes the settings of the MDI tabbed pane.
|
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, removeChangeListener, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateaddContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static String TABBED_PANE_SETTINGS_TYPE
public static String PANE_CLASS_ATTRIBUTE
IlvMDITab are constructed.public static String DEFAULT_SETTINGS_NAME
public IlvSettings getSettings()
setSettings(ilog.views.appframe.settings.IlvSettings)public void setSettings(IlvSettings settings)
settings - The new settings of the tabbed pane.getSettings()public String getSettingsName()
name attribute of the
settings element that provides the settings for the associated object.
If no name has been specified using the method setSettingsName(java.lang.String),
null is returned.setSettingsName(java.lang.String),
getSettingsElement(),
getSettingsQuery()public void setSettingsName(String settingsName)
settingsName - The new settings name.public String getSettingsType()
TABBED_PANE_SETTINGS_TYPE string if no
settings type has been specified with the method setSettingsType(java.lang.String).readSettings(ilog.views.appframe.settings.IlvSettingsElement),
setSettingsType(java.lang.String)public void setSettingsType(String settingsType)
settingsType - The new settings type.readSettings(ilog.views.appframe.settings.IlvSettingsElement),
getSettingsType()public void setSettingsQuery(IlvSettingsQuery query)
query - The new settings query.getSettingsQuery()public IlvSettingsQuery getSettingsQuery()
If a query has been specified with the method setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery),
it is returned. Otherwise, a query is built for selecting a settings
root element with the type returned by getSettingsType() and the
value of the name attribute equal to the name returned
by getSettingsName(). If getSettingsName() returns
null, the query selects the first encountered root element
with the settings type given by the method getSettingsType().
setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery),
#see #getSettingsTypepublic void setSettingsElement(IlvSettingsElement element)
getSettings() with the query getSettingsQuery().element - The settings element that provides the settings for the
MDI tabbed pane.getSettingsElement()public IlvSettingsElement getSettingsElement()
setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement) method, it is returned. Otherwise,
the settings element is selected from the settings given by the
getSettings() method, with the query returned by
getSettingsQuery().null if no settings
element could be found.setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement),
getSettingsQuery()public IlvMDIViewContainer getActiveViewContainer()
getActiveViewContainer in interface IlvMDIClientnull if the MDI
client does not contain MDI tabs.public void addMDICLientListener(MDIClientListener listener)
null, no exception is thrown and no
action is performed.addMDICLientListener in interface IlvMDIClientlistener - The MDI client listener to add.public void removeMDIClientListener(MDIClientListener listener)
listener is null, no exception is thrown
and no action is performed.removeMDIClientListener in interface IlvMDIClientlistener - The MDI client listener to remove.public Container getClientContainer()
getClientContainer in interface IlvMDIClientpublic IlvMDIViewContainer createViewContainer(IlvDocument document)
createViewContainer in interface IlvMDIContainerTemplateIlvMDITab class.IlvMDIContainerTemplate.addViewContainer(ilog.views.appframe.docview.IlvMDIViewContainer)public void addViewContainer(IlvMDIViewContainer viewContainer)
addViewContainer in interface IlvMDIContainerTemplateviewContainer - The newly created tab to add.IlvMDITabprotected void readSettings(IlvSettingsElement settingsElement)
settingsElement - The settings element from which to initialize the
MDI tabbed pane.protected void writeSettings(IlvSettingsElement settingsElement)
settingsElement - The root settings element to write the settings to.public void setTitleFrame(JFrame frame)
setTitleFrame in interface IlvMDIClientframe - The frame whose title is completed with the title of the
active tab.public void setSelectedIndex(int index)
JTabbedPane implementation to not notify the
application when the previously selected pane is deactivated. This avoids
useless initializations to be performed at the application level.setSelectedIndex in class JTabbedPaneindex - The index to be selected.IllegalArgumentException - if index is out of bounds.JTabbedPane.getSelectedIndex(),
SingleSelectionModel.setSelectedIndex(int)public IlvApplication getApplication()
getApplication in interface IlvMDIClientsetApplication(ilog.views.appframe.IlvApplication)public void setApplication(IlvApplication application)
setApplication in interface IlvMDIClientapplication - The application of the tabbed pane.getApplication()public String getDocumentListActionCommand()
getDocumentListActionCommand in interface IlvMDIClientpublic void setDocumentListActionCommand(String command)
command - The command name of the action list.public void removeAll()
removeAll in class JTabbedPanepublic void removeTabAt(int index)
index.removeTabAt in class JTabbedPanepublic void remove(Component component)
Component from the tabbed pane.
The method does nothing if the component is null
or there is no tab.remove in class JTabbedPanepublic void remove(int index)
remove in class JTabbedPanepublic void setTitleAt(int index,
String title)
index to title, which
can be null.
An internal exception is raised if there is no tab at that index.setTitleAt in class JTabbedPaneindex - The tab index where the title should be set.title - The title to be displayed in the tab.IllegalArgumentException - if index is out of bounds.JTabbedPane.getTitleAt(int)public void setToolTipTextAt(int index,
String toolTipText)
index to
toolTipText, which can be null.
An internal exception is raised if there is no tab at that index.setToolTipTextAt in class JTabbedPaneprotected IlvMDITab createTab(IlvDocument document)
protected void fireMDIClientEvent(int id,
IlvMDIViewContainer container)
id event
and the specified container.id - The ID of the client event.container - The container that originates the event.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.