com.ibm.productivity.tools.ui
Class RichDocumentViewFactory

java.lang.Object
  extended by com.ibm.productivity.tools.ui.RichDocumentViewFactory

public class RichDocumentViewFactory
extends java.lang.Object

Provides a method to launch a Lotus® Symphony view and access the view instance. The following example uses the RichDocumentViewFactory:

                String fileName = "c:\\temp.odt";
                RichDocumentViewFactory.openView(fileName, false );
 
The RichDocumentView gained by RichDocumentViewFactory doesn't support NewOperation,LoadOperation and CloseOperation.

Since:
Lotus Symphony Beta 4

Constructor Summary
RichDocumentViewFactory()
           
 
Method Summary
static void closeView(RichDocumentView view)
          Closes the specified view.
static void closeView(RichDocumentView view, boolean promptSaveDialogEnabled)
          Closes the specified view.
static RichDocumentView[] getViews()
          Return a list of opened views.
static RichDocumentView openView(RichDocumentType type)
          Opens an instance of the Lotus Symphony view as an Eclipse view.
static RichDocumentView openView(java.lang.String fileName, boolean asTemplate)
          Opens an instance of the Lotus Symphony view as an Eclipse view with given file name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichDocumentViewFactory

public RichDocumentViewFactory()
Method Detail

openView

public static RichDocumentView openView(RichDocumentType type)
Opens an instance of the Lotus Symphony view as an Eclipse view.

Parameters:
type - specifies the document type to be opened
Returns:
the view of RichDocumentView.
See Also:
RichDocumentType

openView

public static RichDocumentView openView(java.lang.String fileName,
                                        boolean asTemplate)
Opens an instance of the Lotus Symphony view as an Eclipse view with given file name.

Parameters:
fileName - specifies the file name on a local disk, such as "c:\\test.odt" on Windows, or "/user/test.odt" on Linux
asTemplate - specifies whether the file is opened directly or used as a template to create a new view. Specify false to open the file directly.
Returns:
The instance of RichDocumentView.
See Also:
RichDocumentType

getViews

public static RichDocumentView[] getViews()
Return a list of opened views.

Returns:
list of opened views.

closeView

public static void closeView(RichDocumentView view)
Closes the specified view.

Parameters:
view - specifies the target RichDocumentView

closeView

public static void closeView(RichDocumentView view,
                             boolean promptSaveDialogEnabled)
Closes the specified view.

Parameters:
view - specifies the target RichDocumentView
promptSaveDialogEnabled - specifies if the document is modified, whether the "Documents-Save" dialog will be displayed before close. If true, the dialog will appear before close, other wise the document will be closed without prompt.