Enterprise Information Portal APIs

com.ibm.mm.beans.gui
Class CMBJavaDocumentViewer

java.lang.Object
  |
  +--com.ibm.mm.beans.gui.CMBJavaDocumentViewer

public abstract class CMBJavaDocumentViewer
extends java.lang.Object

CMBJavaDocumentViewer is an abstract class that is extended by providers of Java-based document viewers that can plug into the CMBDocumentViewer bean. These viewers can display documents within the visible space of the bean or in separate windows on the screen. They are configured using the mime2app, similar to other external viewers, except that the application name is a Java class name (ending in ".class").


Constructor Summary
CMBJavaDocumentViewer()
           
 
Method Summary
abstract  void activate(CMBItem document)
          Brings the viewer window or panel displaying the document to the top of the z-order and give it focus.
abstract  boolean canDisplay(CMBItem document)
          Returns true if the document can be displayed by the viewer.
abstract  boolean canPrint(CMBItem document)
          Returns true if the document can be printed by the viewer.
abstract  void close(CMBItem document)
          Closes a document being viewed.
abstract  void display(CMBItem document)
          Displays the document in the viewer.
abstract  java.lang.String getTitle()
          Gets the title to use for the viewer.
abstract  java.awt.Component getViewerComponent()
          Returns a component that displays the viewer.
abstract  void initialize(CMBDataManagement dataManagement, CMBJavaDocumentViewerCallbacks callbacks)
          Constructs the viewer.
abstract  void print(CMBItem document)
          Prints a document.
abstract  void terminate()
          Terminates the viewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMBJavaDocumentViewer

public CMBJavaDocumentViewer()
Method Detail

initialize

public abstract void initialize(CMBDataManagement dataManagement,
                                CMBJavaDocumentViewerCallbacks callbacks)
Constructs the viewer.
Parameters:
dataManagement - an instance of CMBDataManagement. This can be used by the viewer to get and set document contents, annotations, resources and viewdata.
callbacks - contains methods that are called by the viewer when documents are openned and closed.

terminate

public abstract void terminate()
Terminates the viewer. All documents being viewed in the viewer are closed.

getTitle

public abstract java.lang.String getTitle()
Gets the title to use for the viewer. This is used in cases where the CMBDocumentViewer beans creates the JFrame window to display the viewer.

getViewerComponent

public abstract java.awt.Component getViewerComponent()
Returns a component that displays the viewer. If the viewer displays documents in Frame or JFrame windows, then null should be returned.

canDisplay

public abstract boolean canDisplay(CMBItem document)
Returns true if the document can be displayed by the viewer.
Parameters:
document - the document being tested.

display

public abstract void display(CMBItem document)
Displays the document in the viewer. If the viewer handles multiple documents, the document should be added to the documents being viewed. If the viewer handles a single document, a new instance of the viewer should be create to display the document.
Parameters:
document - the document to display.

activate

public abstract void activate(CMBItem document)
Brings the viewer window or panel displaying the document to the top of the z-order and give it focus.
Parameters:
document - the document to activate.

close

public abstract void close(CMBItem document)
Closes a document being viewed.
Parameters:
document - the document to close.

canPrint

public abstract boolean canPrint(CMBItem document)
Returns true if the document can be printed by the viewer.
Parameters:
document - the document being tested.

print

public abstract void print(CMBItem document)
Prints a document. The printing should be performed in the background.

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.