Class RMViewer
- java.lang.Object
- 
- java.awt.Component
- 
- java.awt.Container
- 
- javax.swing.JComponent
- 
- com.inductiveautomation.rm.viewer.RMViewer
 
 
 
 
- 
- All Implemented Interfaces:
- java.awt.image.ImageObserver,- java.awt.MenuContainer,- java.beans.PropertyChangeListener,- java.io.Serializable,- java.util.EventListener,- javax.swing.Scrollable
 - Direct Known Subclasses:
- Gallery.GViewer,- RMEditor,- RMTrackballControl
 
 public class RMViewer extends javax.swing.JComponent implements java.beans.PropertyChangeListener, javax.swing.ScrollableThe RMViewer class is a JComponent subclass that can be used in Swing applications to display and/or print an RMDocument. You might use it like this to simply print a document:new RMViewer(aDocument).print(); Or you might want to allocate one and add it to a Swing component hierarchy: RMViewer viewer = new RMViewer(); viewer.setContent(new RMDocument(aSource)); myFrame.getContentPane().add(new JScrollPane(viewer)); - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classRMViewer.PhantomPaneA phantom component that resides in the viewer, that Swing JComponentShapes can attach to, to draw.protected classRMViewer.RMVPrintableThis inner class simply paints a requested page to a given Graphics object.static classRMViewer.ZoomMode- 
Nested classes/interfaces inherited from class javax.swing.JComponentjavax.swing.JComponent.AccessibleJComponent
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringContent_Propstatic intPRINT_MODE_RASTERstatic intPRINT_MODE_VECTORprintingMode and printingDPI let us enhance RMViewer's builtin printing.static java.lang.StringZOOM_CHANGE- 
Fields inherited from class javax.swing.JComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
- 
 - 
Constructor SummaryConstructors Constructor Description RMViewer()Creates a new RMViewer with an empty document in it.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description RMPointconvertPointFromShape(RMPoint aPoint, RMShape aShape)Returns a point converted from the coordinate space of the given shape to viewer coords.RMPointconvertPointToShape(java.awt.geom.Point2D aPoint, RMShape aShape)Returns a point converted from viewer coords to the coordinate space of the given shape.RMRectconvertRectFromShape(RMRect aRect, RMShape aShape)Returns a rect converted from the coordinate space of the given shape to viewer coords.RMRectconvertRectToShape(RMRect aRect, RMShape aShape)Returns a rect converted from viewer coords to the coordinate space of the given shape.protected RMViewerInputAdaptercreateInputAdapter()Creates a default input adapter.protected RMShapePainterJ2DcreateShapePainter(java.awt.Graphics2D aGr)Creates the object that is actually responsible for paining shapes in the viewer.protected RMViewerShapecreateViewerShape()Creates the viewer shape.voiddocShapeRepaint(RMShape aShape)Doc listener method - called before a shape makes a visual change.voidfirstPage()changes the selected page to the first page if the pageLayout is not of a continuous type.protected voidflushShapeRepaints()This method repaints the total bounds of shapes that have previously been registered by shapeNeedsRepaint.java.awt.print.BookgetBook(int orientation, java.awt.print.Paper paper)Returns a java.awt.print.Book, suitable for AWT printing.RMParentShapegetContent()Returns the root shape that is the content of this viewer.intgetContentX()Returns the content shape's X location in viewer.intgetContentY()Returns the content shape's Y location in viewer.intgetCopies()RMDocumentgetDocument()Returns the RMDocument associated with this viewer.RMRectgetDocumentBounds()Returns the bounds of the viewer document.booleangetDrawsBackground()Returns whether or not the gutter, page background & drop shadow get drawn.RMShapegetHoverShape(java.lang.String aString)Returns a hover shape for given something.RMViewerInputAdaptergetInputAdapter()Returns the input adapter for the viewer (handles mouse and keyboard input).floatgetlastZoomFactor()RMRectgetPageBounds()Returns the bounds of the viewer document's selected page.intgetPageCount()Returns the page count.intgetPageOrientation()booleangetPaintFrameRate()Returns whether we paint frame rate.RMViewer.PhantomPanegetPhantomPane()Returns the phantom pane (creating, if necessary).java.awt.DimensiongetPreferredScrollableViewportSize()java.awt.DimensiongetPreferredSize()Returns the optimal size of the viewer.protected java.awt.DimensiongetPrefSize()Returns the preferred size of the viewer ignoring ZoomFactor.protected java.awt.DimensiongetPrefSize(float aScale)Returns the preferred size of the viewer scaled to a given zoom factor.intgetPrintingDPI()intgetPrintingMode()RMRectgetRepaintBoundsForShape(RMShape aShape)Returns the bounds for a given shape in the viewer.intgetScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)booleangetScrollableTracksViewportHeight()booleangetScrollableTracksViewportWidth()Scrollable methods.intgetScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)RMParentShapegetSelectedPage()Returns the currently selected page shape.intgetSelectedPageIndex()Returns the index of the current visible document page.RMShapegetShape(java.lang.String aName)Returns the document shape for given name.RMShapegetShapeAtPoint(java.awt.geom.Point2D aPoint, boolean goDeep)Returns the first shape hit by the given point.RMShapePaintergetShapePainter(java.awt.Graphics2D aGr)Returns the object that is actually responsible for paining shapes in the viewer.booleangetShapeRepaintEnabled()Returns whether changes to shapes cause repaints.booleangetShown()Returns whether viewer was shown.WebURLgetSourceURL()Returns the source URL.java.awt.geom.AffineTransformgetTransformFromShape(RMShape aShape)Returns the transform from given shape to viewer.RMUndoergetUndoer()Returns the undoer associated with the viewer's document.RMViewerShapegetViewerShape()Returns the viewer shape.floatgetZoomFactor()Returns the viewer's zoom factor (1 by default).floatgetZoomFactor(RMViewer.ZoomMode aMode)Returns the zoom factor for the given mode at the current viewer size.java.awt.RectanglegetZoomFocusRect()Returns zoom focus rect (just the visible rect by default, but overriden by editor to return selected shapes rect).RMViewer.ZoomModegetZoomMode()Returns the ZoomMode (ZoomToFit, ZoomIfNeeded, ZoomToFactor).floatgetZoomToActualSizeFactor()Returns the zoom factor to view the document at actual size taking into account the current screen resolution.booleanisCollate()booleanisEditing()Returns whether viewer is really doing editing.booleanisPreview()Returns whether editor is preview (or viewer) mode.booleanisPrintBothSides()booleanisUseAutoLandscape()booleanisZoomToFactor()Returns whether viewer is set to ZoomToFactor.voidlastPage()changes the selected page to the last page if the pageLayout is not of a continuous type.protected voidmouseDragged(java.awt.event.MouseEvent anEvent)Handle mouse dragged event.protected voidmouseMoved(java.awt.event.MouseEvent anEvent)Handle mouse moved event.protected voidmousePressed(java.awt.event.MouseEvent anEvent)Handle mouse pressed event.protected voidmouseReleased(java.awt.event.MouseEvent anEvent)Handle mouse released event.voidpageBack()Selects the previous page based on the page layout.voidpageForward()Selects the next page based on the page layout.protected voidpaintBackground(java.awt.Graphics2D aGrfx)Paints the background.voidpaintComponent(java.awt.Graphics aGraphics)Overrides JComponent implementation to paint viewer shapes and page, margin, grid, etc.voidperformActionURLClick(java.lang.String aURL)Viewer callback - called when shape with URL is clicked (opens URL).voidplay()Starts any animation viewer might have.voidprint()This method tells the RMViewer to print by running the print dialog (configured to the default printer).voidprint(java.lang.String aPrinterName, boolean runPanel)This method tells the RMViewer to print to the printer with the given printer name (use null for default printer).protected voidprocessKeyEvent(java.awt.event.KeyEvent anEvent)Handle key events.protected voidprocessMouseEvent(java.awt.event.MouseEvent anEvent)Handle mouse events.protected voidprocessMouseMotionEvent(java.awt.event.MouseEvent anEvent)Handle mouse motion eventsprotected voidprocessMouseWheelEvent(java.awt.event.MouseWheelEvent anEvent)Handle mouse wheel events.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)PropertyChangeListener method - called by document.voidrepaint(java.awt.geom.Rectangle2D aRect)Requests a repaint for the area represented by the given rect.voidrunZoomPanel()Runs a dialog panel to request a percentage zoom (which is then set with setZoomFactor).voidsetBounds(int x, int y, int w, int h)Overrides to update ZoomFactor if dynamic.voidsetCollate(boolean collate)voidsetContent(RMParentShape aShape)Sets the root shape that is the content of this viewer.voidsetContent(java.lang.Object aSource)Sets the content from any source.voidsetCopies(int copies)voidsetInputAdapter(RMViewerInputAdapter anInputAdapter)Sets the input adapter for the viewer (handles mouse and keyboard input).voidsetPageOrientation(int pageOrientation)voidsetPaintFrameRate(boolean aValue)Sets whether we paint frame rate.voidsetPrintBothSides(boolean printBothSides)voidsetPrintingDPI(int printingDPI)voidsetPrintingMode(int printingMode)voidsetSelectedPageIndex(int anIndex)Sets the page of viewer's document that is visible (by index).voidsetShapeRepaintEnabled(boolean aFlag)Sets whether changes to shapes cause repaints.protected voidsetShown(boolean aValue)Sets whether viewer was shown.voidsetUseAutoLandscape(boolean useAutoLandscape)voidsetZoomFactor(float aFactor)Sets the viewer's zoom factor (1 for 100%).protected voidsetZoomFactorImpl(float aFactor)Sets the viewer's zoom factor (1 for 100%) and mode.voidsetZoomMode(RMViewer.ZoomMode aZoomMode)Sets the ZoomMode.voidsetZoomToFitFactor()Sets the zoom to fit factor, based on the current zoom mode.voidstop()Stops any animation viewer might have.booleanundoerHasUndos()Returns whether undos exist in the viewer's documents's undoer (convenience).voidundoerSetUndoTitle(java.lang.String aTitle)Sets the title of the next registered undo in the viewer's documents's undoer (convenience).protected voidviewerHidden()Called when viewer is hidden.protected voidviewerShown()Called when viewer is shown.voidzoomToggleLast()Sets the viewer's zoom to its previous value.- 
Methods inherited from class javax.swing.JComponentaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 - 
Methods inherited from class java.awt.Containeradd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 - 
Methods inherited from class java.awt.Componentaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
- 
 
- 
- 
- 
Field Detail- 
ZOOM_CHANGEpublic static final java.lang.String ZOOM_CHANGE - See Also:
- Constant Field Values
 
 - 
PRINT_MODE_VECTORpublic static final int PRINT_MODE_VECTOR printingMode and printingDPI let us enhance RMViewer's builtin printing.- Since:
- 7.8.0
- See Also:
- Constant Field Values
 
 - 
PRINT_MODE_RASTERpublic static final int PRINT_MODE_RASTER - See Also:
- Constant Field Values
 
 - 
Content_Proppublic static final java.lang.String Content_Prop - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getViewerShapepublic RMViewerShape getViewerShape() Returns the viewer shape.
 - 
createViewerShapeprotected RMViewerShape createViewerShape() Creates the viewer shape.
 - 
getContentpublic RMParentShape getContent() Returns the root shape that is the content of this viewer.
 - 
setContentpublic void setContent(RMParentShape aShape) Sets the root shape that is the content of this viewer.
 - 
setContentpublic void setContent(java.lang.Object aSource) Sets the content from any source.
 - 
getDocument@Nullable public RMDocument getDocument() Returns the RMDocument associated with this viewer.
 - 
getSourceURLpublic WebURL getSourceURL() Returns the source URL.
 - 
isEditingpublic boolean isEditing() Returns whether viewer is really doing editing.
 - 
isPreviewpublic boolean isPreview() Returns whether editor is preview (or viewer) mode.
 - 
getPageCountpublic int getPageCount() Returns the page count.
 - 
getSelectedPagepublic RMParentShape getSelectedPage() Returns the currently selected page shape.
 - 
getSelectedPageIndexpublic int getSelectedPageIndex() Returns the index of the current visible document page.
 - 
setSelectedPageIndexpublic void setSelectedPageIndex(int anIndex) Sets the page of viewer's document that is visible (by index).
 - 
pageForwardpublic void pageForward() Selects the next page based on the page layout. This will adjust the increment for page changes based on the number of pages in the view resulting in stepping a view at a time when necessary.
 - 
pageBackpublic void pageBack() Selects the previous page based on the page layout. This will adjust the increment for page changes based on the number of pages in the view resulting in stepping a view at a time when necessary.
 - 
lastPagepublic void lastPage() changes the selected page to the last page if the pageLayout is not of a continuous type.
 - 
firstPagepublic void firstPage() changes the selected page to the first page if the pageLayout is not of a continuous type.
 - 
playpublic void play() Starts any animation viewer might have.
 - 
stoppublic void stop() Stops any animation viewer might have.
 - 
getShownpublic boolean getShown() Returns whether viewer was shown.
 - 
setShownprotected void setShown(boolean aValue) Sets whether viewer was shown.
 - 
viewerShownprotected void viewerShown() Called when viewer is shown.
 - 
viewerHiddenprotected void viewerHidden() Called when viewer is hidden.
 - 
getDocumentBoundspublic RMRect getDocumentBounds() Returns the bounds of the viewer document.
 - 
getPageBoundspublic RMRect getPageBounds() Returns the bounds of the viewer document's selected page.
 - 
getShapeAtPointpublic RMShape getShapeAtPoint(java.awt.geom.Point2D aPoint, boolean goDeep) Returns the first shape hit by the given point.
 - 
getZoomFactorpublic float getZoomFactor() Returns the viewer's zoom factor (1 by default).
 - 
setZoomFactorpublic void setZoomFactor(float aFactor) Sets the viewer's zoom factor (1 for 100%).
 - 
setZoomFactorImplprotected void setZoomFactorImpl(float aFactor) Sets the viewer's zoom factor (1 for 100%) and mode.
 - 
getZoomModepublic RMViewer.ZoomMode getZoomMode() Returns the ZoomMode (ZoomToFit, ZoomIfNeeded, ZoomToFactor).
 - 
setZoomModepublic void setZoomMode(RMViewer.ZoomMode aZoomMode) Sets the ZoomMode.
 - 
isZoomToFactorpublic boolean isZoomToFactor() Returns whether viewer is set to ZoomToFactor.
 - 
getlastZoomFactorpublic float getlastZoomFactor() 
 - 
getZoomFactorpublic float getZoomFactor(RMViewer.ZoomMode aMode) Returns the zoom factor for the given mode at the current viewer size.
 - 
setZoomToFitFactorpublic void setZoomToFitFactor() Sets the zoom to fit factor, based on the current zoom mode.
 - 
getZoomFocusRectpublic java.awt.Rectangle getZoomFocusRect() Returns zoom focus rect (just the visible rect by default, but overriden by editor to return selected shapes rect).
 - 
getZoomToActualSizeFactorpublic float getZoomToActualSizeFactor() Returns the zoom factor to view the document at actual size taking into account the current screen resolution.
 - 
zoomToggleLastpublic void zoomToggleLast() Sets the viewer's zoom to its previous value.
 - 
runZoomPanelpublic void runZoomPanel() Runs a dialog panel to request a percentage zoom (which is then set with setZoomFactor).
 - 
setBoundspublic void setBounds(int x, int y, int w, int h)Overrides to update ZoomFactor if dynamic.- Overrides:
- setBoundsin class- java.awt.Component
 
 - 
getContentXpublic int getContentX() Returns the content shape's X location in viewer.
 - 
getContentYpublic int getContentY() Returns the content shape's Y location in viewer.
 - 
convertPointFromShapepublic RMPoint convertPointFromShape(RMPoint aPoint, RMShape aShape) Returns a point converted from the coordinate space of the given shape to viewer coords.
 - 
convertPointToShapepublic RMPoint convertPointToShape(java.awt.geom.Point2D aPoint, RMShape aShape) Returns a point converted from viewer coords to the coordinate space of the given shape.
 - 
convertRectFromShapepublic RMRect convertRectFromShape(RMRect aRect, RMShape aShape) Returns a rect converted from the coordinate space of the given shape to viewer coords.
 - 
convertRectToShapepublic RMRect convertRectToShape(RMRect aRect, RMShape aShape) Returns a rect converted from viewer coords to the coordinate space of the given shape.
 - 
getTransformFromShapepublic java.awt.geom.AffineTransform getTransformFromShape(RMShape aShape) Returns the transform from given shape to viewer.
 - 
repaintpublic void repaint(java.awt.geom.Rectangle2D aRect) Requests a repaint for the area represented by the given rect.
 - 
getShapePainterpublic RMShapePainter getShapePainter(java.awt.Graphics2D aGr) Returns the object that is actually responsible for paining shapes in the viewer.
 - 
createShapePainterprotected RMShapePainterJ2D createShapePainter(java.awt.Graphics2D aGr) Creates the object that is actually responsible for paining shapes in the viewer.
 - 
getDrawsBackgroundpublic boolean getDrawsBackground() Returns whether or not the gutter, page background & drop shadow get drawn.
 - 
paintComponentpublic void paintComponent(java.awt.Graphics aGraphics) Overrides JComponent implementation to paint viewer shapes and page, margin, grid, etc.- Overrides:
- paintComponentin class- javax.swing.JComponent
 
 - 
paintBackgroundprotected void paintBackground(java.awt.Graphics2D aGrfx) Paints the background.
 - 
getInputAdapterpublic RMViewerInputAdapter getInputAdapter() Returns the input adapter for the viewer (handles mouse and keyboard input).
 - 
setInputAdapterpublic void setInputAdapter(RMViewerInputAdapter anInputAdapter) Sets the input adapter for the viewer (handles mouse and keyboard input).
 - 
createInputAdapterprotected RMViewerInputAdapter createInputAdapter() Creates a default input adapter.
 - 
processMouseEventprotected void processMouseEvent(java.awt.event.MouseEvent anEvent) Handle mouse events.- Overrides:
- processMouseEventin class- javax.swing.JComponent
 
 - 
processMouseMotionEventprotected void processMouseMotionEvent(java.awt.event.MouseEvent anEvent) Handle mouse motion events- Overrides:
- processMouseMotionEventin class- javax.swing.JComponent
 
 - 
processMouseWheelEventprotected void processMouseWheelEvent(java.awt.event.MouseWheelEvent anEvent) Handle mouse wheel events.- Overrides:
- processMouseWheelEventin class- java.awt.Component
 
 - 
processKeyEventprotected void processKeyEvent(java.awt.event.KeyEvent anEvent) Handle key events.- Overrides:
- processKeyEventin class- javax.swing.JComponent
 
 - 
mousePressedprotected void mousePressed(java.awt.event.MouseEvent anEvent) Handle mouse pressed event.
 - 
mouseDraggedprotected void mouseDragged(java.awt.event.MouseEvent anEvent) Handle mouse dragged event.
 - 
mouseReleasedprotected void mouseReleased(java.awt.event.MouseEvent anEvent) Handle mouse released event.
 - 
mouseMovedprotected void mouseMoved(java.awt.event.MouseEvent anEvent) Handle mouse moved event.
 - 
performActionURLClickpublic void performActionURLClick(@Nonnull java.lang.String aURL)Viewer callback - called when shape with URL is clicked (opens URL).
 - 
getHoverShapepublic RMShape getHoverShape(java.lang.String aString) Returns a hover shape for given something.
 - 
getPreferredSizepublic java.awt.Dimension getPreferredSize() Returns the optimal size of the viewer.- Overrides:
- getPreferredSizein class- javax.swing.JComponent
 
 - 
getPrefSizeprotected java.awt.Dimension getPrefSize() Returns the preferred size of the viewer ignoring ZoomFactor.
 - 
getPrefSizeprotected java.awt.Dimension getPrefSize(float aScale) Returns the preferred size of the viewer scaled to a given zoom factor.
 - 
getScrollableTracksViewportWidthpublic boolean getScrollableTracksViewportWidth() Scrollable methods.- Specified by:
- getScrollableTracksViewportWidthin interface- javax.swing.Scrollable
 
 - 
getScrollableTracksViewportHeightpublic boolean getScrollableTracksViewportHeight() - Specified by:
- getScrollableTracksViewportHeightin interface- javax.swing.Scrollable
 
 - 
getScrollableBlockIncrementpublic int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)- Specified by:
- getScrollableBlockIncrementin interface- javax.swing.Scrollable
 
 - 
getScrollableUnitIncrementpublic int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)- Specified by:
- getScrollableUnitIncrementin interface- javax.swing.Scrollable
 
 - 
getPreferredScrollableViewportSizepublic java.awt.Dimension getPreferredScrollableViewportSize() - Specified by:
- getPreferredScrollableViewportSizein interface- javax.swing.Scrollable
 
 - 
getUndoerpublic RMUndoer getUndoer() Returns the undoer associated with the viewer's document.
 - 
undoerSetUndoTitlepublic void undoerSetUndoTitle(java.lang.String aTitle) Sets the title of the next registered undo in the viewer's documents's undoer (convenience).
 - 
undoerHasUndospublic boolean undoerHasUndos() Returns whether undos exist in the viewer's documents's undoer (convenience).
 - 
getShapeRepaintEnabledpublic boolean getShapeRepaintEnabled() Returns whether changes to shapes cause repaints.
 - 
setShapeRepaintEnabledpublic void setShapeRepaintEnabled(boolean aFlag) Sets whether changes to shapes cause repaints.
 - 
docShapeRepaintpublic void docShapeRepaint(RMShape aShape) Doc listener method - called before a shape makes a visual change. Provides a mechanism to efficiently repaint the portion of the viewer that currently displays a shape. Registers the area covered by the shape now and at event end, to efficiently repaint shapes in transition as well.
 - 
flushShapeRepaintsprotected void flushShapeRepaints() This method repaints the total bounds of shapes that have previously been registered by shapeNeedsRepaint. This should only be used internally.
 - 
getRepaintBoundsForShapepublic RMRect getRepaintBoundsForShape(RMShape aShape) Returns the bounds for a given shape in the viewer. Subclasses can override this to account for things like different bounds for selected shapes.
 - 
propertyChangepublic void propertyChange(java.beans.PropertyChangeEvent anEvent) PropertyChangeListener method - called by document.- Specified by:
- propertyChangein interface- java.beans.PropertyChangeListener
 
 - 
getShapepublic RMShape getShape(java.lang.String aName) Returns the document shape for given name.
 - 
getPhantomPanepublic RMViewer.PhantomPane getPhantomPane() Returns the phantom pane (creating, if necessary).
 - 
getPaintFrameRatepublic boolean getPaintFrameRate() Returns whether we paint frame rate.
 - 
setPaintFrameRatepublic void setPaintFrameRate(boolean aValue) Sets whether we paint frame rate.
 - 
printpublic void print() throws java.awt.print.PrinterExceptionThis method tells the RMViewer to print by running the print dialog (configured to the default printer).- Throws:
- java.awt.print.PrinterException- Thrown when an error that causes the print job to abort occurs.- Modified in 7.8.0 
 
 - 
printpublic void print(java.lang.String aPrinterName, boolean runPanel) throws java.awt.print.PrinterExceptionThis method tells the RMViewer to print to the printer with the given printer name (use null for default printer). It also offers an option to run the printer dialog.- Parameters:
- aPrinterName- The name returned by PrintServiceLookup.lookupPrintServices, or null for default printer
- runPanel- True if the print dialog should be shown.
- Throws:
- java.awt.print.PrinterException- Thrown when an error that causes the print job to abort occurs.- Modified in 7.8.0 
 
 - 
getPrintingModepublic int getPrintingMode() - Since:
- 7.8.0
 
 - 
setPrintingModepublic void setPrintingMode(int printingMode) - Parameters:
- printingMode- Allowable values are the constants PRINT_MODE_RASTER and PRINT_MODE_VECTOR. Other values will give undefined results.
- Since:
- 7.8.0
 
 - 
getPrintingDPIpublic int getPrintingDPI() - Since:
- 7.8.0
 
 - 
setPrintingDPIpublic void setPrintingDPI(int printingDPI) - Parameters:
- printingDPI- Must be a positive integer
- Since:
- 7.8.0
 
 - 
getCopiespublic int getCopies() - Since:
- 7.8.0
 
 - 
setCopiespublic void setCopies(int copies) - Parameters:
- copies- Must be a positive integer
- Since:
- 7.8.0
 
 - 
isUseAutoLandscapepublic boolean isUseAutoLandscape() - Since:
- 7.8.0
 
 - 
setUseAutoLandscapepublic void setUseAutoLandscape(boolean useAutoLandscape) - Since:
- 7.8.0
 
 - 
getPageOrientationpublic int getPageOrientation() - Since:
- 7.8.0
 
 - 
setPageOrientationpublic void setPageOrientation(int pageOrientation) - Since:
- 7.8.0
 
 - 
isPrintBothSidespublic boolean isPrintBothSides() - Since:
- 7.8.0
 
 - 
setPrintBothSidespublic void setPrintBothSides(boolean printBothSides) - Since:
- 7.8.0
 
 - 
isCollatepublic boolean isCollate() - Since:
- 7.8.0
 
 - 
setCollatepublic void setCollate(boolean collate) - Since:
- 7.8.0
 
 - 
getBookpublic java.awt.print.Book getBook(int orientation, java.awt.print.Paper paper)Returns a java.awt.print.Book, suitable for AWT printing.Changes in 7.8.0: made the printable used based on printing mode 
 
- 
 
-