ilog.views.appframe.docview
Class IlvAbstractMainWindow

java.lang.Object
  extended by ilog.views.appframe.docview.IlvAbstractMainWindow
All Implemented Interfaces:
IlvMainWindow
Direct Known Subclasses:
IlvSwingMainWindow

public abstract class IlvAbstractMainWindow
extends Object
implements IlvMainWindow

An implementation of the main window interface to serve as a basis for implementing various kinds of main window.


Field Summary
 
Fields inherited from interface ilog.views.appframe.docview.IlvMainWindow
DEFAULT_CONTAINER_TEMPLATE_NAME
 
Constructor Summary
IlvAbstractMainWindow()
          Constructs an IlvAbstractMainWindow.
 
Method Summary
 void addContainerTemplate(String name, IlvContainerTemplate containerTemplate)
          Adds the specified container template to the list of container templates managed by the main window.
 void containerActivated(IlvViewContainer viewContainer)
          Invoked when a view container owned by this main window is activated.
abstract  IlvApplication getApplication()
          Returns the application associated with the main window.
 IlvContainerTemplate getContainerTemplate(String name)
          Returns the container template of the main window with the specified name.
 String getContainerTemplateName(IlvContainerTemplate containerTemplate)
          Returns the name that was used to register the specified containerTemplate to the main window.
 IlvContainerTemplate[] getContainerTemplates()
          Returns the array of container templates added to this main window.
 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 removeContainerTemplate(IlvContainerTemplate containerTemplate)
          Removes the specified container template from the list of container templates managed by 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.views.appframe.docview.IlvMainWindow
getActiveViewContainer, getMainBars
 

Constructor Detail

IlvAbstractMainWindow

public IlvAbstractMainWindow()
Constructs an IlvAbstractMainWindow.

Method Detail

getApplication

public abstract IlvApplication getApplication()
Returns the application associated with the main window.

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

setApplication

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

Specified by:
setApplication in interface IlvMainWindow
Parameters:
application - The application of the main window.
See Also:
getApplication()

getContainerTemplate

public IlvContainerTemplate getContainerTemplate(String name)
Returns the container template of the main window with the specified name.

Specified by:
getContainerTemplate in interface IlvMainWindow
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 the specified name.
See Also:
addContainerTemplate(java.lang.String, ilog.views.appframe.docview.IlvContainerTemplate)

getContainerTemplateName

public String getContainerTemplateName(IlvContainerTemplate containerTemplate)
Returns the name that was used to register the specified containerTemplate to the main window.

Parameters:
containerTemplate - The container template to retrieve the registered name of.
Returns:
The name used to register the container template.
See Also:
addContainerTemplate(java.lang.String, ilog.views.appframe.docview.IlvContainerTemplate)

getContainerTemplates

public IlvContainerTemplate[] getContainerTemplates()
Returns the array of container templates added to this main window.


addContainerTemplate

public void addContainerTemplate(String name,
                                 IlvContainerTemplate containerTemplate)
Adds the specified container template to the list of container templates managed by the main window. The container template will be associated with all the IlvDocumentViewConfiguration with template name (see IlvDocumentViewConfiguration.getTemplateName()) equal to the specified name.

Parameters:
name - The name that uniquely identifies the container template.
containerTemplate - The new container template.
See Also:
removeContainerTemplate(ilog.views.appframe.docview.IlvContainerTemplate)

removeContainerTemplate

public void removeContainerTemplate(IlvContainerTemplate containerTemplate)
Removes the specified container template from the list of container templates managed by the main window.

Parameters:
containerTemplate - The container template to remove.
See Also:
addContainerTemplate(java.lang.String, ilog.views.appframe.docview.IlvContainerTemplate)

registerStaticView

public 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 that has a template name equal to the specified name.

Specified by:
registerStaticView in interface IlvMainWindow
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

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

Specified by:
unregisterStaticView in interface IlvMainWindow
Parameters:
view - The static view to unregister.
See Also:
registerStaticView(java.lang.String, ilog.views.appframe.docview.IlvDocumentView)

registerStaticContainer

public 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 will 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 that has a template name equal to the specified name.

Specified by:
registerStaticContainer in interface IlvMainWindow
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

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

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

containerActivated

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

This method can be overridden to set the focus on specific components owned by the specified viewContainer.

Specified by:
containerActivated in interface IlvMainWindow
Parameters:
viewContainer - The view container that has been activated.


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