public class GlintCanvas extends ViewerCanvas implements com.elixirtech.print.Printable
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
GlintCanvas()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
com.elixirtech.glint.IEye |
getEye()
Gets the model object
|
int |
getNumberOfPages() |
int |
getPageCount()
Get the number of pages in the model
|
java.awt.print.PageFormat |
getPageFormat(int pageNo)
Part of the printing API, so be careful as this is zero-based, not one-based.
|
java.awt.print.Printable |
getPrintable(int pageNo) |
com.elixirtech.glint.g2d.URLMap |
getURLMap()
Get the URLMap that identifies the location of URL hotspots on
the current page.
|
boolean |
isHighlightURLs()
Returns whether the HighlightURLs flag is true
|
boolean |
isScrolled()
Returns whether the Scrolled flag is true
|
void |
paintComponent(java.awt.Graphics g) |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageNo)
Part of the printing API, so be careful as this is zero-based, not one-based.
|
void |
read(java.io.InputStream is)
Read the model from a stream
|
void |
setEye(com.elixirtech.glint.IEye eye)
Sets the model object to an IEye object which contains the glint pages
|
void |
setHighlightURLs(boolean b)
Sets a flag to control whether URLs embedded in the glint should
be highlighted.
|
void |
setObject(java.lang.Object o)
Sets the model object to an IEye object which contains the glint pages
|
void |
setScrolled(boolean b)
Sets a flag to indicate whether this object is embedded in a scrollpane.
|
void |
update()
Recalculates the dimensions of the view and repaints.
|
addChangeListener, first, getBackgroundColor, getCanvasComponent, getMaximumSize, getMinimumSize, getPageNo, getPreferredSize, getZoomPercent, gotoPage, isBitmapZoom, last, next, previous, read, removeChangeListener, setBackgroundColor, setBitmapZoom, setPageNo, setZoomPercentaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPeer, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic void setObject(java.lang.Object o)
setObject in interface IViewerCanvassetObject in class ViewerCanvaso - The Glint IEye modelpublic void read(java.io.InputStream is)
throws java.io.IOException
IViewerCanvasread in interface IViewerCanvasread in class ViewerCanvasis - The input streamjava.io.IOException - if the stream is invalid for this viewerpublic void setEye(com.elixirtech.glint.IEye eye)
eye - The Glint IEye modelpublic com.elixirtech.glint.IEye getEye()
public void setScrolled(boolean b)
b - True if this control is wrapped with a scrollpanepublic boolean isScrolled()
public void setHighlightURLs(boolean b)
b - True to enable URL highlightingpublic boolean isHighlightURLs()
public int getPageCount()
IViewerCanvasgetPageCount in interface IViewerCanvasgetPageCount in interface com.elixirtech.ui.INavigationgetPageCount in class ViewerCanvaspublic int getNumberOfPages()
getNumberOfPages in interface java.awt.print.Pageablepublic void update()
IViewerCanvasupdate in interface IViewerCanvasupdate in class ViewerCanvaspublic void paintComponent(java.awt.Graphics g)
paintComponent in class ViewerCanvaspublic java.awt.print.PageFormat getPageFormat(int pageNo)
getPageFormat in interface java.awt.print.PageablepageNo - The page number to query (zero-based)public int print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageNo)
print in interface java.awt.print.Printableg - The graphics to draw onpf - The page format of the chosen pagepageNo - The page to render (zero-based)public java.awt.print.Printable getPrintable(int pageNo)
getPrintable in interface java.awt.print.Pageablepublic com.elixirtech.glint.g2d.URLMap getURLMap()