ilog.views.appframe.swing.mdi
Class IlvMDITabbedPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTabbedPane
                  extended by ilog.views.appframe.swing.mdi.IlvMDITabbedPane
All Implemented Interfaces:
IlvContainerTemplate, IlvMDIContainerTemplate, IlvMDIClient, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class IlvMDITabbedPane
extends JTabbedPane
implements IlvMDIClient, IlvMDIContainerTemplate

Implementation of the IlvMDIClient interface that manages child IlvMDITab containers.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
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
 
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface ilog.views.appframe.swing.mdi.IlvMDIClient
DEFAULT_WINDOW_LIST_COMMAND
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
IlvMDITabbedPane()
          Creates a new MDI tabbed pane.
 
Method Summary
 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.
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, insertTab, isEnabledAt, paramString, removeChangeListener, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setTabLayoutPolicy, setTabPlacement, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, update
 
Methods inherited from class java.awt.Container
addContainerListener, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TABBED_PANE_SETTINGS_TYPE

public static String TABBED_PANE_SETTINGS_TYPE
Settings type for storing preferences of a tabbed pane


PANE_CLASS_ATTRIBUTE

public static String PANE_CLASS_ATTRIBUTE
Name of the attribute that stores the class of the pane to construct. If this attribute is not specified, panes of class IlvMDITab are constructed.


DEFAULT_SETTINGS_NAME

public static String DEFAULT_SETTINGS_NAME
Default name for tabbed panes within the settings.

Constructor Detail

IlvMDITabbedPane

public IlvMDITabbedPane()
Creates a new MDI tabbed pane.

Method Detail

getSettings

public IlvSettings getSettings()
Returns the settings that initialize the tabbed pane.

Returns:
The settings of the tabbed pane.
See Also:
setSettings(ilog.views.appframe.settings.IlvSettings)

setSettings

public void setSettings(IlvSettings settings)
Sets the settings that initialize the tabbed pane.

Parameters:
settings - The new settings of the tabbed pane.
See Also:
getSettings()

getSettingsName

public String getSettingsName()
Returns the name that identifies the MDI tab pane within the settings. It corresponds to the value of the 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.

Returns:
The settings name.
See Also:
setSettingsName(java.lang.String), getSettingsElement(), getSettingsQuery()

setSettingsName

public void setSettingsName(String settingsName)
Sets the name that identifies the MDI tab pane within the settings.

Parameters:
settingsName - The new settings name.

getSettingsType

public String getSettingsType()
Returns the type of the settings elements that provides the settings for MDI tab panes.

Returns:
The TABBED_PANE_SETTINGS_TYPE string if no settings type has been specified with the method setSettingsType(java.lang.String).
See Also:
readSettings(ilog.views.appframe.settings.IlvSettingsElement), setSettingsType(java.lang.String)

setSettingsType

public void setSettingsType(String settingsType)
Sets the type of the settings elements that provides the settings for MDI tabbed panes.

Parameters:
settingsType - The new settings type.
See Also:
readSettings(ilog.views.appframe.settings.IlvSettingsElement), getSettingsType()

setSettingsQuery

public void setSettingsQuery(IlvSettingsQuery query)
Sets the query that selects the settings element that provides the settings for this MDI tabbed pane.

Parameters:
query - The new settings query.
See Also:
getSettingsQuery()

getSettingsQuery

public IlvSettingsQuery getSettingsQuery()
Returns the query that selects the settings element that provides the settings of this MDI tabbed pane.

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().

Returns:
The settings query.
See Also:
setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery), #see #getSettingsType

setSettingsElement

public void setSettingsElement(IlvSettingsElement element)
Forces the settings of the MDI tabbed pane to be read and written from the specified settings element. This method overrides the settings element that is selected by default within the settings given by the method getSettings() with the query getSettingsQuery().

Parameters:
element - The settings element that provides the settings for the MDI tabbed pane.
See Also:
getSettingsElement()

getSettingsElement

public IlvSettingsElement getSettingsElement()
Returns the settings element that provides the settings for this MDI tabbed pane. If a settings element has been specified with the 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().

Returns:
The settings element, or null if no settings element could be found.
See Also:
setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement), getSettingsQuery()

getActiveViewContainer

public IlvMDIViewContainer getActiveViewContainer()
Returns the MDI tab currently active in the MDI client.

Specified by:
getActiveViewContainer in interface IlvMDIClient
Returns:
The active view container; it is null if the MDI client does not contain MDI tabs.

addMDICLientListener

public void addMDICLientListener(MDIClientListener listener)
Adds the specified MDI client listener to receive events from this MDI client. If it is null, no exception is thrown and no action is performed.

Specified by:
addMDICLientListener in interface IlvMDIClient
Parameters:
listener - The MDI client listener to add.

removeMDIClientListener

public void removeMDIClientListener(MDIClientListener listener)
Removes the specified MDI client listener so that it no longer receives MDI client events from this MDI client. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener is null, no exception is thrown and no action is performed.

Specified by:
removeMDIClientListener in interface IlvMDIClient
Parameters:
listener - The MDI client listener to remove.

getClientContainer

public Container getClientContainer()
Returns the container that owns all the MDI child containers.

Specified by:
getClientContainer in interface IlvMDIClient

createViewContainer

public IlvMDIViewContainer createViewContainer(IlvDocument document)
Creates a new MDI tab for the specified document.

Specified by:
createViewContainer in interface IlvMDIContainerTemplate
Returns:
The newly created MDI tab, an instance of the IlvMDITab class.
See Also:
IlvMDIContainerTemplate.addViewContainer(ilog.views.appframe.docview.IlvMDIViewContainer)

addViewContainer

public void addViewContainer(IlvMDIViewContainer viewContainer)
Adds a newly created tab to the tabbed pane.

Specified by:
addViewContainer in interface IlvMDIContainerTemplate
Parameters:
viewContainer - The newly created tab to add.
See Also: