|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.lizardtech.djvubean.outline.Outline
public class Outline
This class is used for outline navigation. Logically this equivalent to a JTree, but the look and feel is slightly different.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
DjVuBean |
djvuBean
The DjVuComponent used when creating this Outline |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Outline(DjVuBean djvuBean)
Creates a new Outline object. |
|
| Method Summary | |
|---|---|
void |
clickLocation(int x,
int y)
Called when the user clicks the mouse on an outline item. |
protected java.util.Vector |
getActiveVector()
Called to query the vector of active bookmarks. |
Bookmark |
getBookmark(int item)
Get the specified bookmark. |
protected java.awt.Rectangle |
getCheckboxBounds(int item,
Bookmark bookmark,
java.lang.Object depthObject)
Query the bounding rectangle for the specified checkbox. |
protected java.util.Hashtable |
getDepthMap()
Query the Hashtable listing the depths of bookmarks. |
int |
getFontHeight()
Query the font height used in calculating line spacing. |
int |
getFontWidth()
Query the font width used in calculating line indenting. |
java.awt.Dimension |
getMaximumSize()
Query the maximum image size allowed. |
java.awt.Dimension |
getMinimumSize()
Query the minimum image size allowed. |
protected java.util.Vector |
getPagenoVector()
Query the vector of page numbers mapped to bookmarks. |
protected java.util.Hashtable |
getParentMap()
Query the Hashtable of bookmark parents. |
java.awt.Dimension |
getPreferredSize()
Query the preferred image size allowed. |
int |
getRow(int y)
Query the row (item number) of the specified y coordinate. |
protected java.awt.Rectangle |
getTextBounds(int item,
Bookmark bookmark,
java.lang.Object depthObject)
Query the bounding rectangle of the specified row. |
boolean |
isCheckedItem(int item)
Query if the specified bookmark is checked. |
protected void |
mapChildren(Bookmark parent,
java.util.Hashtable parentMap,
java.util.Vector pagenoVector,
java.lang.Number depth)
Called to create a map the parent of each bookmark. |
void |
paint(java.awt.Graphics g)
Called to paint the outline. |
int |
paintCheckbox(int item,
java.awt.Graphics g,
Bookmark bookmark)
Called to recursively paint the check box for the specified item. |
int |
paintItem(int item,
java.awt.Graphics g,
Bookmark bookmark)
Called to recursively paint text and lines for the specified item. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Called with a DjVuBean property has changed. |
protected int |
setCheckedBookmark(Bookmark bookmark,
java.util.Vector activeVector)
Set the checked value of the specified bookmark. |
void |
setCheckedItem(int item,
boolean checked)
Set the checked property of the specified bookmark. |
protected void |
setCheckedItem(int item,
boolean checked,
java.util.Vector activeVector)
Check bookmark at the specified row number. |
void |
setCheckedPage(int pageno)
Called to check any bookmarks linked to the specified page number. |
void |
setFirstBookmark(Bookmark bookmark)
Called to initialize the outline by setting the top level bookmark. |
void |
setFontHeight(int fontHeight)
Set the font height used in calculating line spacing. |
void |
setFontWidth(int fontWidth)
Set the font width used in calculating line indenting. |
void |
setVisible(boolean value)
Called to change the visibility of the outline. |
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final DjVuBean djvuBean
| Constructor Detail |
|---|
public Outline(DjVuBean djvuBean)
djvuBean - the DjVuBean to navigate.
java.lang.ArrayIndexOutOfBoundsException - if the document has less than 2
pages.| Method Detail |
|---|
public Bookmark getBookmark(int item)
item - the row number of the bookmark to retrieve.
public void setCheckedItem(int item,
boolean checked)
item - the row number of the bookmark to check or uncheck.checked - true if checked.public boolean isCheckedItem(int item)
item - row number of the bookmark to query.
public void setCheckedPage(int pageno)
pageno - specifies page number.public void setFirstBookmark(Bookmark bookmark)
bookmark - top level bookmark.public void setFontHeight(int fontHeight)
fontHeight - to use to calculate line spacing.public int getFontHeight()
public void setFontWidth(int fontWidth)
fontWidth - to use to calculate line indenting.public int getFontWidth()
public java.awt.Dimension getMaximumSize()
getMaximumSize in class java.awt.Componentpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic int getRow(int y)
y - position along the Y axis.
public void setVisible(boolean value)
setVisible in class java.awt.Componentvalue - true if visible.
public void clickLocation(int x,
int y)
x - position along the X axis clicked.y - position along the Y axis clicked.public void paint(java.awt.Graphics g)
paint in class java.awt.Canvasg - graphics object to paint.
public int paintCheckbox(int item,
java.awt.Graphics g,
Bookmark bookmark)
item - row numberg - graphics object to paint.bookmark - to check selected value.
public int paintItem(int item,
java.awt.Graphics g,
Bookmark bookmark)
item - row numberg - graphics object to paint.bookmark - to check selected value.
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenere - the PropertyChangeEvent.protected java.util.Vector getActiveVector()
protected java.awt.Rectangle getCheckboxBounds(int item,
Bookmark bookmark,
java.lang.Object depthObject)
item - row numberbookmark - to check selected value.depthObject - depth of the bookmark.
protected int setCheckedBookmark(Bookmark bookmark,
java.util.Vector activeVector)
bookmark - to check.activeVector - of active bookmarks.
protected void setCheckedItem(int item,
boolean checked,
java.util.Vector activeVector)
item - row number.checked - true if checked.activeVector - vector of active bookmarks.protected java.util.Hashtable getDepthMap()
protected java.util.Vector getPagenoVector()
protected java.util.Hashtable getParentMap()
protected java.awt.Rectangle getTextBounds(int item,
Bookmark bookmark,
java.lang.Object depthObject)
item - row number.bookmark - for the specified row.depthObject - indicating depth.
protected void mapChildren(Bookmark parent,
java.util.Hashtable parentMap,
java.util.Vector pagenoVector,
java.lang.Number depth)
parent - top level bookmark.parentMap - map to add children to.pagenoVector - vector of page numbers.depth - object indicating bookmark depth.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||