ilog.views.appframe.docview
Interface IlvDocumentView

All Superinterfaces:
ActionHandler, ActionListener, EventListener, IlvPropertyManager, MessageListener
All Known Implementing Classes:
IlvDocumentViewSupport, IlvExplorerView, IlvPanelView, IlvTextView, IlvTreeView

public interface IlvDocumentView
extends MessageListener, ActionHandler, IlvPropertyManager

A document view visualizes or allows for editing the data of an IlvDocument.

Creation of document views
As for view containers, there are two modes of creating views:

Whatever the creation mode of the view, it is initialized with a document with its initializeView(ilog.views.appframe.docview.IlvDocument) method invoked.

Processing action events
The IlvDocumentView class implements the ActionHandler interface for processing action events triggered by the application. A document view only receives action events when it is active in the application. It is added as a new action handler to the application when it is activated and removed from the list of action handlers of the application when it is deactivated.

An implementation of the IlvDocumentView interface can handle action events in the implementation of the methods:

Implementing a document view
If the document view visualizes or edits the data of a document in Swing components, it is recommended that it inherits from the IlvPanelView class or its subclasses. First, this prevents the IlvDocumentView interface from being implemented. It also makes processing action events and updates easier with the methods IlvPanelView.addActionHandler(ilog.views.appframe.event.ActionHandler) and IlvPanelView.registerMappings(ilog.views.appframe.event.IlvMessageMapper).
However, if implementing the IlvDocumentView interface is necessary, the class IlvDocumentViewSupport provides support for the implementation.


Field Summary
static String ACTIVE_PROPERTY
          Bound property name for the active state of the view.
static String ACTIVE_VIEW_NAME
          Name used to send messages to the active document.
static String APPLICATION_PROPERTY
          Bound property name for the application of the view.
static String CLOSABLE_PROPERTY
          Name of the the bound property that determines whether the view can be closed.
static String CLOSING_VIEW_MSG
          Name of the message that is sent by the document template associated with this view to indicate that the view is being closed.
static String DOCUMENT_PROPERTY
          Bound property name for the document of the view.
static String SETTINGS_ELEMENT_PROPERTY
          Stores the settings element for initializing the view.
static String STATIC_VIEW_PROPERTY
          Bound property name that determines whether the view has been registered as a static view or has been dynamically created for a specific document.
static String VIEW_CONTAINER_PROPERTY
          Bound property name for the view container of the view.
 
Method Summary
 IlvApplication getApplication()
          Returns the application associated with the view.
 IlvDocument getDocument()
          Returns the document associated with the view.
 IlvViewContainer getViewContainer()
          Returns the view container that owns this view.
 void initializeView(IlvDocument document)
          Initializes the document view with the specified document.
 void viewClosed()
          Invoked after the view was closed.
 void viewClosing()
          Invoked before the view closes.
 
Methods inherited from interface ilog.views.appframe.event.MessageListener
receiveMessage
 
Methods inherited from interface ilog.views.appframe.event.ActionHandler
isProcessingAction, updateAction
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 
Methods inherited from interface ilog.views.appframe.util.IlvPropertyManager
addPropertyChangeListener, getProperty, removePropertyChangeListener, setProperty
 

Field Detail

DOCUMENT_PROPERTY

static final String DOCUMENT_PROPERTY
Bound property name for the document of the view.

See Also:
Constant Field Values

VIEW_CONTAINER_PROPERTY

static final String VIEW_CONTAINER_PROPERTY
Bound property name for the view container of the view.

See Also:
Constant Field Values

APPLICATION_PROPERTY

static final String APPLICATION_PROPERTY
Bound property name for the application of the view.

See Also:
Constant Field Values

ACTIVE_PROPERTY

static final String ACTIVE_PROPERTY
Bound property name for the active state of the view. If the property is equal to Boolean.TRUE, the view is currently active in the application. It receives the action events and updates. Otherwise, the view is not active and does not receive action events.

See Also:
Constant Field Values

STATIC_VIEW_PROPERTY

static final String STATIC_VIEW_PROPERTY
Bound property name that determines whether the view has been registered as a static view or has been dynamically created for a specific document. If the property is equal to Boolean.TRUE, the view has been registered with the main window of the application as a static view, using one of the two methods IlvMainWindow.registerStaticView(java.lang.String, ilog.views.appframe.docview.IlvDocumentView) or IlvMainWindow.registerStaticContainer(java.lang.String, ilog.views.appframe.docview.IlvViewContainer). In this case, the view is associated with a new document each time a document that has a document template that refers to this view becomes active.
Otherwise, if the property is null or is equal to Boolean.FALSE, the document view has been dynamically created for a specific document.

See Also:
Constant Field Values

CLOSABLE_PROPERTY

static final String CLOSABLE_PROPERTY
Name of the the bound property that determines whether the view can be closed. This property is read by the associated document template when it tries to close the view container that contains this view. Changing the value of this property, the view can stop the closing process.

When closing a view container, the associated document template sends the CLOSING_VIEW_MSG message to the views contained by the container. While processing this message, if one of the views of the container has set its CLOSABLE_PROPERTY to Boolean.FALSE, the closing process will be stopped and the view container will not be closed. Otherwise, if this property is not set or if it is equal to Boolean.TRUE, the view will be closed with its container.

See Also:
Constant Field Values

SETTINGS_ELEMENT_PROPERTY

static final String SETTINGS_ELEMENT_PROPERTY
Stores the settings element for initializing the view.

The settings element stored in this property depends on how the view has been created:


If the view is a IlvPanelView and have its settings query that corresponds to a valid settings element, this property does not stores this element but the settings element as defined above. See IlvPanelView.getSettingsQuery().

Since:
JViews6.0
See Also:
Constant Field Values

CLOSING_VIEW_MSG

static final String CLOSING_VIEW_MSG
Name of the message that is sent by the document template associated with this view to indicate that the view is being closed. When processing this message, the view can change its CLOSABLE_PROPERTY to stop the closing process.

This message has no parameters.

See Also:
MessageListener.receiveMessage(ilog.views.appframe.event.MessageEvent), CLOSABLE_PROPERTY, Constant Field Values

ACTIVE_VIEW_NAME

static final String ACTIVE_VIEW_NAME
Name used to send messages to the active document.

See Also:
Constant Field Values
Method Detail

initializeView

void initializeView(IlvDocument document)
Initializes the document view with the specified document.
Before the method is called, the specified document is associated with the view by setting the DOCUMENT_PROPERTY of the view.

Parameters:
document - The document to initialize the content of the view with.

viewClosing

void viewClosing()
Invoked before the view closes.

See Also:
viewClosed()

viewClosed

void viewClosed()
Invoked after the view was closed.

See Also:
viewClosing()

getDocument

IlvDocument getDocument()
Returns the document associated with the view. The implementation of this method should return the value of the DOCUMENT_PROPERTY that is automatically set by the document template.


getApplication

IlvApplication getApplication()
Returns the application associated with the view. The implementation of this method should return the value of the APPLICATION_PROPERTY that is automatically set by the document template.


getViewContainer

IlvViewContainer getViewContainer()
Returns the view container that owns this view. The implementation of this method should return the value of the VIEW_CONTAINER_PROPERTY that is automatically set by the document template.



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