ilog.views.appframe.swing.mdi
Class IlvMDIDockingArea

java.lang.Object
  extended by ilog.views.appframe.swing.mdi.IlvMDIDockingArea
All Implemented Interfaces:
IlvContainerTemplate, IlvMDIContainerTemplate, IlvMDIClient

public class IlvMDIDockingArea
extends Object
implements IlvMDIClient, IlvMDIContainerTemplate

Defines objects that create document view containers as new dockable tabs in a docking area.


Field Summary
 
Fields inherited from interface ilog.views.appframe.swing.mdi.IlvMDIClient
DEFAULT_WINDOW_LIST_COMMAND
 
Constructor Summary
IlvMDIDockingArea(IlvDockingArea dockingArea, String emptyDockableName, String styleReferenceDockableName)
          Creates a new IlvMDIDockingArea associated with the specified dockingArea.
IlvMDIDockingArea(IlvDockingArea dockingArea, String emptyDockableName, String styleReferenceDockableName, boolean emptyPaneAlwaysHidden)
          Creates a new IlvMDIDockingArea associated with the specified dockingArea.
 
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.
 boolean closeTab(String name)
          Closes the dockable tab with the specified name.
 IlvMDIViewContainer createViewContainer(IlvDocument document)
          Creates a new MDI tab for the specified document.
 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.
 ActionListener getCloseActionListener()
          Returns the action listener that is invoked when the close button of a dockable pane created by this object has been pressed.
 String getDockableName(IlvMDIViewContainer viewContainer)
          Returns the name of the dockable pane corresponding to the specified view container.
 IlvDockingArea getDockingArea()
          Returns the docking area associated with this object.
 String getDocumentListActionCommand()
          Gets the command name of the action list that is used for displaying the list of opened documents in this MDI client.
 ActionListener getPinActionListener()
          Returns the action listener that is invoked when the pin button of a dockable pane created by this object has been pressed.
 boolean isEmptyPaneAlwaysHidden()
          Determines whether the empty panel is always hidden.
 void removeMDIClientListener(MDIClientListener listener)
          Removes the specified MDI client listener so that it no longer receives MDI client events from this MDI client.
 void setApplication(IlvApplication application)
          Sets the application associated with this tabbed pane.
 void setCloseActionListener(ActionListener listener)
          Sets the action listener that is invoked when the close button of a dockable pane created by this object has been pressed.
 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 setPinActionListener(ActionListener listener)
          Sets the action listener that is invoked when the pin button of a dockable pane created by this object has been pressed.
 void setTitleFrame(JFrame frame)
          Sets the frame whose title will be completed with the title of the active tab of the docking area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMDIDockingArea

public IlvMDIDockingArea(IlvDockingArea dockingArea,
                         String emptyDockableName,
                         String styleReferenceDockableName)
Creates a new IlvMDIDockingArea associated with the specified dockingArea.

Parameters:
dockingArea - The docking area to create new dockable tabs into.
emptyDockableName - The name of the dockable to add new dockable tabs into. It is the responsibility of the JAppFrame user to register a component associated with this dockable name. Typically, this component should be an empty panel.
styleReferenceDockableName - The name of the dockable which styles are used to initialize the new created tabs.
See Also:
IlvMDIDockingArea(ilog.views.appframe.swing.docking.IlvDockingArea, java.lang.String, java.lang.String, boolean)

IlvMDIDockingArea

public IlvMDIDockingArea(IlvDockingArea dockingArea,
                         String emptyDockableName,
                         String styleReferenceDockableName,
                         boolean emptyPaneAlwaysHidden)
Creates a new IlvMDIDockingArea associated with the specified dockingArea.

Parameters:
dockingArea - The docking area to create new dockable tabs into.
emptyDockableName - The name of the dockable to add new dockable tabs into. It is the responsibility of the JAppFrame user to register a component associated with this dockable name. Typically, this component should be an empty panel.
styleReferenceDockableName - The name of the dockable which styles are used to initialize the new created tabs.
emptyPaneAlwaysHidden - Specifies whether the empty pane of this MDI docking area should be kept always hidden.

If this parameter is false, what corresponds to the default mode, the empty pane is set visible in the following cases:

  • After the docking area has been initialized and that the settings of the docking area do not specify tabs docked on the empty pane.
  • After the last tab docked on the empty pane has been closed or docked in another location.
If this parameter equals true, the empty panel will never be visible, even in the cases listed above.
Since:
JViews 6.0
Method Detail

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

setTitleFrame

public void setTitleFrame(JFrame frame)
Sets the frame whose title will be completed with the title of the active tab of the docking area.

Specified by:
setTitleFrame in interface IlvMDIClient
Parameters:
frame - The frame whose title is completed with the title of the active tab.

getApplication

public IlvApplication getApplication()
Returns the application associated with this tabbed pane.

Specified by:
getApplication in interface IlvMDIClient
Returns:
The application.
See Also:
setApplication(ilog.views.appframe.IlvApplication)

setApplication

public void setApplication(IlvApplication application)
Sets the application associated with this tabbed pane.

Specified by:
setApplication in interface IlvMDIClient
Parameters:
application - The application of the tabbed pane.
See Also:
getApplication()

getDocumentListActionCommand

public String getDocumentListActionCommand()
Gets the command name of the action list that is used for displaying the list of opened documents in this MDI client.

Specified by:
getDocumentListActionCommand in interface IlvMDIClient
Returns:
The command name of the action list.

setDocumentListActionCommand

public 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.

Parameters:
command - The command name of the action list.

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:
IlvMDITab

getDockableName

public String getDockableName(IlvMDIViewContainer viewContainer)
Returns the name of the dockable pane corresponding to the specified view container.

Parameters:
viewContainer - The view container to retrieve the dockable pane name of.
Returns:
The name of the dockable pane that corresponds to the specified view container - can be null if the view container was not created using this MDI docking area.

closeTab

public boolean closeTab(String name)
Closes the dockable tab with the specified name.


getDockingArea

public IlvDockingArea getDockingArea()
Returns the docking area associated with this object.


setPinActionListener

public void setPinActionListener(ActionListener listener)
Sets the action listener that is invoked when the pin button of a dockable pane created by this object has been pressed.

Parameters:
listener - The action listener.
See Also:
getPinActionListener()

getPinActionListener

public ActionListener getPinActionListener()
Returns the action listener that is invoked when the pin button of a dockable pane created by this object has been pressed.

See Also:
setPinActionListener(java.awt.event.ActionListener)

setCloseActionListener

public void setCloseActionListener(ActionListener listener)
Sets the action listener that is invoked when the close button of a dockable pane created by this object has been pressed.

Parameters:
listener - The action listener.
See Also:
getCloseActionListener()

getCloseActionListener

public ActionListener getCloseActionListener()
Returns the action listener that is invoked when the close button of a dockable pane created by this object has been pressed.

See Also:
setCloseActionListener(java.awt.event.ActionListener)

isEmptyPaneAlwaysHidden

public final boolean isEmptyPaneAlwaysHidden()
Determines whether the empty panel is always hidden. This method always returns false unless the constructor IlvMDIDockingArea(ilog.views.appframe.swing.docking.IlvDockingArea, java.lang.String, java.lang.String, boolean) has been called with true as the emptyPanelAlwaysHidden parameter.

Returns:
true if the MDI panel should always be hidden. Otherwise, this method returns false.
Since:
JViews6.0
See Also:
IlvMDIDockingArea(ilog.views.appframe.swing.docking.IlvDockingArea, java.lang.String, java.lang.String, boolean)


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