|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.ibm.mm.beans.gui.CMBDocumentViewer
The CMBDocumentViewer bean provides capabilities to view documents by either launching or embedding content-type specific document viewers. There are two types of viewers supported:
If the Visible
property is set to false
, the viewer is always
displayed in a separate window. If the Visible
property is true
,
the viewer will be displayed within the display region of the CMBDocumentViewer bean if possible.
(Currently, this is only possible for Java-based viewers.)
Viewer Specification
There are two ways to specify viewers:
Mime2App
property on CMBDocumentViewer. This property can be set to
an instance of a Properties object that maps the MIME types to application names.
Mime2App
property, the specification using the Mime2App
will
take precedence.
Default Viewers
If no viewer is specified for a particular content type, a default viewer will be launched. For documents from OnDemand, the OnDemand client (in view-only mode) is launched. Documents from all other content servers will be viewed using the Content Manager viewer. The Content Manager viewer also provides display and editing of annotations. To edit annotations, select "Edit Document" from the "File" menu of the viewer.
CMBJavaDocumentViewer
, Serialized FormInner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.ibm.mm.beans.gui.CMBViewDocumentListener |
copyright |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CMBDocumentViewer()
Creates a document viewer. |
Method Summary | |
void |
addDocumentClosedListener(CMBDocumentClosedListener listener)
Adds the specified listener to receive document closed events. |
void |
addDocumentOpenedListener(CMBDocumentOpenedListener listener)
Adds the specified listener to receive document opened events. |
void |
addDocumentOpenFailedListener(CMBDocumentOpenFailedListener listener)
Adds the specified listener to receive document open failed events. |
void |
addHelpListener(CMBHelpListener listener)
Adds the specified listener to receive Help events. |
void |
closeDocument(CMBItem document)
Close a document being viewed. |
CMBConnection |
getConnection()
Gets the CMBConnection bean associated with this document viewer. |
CMBItem[] |
getDocuments()
Gets the CMBItem objects representing the documents being displayed internally. |
java.util.Properties |
getMime2App()
returns a Properties object mapping MIME context types to the names of the external viewer(s) to use for the types. |
boolean |
isDocumentJavaViewable(CMBItem document)
returns true if the document can be viewed by Java, within the visible space of the viewer. |
boolean |
isFocusTraversable()
Overridden to allow focus to the component |
void |
onViewDocument(CMBViewDocumentEvent event)
Implementation of CMBViewDocumentListener, to simplify connecting to the CMBSearchResultsViewer and CMBFolderViewer beans. |
void |
printDocument(CMBItem document)
Print a document. |
void |
refresh()
Refresh the documents being viewed. |
void |
removeDocumentClosedListener(CMBDocumentClosedListener listener)
Removes the specified listener so that it no longer receives document closed events. |
void |
removeDocumentOpenedListener(CMBDocumentOpenedListener listener)
Removes the specified listener so that it no longer receives document opened events. |
void |
removeDocumentOpenFailedListener(CMBDocumentOpenFailedListener listener)
Removes the specified listener so that it no longer receives document open failed events. |
void |
removeHelpListener(CMBHelpListener listener)
Removes the specified listener so that it no longer receives Help events. |
void |
setBackground(java.awt.Color newColor)
Overridden to set background of contained controls |
void |
setConnection(CMBConnection newConnection)
Sets the CMBConnection bean associated with this document viewer. |
void |
setCursor(java.awt.Cursor newCursor)
Overridden to set cursor of contained controls |
void |
setDocuments(CMBItem[] newDocuments)
Sets the documents being displayed. |
void |
setEnabled(boolean newEnable)
Overridden to disable contained controls |
void |
setFont(java.awt.Font newFont)
Overridden to set font of contained controls |
void |
setForeground(java.awt.Color newColor)
Overridden to set foreground of contained controls |
void |
setLayout(java.awt.LayoutManager mgr)
Overridden to disable changing of the layout manager. |
void |
setMime2App(java.util.Properties viewers)
sets the Properties object containing entries that map MIME context types to the names of external viewer(s) to use the types. |
void |
setOpaque(boolean newOpaque)
Overridden to set opaque on contained controls |
void |
setToolTipText(java.lang.String newTooltip)
Overridden to set tooltip text on contained controls |
void |
showDocument(CMBItem document)
display the document. |
void |
terminate()
Shuts down the VI viewer and OnDemand client if they were started in order to display documents externally. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CMBDocumentViewer()
Method Detail |
public CMBConnection getConnection()
public void setConnection(CMBConnection newConnection)
public CMBItem[] getDocuments()
public void setDocuments(CMBItem[] newDocuments)
newDocuments
- an array of CMBItem objects for the documents to display.public java.util.Properties getMime2App()
public void setMime2App(java.util.Properties viewers)
viewers
- a Properties file mapping MIME context types to viewer executables.public void refresh()
public void showDocument(CMBItem document)
document
- the document to be displayed.public void closeDocument(CMBItem document)
public void printDocument(CMBItem document)
public boolean isDocumentJavaViewable(CMBItem document)
public void onViewDocument(CMBViewDocumentEvent event)
onViewDocument
in interface CMBViewDocumentListener
event
- event object containing documents to viewCMBViewDocumentListener
,
CMBSearchResultsViewer
,
CMBFolderViewer
public void terminate()
public void addHelpListener(CMBHelpListener listener)
public void removeHelpListener(CMBHelpListener listener)
public void addDocumentOpenedListener(CMBDocumentOpenedListener listener)
public void removeDocumentOpenedListener(CMBDocumentOpenedListener listener)
public void addDocumentOpenFailedListener(CMBDocumentOpenFailedListener listener)
public void removeDocumentOpenFailedListener(CMBDocumentOpenFailedListener listener)
public void addDocumentClosedListener(CMBDocumentClosedListener listener)
public void removeDocumentClosedListener(CMBDocumentClosedListener listener)
public void setLayout(java.awt.LayoutManager mgr)
setLayout
in class java.awt.Container
public boolean isFocusTraversable()
isFocusTraversable
in class javax.swing.JComponent
public void setForeground(java.awt.Color newColor)
setForeground
in class javax.swing.JComponent
public void setBackground(java.awt.Color newColor)
setBackground
in class javax.swing.JComponent
public void setFont(java.awt.Font newFont)
setFont
in class javax.swing.JComponent
public void setCursor(java.awt.Cursor newCursor)
setCursor
in class java.awt.Component
public void setOpaque(boolean newOpaque)
setOpaque
in class javax.swing.JComponent
public void setToolTipText(java.lang.String newTooltip)
setToolTipText
in class javax.swing.JComponent
public void setEnabled(boolean newEnable)
setEnabled
in class javax.swing.JComponent
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |