ilog.views.appframe.docview
Interface IlvMainWindow

All Known Implementing Classes:
IlvAbstractMainWindow, IlvMDIApplet, IlvMDIMainFrame, IlvSwingMainWindow

public interface IlvMainWindow

Interface for the main window of an application.
When writing a Swing application, you are recommended to use one of the following implementation classes:

.


Field Summary
static String DEFAULT_CONTAINER_TEMPLATE_NAME
          Name of the default container template.
 
Method Summary
 void containerActivated(IlvViewContainer viewContainer)
          Invoked when a view container owned by this main window has been activated.
 IlvViewContainer getActiveViewContainer()
          Returns the active view container.
 IlvApplication getApplication()
          Returns the application of the main window.
 IlvContainerTemplate getContainerTemplate(String name)
          Returns the container template stored by the main window with the specified name.
 Object[] getMainBars()
          Returns the menu and toolbars of the main window that do not depend on a specific document type.
 void registerStaticContainer(String name, IlvViewContainer container)
          Registers the specified view container as a static container within the main window.
 void registerStaticView(String name, IlvDocumentView view)
          Registers the specified document view as a static view within the main window.
 void setApplication(IlvApplication application)
          Sets the application of the main window.
 boolean unregisterStaticContainer(IlvViewContainer container)
          Unregisters the specified view container from the main window.
 void unregisterStaticView(IlvDocumentView view)
          Unregisters the specified document view from the main window.
 

Field Detail

DEFAULT_CONTAINER_TEMPLATE_NAME

static final String DEFAULT_CONTAINER_TEMPLATE_NAME
Name of the default container template.

See Also:
Constant Field Values
Method Detail

getActiveViewContainer

IlvViewContainer getActiveViewContainer()
Returns the active view container.


getApplication

IlvApplication getApplication()
Returns the application of the main window.

See Also:
setApplication(ilog.views.appframe.IlvApplication)

setApplication

void setApplication(IlvApplication application)
Sets the application of the main window.

Parameters:
application - The application of the window.
See Also:
getApplication()

getContainerTemplate

IlvContainerTemplate getContainerTemplate(String name)
Returns the container template stored by the main window with the specified name.

Parameters:
name - The name of the container template to retrieve.
Returns:
The container template with the specified name or null if no container template has been added with this name.
See Also:
IlvAbstractMainWindow.addContainerTemplate(java.lang.String, ilog.views.appframe.docview.IlvContainerTemplate)

getMainBars

Object[] getMainBars()
Returns the menu and toolbars of the main window that do not depend on a specific document type.

Returns:
An array of components, each component being either a JToolBar instance or a JMenuBar instance.

containerActivated

void containerActivated(IlvViewContainer viewContainer)
Invoked when a view container owned by this main window has been activated.

This method can be overridden for setting the focus to specific components owned by the specified viewContainer.

Parameters:
viewContainer - The view container that has been activated.

registerStaticView

void registerStaticView(String name,
                        IlvDocumentView view)
Registers the specified document view as a static view within the main window. It is the responsibility of the user to insert this view in the main window container.
The specified view will have its IlvDocumentView.initializeView(ilog.views.appframe.docview.IlvDocument) called for all the new activated documents with a document template that refers to this view through a view configuration having a template name equal to the specified name.

Parameters:
name - The name that identifies this view. This name is used to make this view correspond with an IlvDocumentViewConfiguration using the method IlvDocumentViewConfiguration.getTemplateName().
view - The static view to register.
See Also:
unregisterStaticView(ilog.views.appframe.docview.IlvDocumentView)

unregisterStaticView

void unregisterStaticView(IlvDocumentView view)
Unregisters the specified document view from the main window.

Parameters:
view - The static view to unregister.
See Also:
registerStaticView(java.lang.String, ilog.views.appframe.docview.IlvDocumentView)

registerStaticContainer

void registerStaticContainer(String name,
                             IlvViewContainer container)
Registers the specified view container as a static container within the main window.

The views contained by the specified container have their IlvDocumentView.initializeView(ilog.views.appframe.docview.IlvDocument) called for all the new activated documents with a document template that refers to this container through a view configuration having a template name equal to the specified name.

Parameters:
name - The name that identifies this container. This name is used to make the view container correspond with an IlvDocumentViewConfiguration using the IlvDocumentViewConfiguration.getTemplateName() method.
container - The static container to register.
See Also:
unregisterStaticContainer(ilog.views.appframe.docview.IlvViewContainer)

unregisterStaticContainer

boolean unregisterStaticContainer(IlvViewContainer container)
Unregisters the specified view container from the main window.

Parameters:
container - The static container to unregister.
Returns:
true if the specified container was previously registered to this main window; false otherwise.
See Also:
registerStaticContainer(java.lang.String, ilog.views.appframe.docview.IlvViewContainer)


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