ilog.views.appframe.swing.mdi
Class IlvMDITab

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by ilog.views.appframe.swing.mdi.IlvMDITab
All Implemented Interfaces:
IlvMDIViewContainer, IlvViewContainer, ActionHandler, IlvPropertyManager, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class IlvMDITab
extends JPanel
implements IlvMDIViewContainer

Defines the tab components that are inserted within an IlvMDITabbedPane.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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
 
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.docview.IlvMDIViewContainer
CLOSE_ALL_WINDOWS_CMD, CLOSE_WINDOW_CMD, NEXT_WINDOW_CMD, OWN_TITLE_PROPERTY, PREVIOUS_WINDOW_CMD, TITLE_PROPERTY
 
Fields inherited from interface ilog.views.appframe.docview.IlvViewContainer
ACTIVE_VIEW_PROPERTY, APPLICATION_PROPERTY, CONFIGURATION_NAME_PROPERTY, CONTAINER_TEMPLATE_PROPERTY, DOCUMENT_PROPERTY, DOCUMENT_TEMPLATE_PROPERTY, DOCUMENT_VIEWS_PROPERTY, VISIBILITY_PROPERTY
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
IlvMDITab()
          Constructs a new IlvMDITab.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs.
 void activate()
          Sets the MDI tab active.
 boolean addViews(IlvDocumentView[] views)
          Adds the specified views to the container.
 boolean builtInViews()
          Determines whether this internal frame already contains views when it is created.
 boolean close()
          Closes the MDI tab.
 IlvDocumentView getActiveView()
          Returns the active view of this MDI tab.
 IlvApplication getApplication()
          Returns the application of the view.
 IlvContainerTemplate getContainerTemplate()
          Returns the tabbed pane that has created this tab.
 String getContainerTitle()
          Returns the title of the container.
 IlvDocument getDocument()
          Returns the document associated with this view container.
 Object getProperty(String key)
          Returns the client property of the MDI tab with the specified key.
 IlvDocumentView[] getViews()
          Returns the document views of this container.
 boolean isContainerVisible()
          Determines whether this MDI tab is visible.
 boolean isProcessingAction(String command)
          Determines whether the action handler is able to perform the action with the specified command key in its ActionListener.actionPerformed(java.awt.event.ActionEvent) method.
 void setApplication(IlvApplication application)
          Sets the application of the view.
 void setContainerTitle(String title)
          Sets a new title to the container.
 void setContainerVisible(boolean visible)
          Shows or hides this tab depending on the value of the visible parameter.
 void setDocument(IlvDocument document)
          Sets the document associated with the view.
 Object setProperty(String key, Object value)
          Sets one of the client properties of this MDI tab using the associated key.
 boolean updateAction(Action action)
          Invoked by the application for updating the state of the specified action.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, 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, 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
add, add, add, add, add, 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, remove, remove, removeAll, 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
 
Methods inherited from interface ilog.views.appframe.util.IlvPropertyManager
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

IlvMDITab

public IlvMDITab()
Constructs a new IlvMDITab.

Method Detail

isContainerVisible

public boolean isContainerVisible()
Determines whether this MDI tab is visible.

Specified by:
isContainerVisible in interface IlvViewContainer
Returns:
true if the tab is visible; false otherwise.
See Also:
IlvViewContainer.setContainerVisible(boolean)

setContainerVisible

public void setContainerVisible(boolean visible)
Shows or hides this tab depending on the value of the visible parameter.

Specified by:
setContainerVisible in interface IlvViewContainer
Parameters:
visible - If true, the tab is set visible; if false, the tab is set invisible.
See Also:
isContainerVisible()

close

public boolean close()
Closes the MDI tab.

Specified by:
close in interface IlvMDIViewContainer
Returns:
true if the MDI tab could be closed; false otherwise.

activate

public void activate()
Sets the MDI tab active.

Specified by:
activate in interface IlvViewContainer

getContainerTitle

public String getContainerTitle()
Returns the title of the container.

Specified by:
getContainerTitle in interface IlvMDIViewContainer
Returns:
The value of the IlvMDIViewContainer.TITLE_PROPERTY.
See Also:
setContainerTitle(java.lang.String)

setContainerTitle

public void setContainerTitle(String title)
Sets a new title to the container.
Sets the TITLE_PROPERTY to the specified title.

Specified by:
setContainerTitle in interface IlvMDIViewContainer
Parameters:
title - The new title of the container.
See Also:
getContainerTitle()

getDocument

public IlvDocument getDocument()
Returns the document associated with this view container.

Returns:
The document.
See Also:
setDocument(ilog.views.appframe.docview.IlvDocument), IlvViewContainer.DOCUMENT_PROPERTY

setDocument

public void setDocument(IlvDocument document)
Sets the document associated with the view.

Parameters:
document - The document of the view.
See Also:
getDocument(), IlvViewContainer.DOCUMENT_PROPERTY

getApplication

public IlvApplication getApplication()
Returns the application of the view.

Returns:
The application of the view.
See Also:
setApplication(ilog.views.appframe.IlvApplication), IlvDocumentView.APPLICATION_PROPERTY

setApplication

public void setApplication(IlvApplication application)
Sets the application of the view.

Parameters:
application - The application of the view.
See Also:
getApplication(), IlvDocumentView.APPLICATION_PROPERTY

getActiveView

public IlvDocumentView getActiveView()
Returns the active view of this MDI tab.


builtInViews

public boolean builtInViews()
Determines whether this internal frame already contains views when it is created.

If it already contains views, it is asked to provide the built-in views with the getViews() method. Otherwise, the document template associated with this container provides the document views to the container with the method addViews(ilog.views.appframe.docview.IlvDocumentView[]).

Specified by:
builtInViews in interface IlvMDIViewContainer
Returns:
false for receiving views from the document template; true if it already contains document views.
See Also:
getViews(), addViews(ilog.views.appframe.docview.IlvDocumentView[])

addViews

public boolean addViews(IlvDocumentView[] views)
Adds the specified views to the container.

Specified by:
addViews in interface IlvMDIViewContainer
Parameters:
views - The views to add.
Returns:
true if the views could be added to the container; false otherwise.

getViews

public IlvDocumentView[] getViews()
Returns the document views of this container.

Specified by:
getViews in interface IlvViewContainer
Returns:
The array of views of this view container.

getContainerTemplate

public IlvContainerTemplate getContainerTemplate()
Returns the tabbed pane that has created this tab.

Returns:
The tabbed pane of this tab. An instance of the IlvMDITabbedPane class is returned.

isProcessingAction

public boolean isProcessingAction(String command)
Determines whether the action handler is able to perform the action with the specified command key in its ActionListener.actionPerformed(java.awt.event.ActionEvent) method.

Specified by:
isProcessingAction in interface ActionHandler
Parameters:
command - The command key of the action.
Returns:
false by default.

updateAction

public boolean updateAction(Action action)
Invoked by the application for updating the state of the specified action. For example, the implementation of this method can enable or disable the action.

Specified by:
updateAction in interface ActionHandler
Parameters:
action - The action to update.
Returns:
false by default.

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs. The implementation of the method is empty.

Specified by:
actionPerformed in interface ActionListener

setProperty

public Object setProperty(String key,
                          Object value)
Sets one of the client properties of this MDI tab using the associated key. If the value has changed, a PropertyChangeEvent is sent to property change listeners.

Specified by:
setProperty in interface IlvPropertyManager
Parameters:
key - The non-null property key.
value - An Object value. If it equals null, the property with the specified key is removed.
Returns:
The previous value of the property.
See Also:
getProperty(java.lang.String), JComponent.putClientProperty(java.lang.Object, java.lang.Object)

getProperty

public Object getProperty(String key)
Returns the client property of the MDI tab with the specified key.

Specified by:
getProperty in interface IlvPropertyManager
Parameters:
key - The non-null property key.
Returns:
The value of the specified property. It returns null if the specified property was not found.
See Also:
setProperty(java.lang.String, java.lang.Object), JComponent.getClientProperty(java.lang.Object)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.