|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
com.lizardtech.djvubean.toolbar.Toolbar
public class Toolbar
The DjVu toolbar.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.Object[] |
ACTUAL_SIZE_BUTTON
Arguments used to create the actual size button. |
protected ToggleButton |
actualSize
The mode button to zoom to actual size (100 dpi) |
static java.awt.Color |
BLACK
the color black |
static java.lang.Object[] |
FIRST_PAGE_BUTTON
Arguments used to create the first page button. |
protected ToggleButton |
firstPage
The button to go to the first page. |
static java.lang.Object[] |
FIT_PAGE_BUTTON
Arguments used to create the fit page button. |
static java.lang.Object[] |
FIT_WIDTH_BUTTON
Arguments used to create the fit width button. |
protected ToggleButton |
fitPage
The mode button to fit page. |
protected ToggleButton |
fitWidth
The mode button to fit width. |
static java.lang.Object[] |
LAST_PAGE_BUTTON
Arguments used to create the last page button. |
protected ToggleButton |
lastPage
The button to go to the last page. |
static java.awt.Color |
LIGHT_GRAY
the color gray |
protected ToggleButton |
logo
The LizardTech logo button. |
static java.lang.Object[] |
LOGO_BUTTON
Arguments used to create the logo button. |
protected ToggleButton |
logo2
The LizardTech logo button. |
protected java.awt.Panel |
modeButtonPanel
The panel with mode buttons. |
static java.lang.Object[] |
NEXT_PAGE_BUTTON
Arguments used to create the next page button. |
protected ToggleButton |
nextPage
The next page button. |
static java.lang.Object[] |
PAGE_SELECT
Arguments used to create the page selection combobox. |
protected java.awt.Panel |
pagePanel
The panel with page navigation buttons. |
protected java.awt.Container |
pageSelect
The combobox for selecting the current page. |
protected java.awt.event.ActionListener |
pageSelectEditorActionListener
Used for typing in a page number. |
static java.lang.Object[] |
PAN_MODE_BUTTON
Arguments used to create the pan mode button. |
protected ToggleButton |
panMode
The mode button to pan the document. |
static java.lang.Object[] |
PREVIOUS_PAGE_BUTTON
Arguments used to create the previous page button. |
protected ToggleButton |
prevPage
The previous page button. |
static java.lang.Object[] |
SEARCH_BACK_BUTTON
Arguments used to create the previous page button. |
static java.lang.Object[] |
SEARCH_BUTTON
Arguments used to create the pan mode button. |
static java.lang.Object[] |
SEARCH_DOCUMENT_BACK_BUTTON
Arguments used to create the first page button. |
static java.lang.Object[] |
SEARCH_DOCUMENT_FWD_BUTTON
Arguments used to create the last page button. |
static java.lang.Object[] |
SEARCH_FORWARD_BUTTON
Arguments used to create the next page button. |
static java.lang.String |
SEARCH_NOT_SELECTED_STRING
card name for navigation buttons |
static java.lang.String |
SEARCH_SELECTED_STRING
card name for search mode buttons |
protected ToggleButton |
searchMode
The search button to search the document. |
static java.lang.Object[] |
SEPARATOR_BUTTON
Arguments used to create the logo button. |
static java.lang.Object[] |
TEXT_MODE_BUTTON
Arguments used to create the pan mode button. |
protected ToggleButton |
textMode
The mode button to display hiddent text. |
static java.lang.Object[] |
ZOOM_MODE_BUTTON
Arguments used to create the pan mode button. |
static java.lang.Object[] |
ZOOM_SELECT
Arguments used to create the zoom selection combobox. |
protected ToggleButton |
zoomIn
The zoom in button. |
static java.lang.Object[] |
ZOOMIN_BUTTON
Arguments used to create the zoom in button. |
protected ToggleButton |
zoomMode
The mode button to pan the document. |
protected ToggleButton |
zoomOut
The zoom out button. |
static java.lang.Object[] |
ZOOMOUT_BUTTON
Arguments used to create the zoom out button. |
protected java.awt.Panel |
zoomPagePanel
The panel with zoom and page panels. |
protected java.awt.Panel |
zoomPanel
The panel with zoom buttons. |
protected java.awt.Container |
zoomSelect
The combobox for zooming. |
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 | |
---|---|
Toolbar(DjVuBean bean)
Creates a new Toolbar object. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Called when a button is pressed. |
protected ToggleButton |
createButton(java.lang.Object[] args)
Create a normal button using the specified arguments. |
static ToggleButton |
createButton(java.util.Vector buttonList,
java.lang.Object[] args)
Called to create a new ToggleButton. |
protected java.awt.Container |
createComboBox(java.lang.Object[] args)
Creates an editable combobox. |
protected ToggleButton |
createToggleButton(java.lang.Object[] args)
Create a logo button using the specified arguments. |
protected void |
editorActionListener(java.awt.Container select,
java.lang.String appendString)
Create an editor class which simply sends the edited value with the specified string appended. |
void |
itemStateChanged(java.awt.event.ItemEvent event)
Called when an item state changes. |
void |
paint(java.awt.Graphics g)
Called to paint this container. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Called when a DjVuBean property is changed. |
void |
setSize(int width,
int height)
Set the target size of the Window. |
protected void |
setZoomEnabled(boolean value)
Called to enable or disable the zoom buttons. |
void |
updateTargetWidth(int targetWidth,
int width)
Called to update the target width of the toolbar. |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, 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, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object[] FIRST_PAGE_BUTTON
public static final java.lang.Object[] SEARCH_DOCUMENT_BACK_BUTTON
public static final java.lang.Object[] LAST_PAGE_BUTTON
public static final java.lang.Object[] SEARCH_DOCUMENT_FWD_BUTTON
public static final java.lang.Object[] LOGO_BUTTON
public static final java.lang.Object[] SEPARATOR_BUTTON
public static final java.lang.Object[] NEXT_PAGE_BUTTON
public static final java.lang.Object[] SEARCH_FORWARD_BUTTON
public static final java.lang.Object[] PREVIOUS_PAGE_BUTTON
public static final java.lang.Object[] SEARCH_BACK_BUTTON
public static final java.lang.Object[] ZOOMIN_BUTTON
public static final java.lang.Object[] ZOOMOUT_BUTTON
public static final java.lang.Object[] PAGE_SELECT
public static final java.lang.Object[] ZOOM_SELECT
public static final java.lang.Object[] ACTUAL_SIZE_BUTTON
public static final java.lang.Object[] FIT_PAGE_BUTTON
public static final java.lang.Object[] FIT_WIDTH_BUTTON
public static final java.lang.Object[] SEARCH_BUTTON
public static final java.lang.Object[] PAN_MODE_BUTTON
public static final java.lang.Object[] ZOOM_MODE_BUTTON
public static final java.lang.Object[] TEXT_MODE_BUTTON
public static final java.lang.String SEARCH_SELECTED_STRING
public static final java.lang.String SEARCH_NOT_SELECTED_STRING
public static final java.awt.Color BLACK
public static final java.awt.Color LIGHT_GRAY
protected final java.awt.Container pageSelect
protected final java.awt.Container zoomSelect
protected final java.awt.Panel modeButtonPanel
protected final java.awt.Panel pagePanel
protected final java.awt.Panel zoomPagePanel
protected final java.awt.Panel zoomPanel
protected final ToggleButton actualSize
protected final ToggleButton firstPage
protected final ToggleButton fitPage
protected final ToggleButton fitWidth
protected final ToggleButton lastPage
protected final ToggleButton logo
protected final ToggleButton logo2
protected final ToggleButton nextPage
protected final ToggleButton panMode
protected final ToggleButton prevPage
protected final ToggleButton searchMode
protected final ToggleButton textMode
protected final ToggleButton zoomIn
protected final ToggleButton zoomMode
protected final ToggleButton zoomOut
protected java.awt.event.ActionListener pageSelectEditorActionListener
Constructor Detail |
---|
public Toolbar(DjVuBean bean)
bean
- the DjVuBean being monitored and controled.Method Detail |
---|
public void setSize(int width, int height)
setSize
in class java.awt.Component
width
- target window widthheight
- target window heightpublic void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- indicating the action performed.public static ToggleButton createButton(java.util.Vector buttonList, java.lang.Object[] args)
buttonList
- Vector of buttons to append this item toargs
- the arguments used to create this button
public void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged
in interface java.awt.event.ItemListener
event
- indicating the changed item.public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
g
- The graphics device to draw to.public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- describing the changepublic void updateTargetWidth(int targetWidth, int width)
targetWidth
- The target width for the toolbar. (-1 if unknown)width
- The target width of the parent container.protected void setZoomEnabled(boolean value)
value
- true if zoom buttons should be enabled.protected ToggleButton createButton(java.lang.Object[] args)
class FoxtrotApplet extends com.lizardtech.djview.Applet { protected ToggleButton createButton(Object[] args) { if(args == LOGO_BUTTON) { final Object [] FOXTROTLOGO={ "Foxtrot Technologies Inc.", "FoxtrotTechnologies", "image/foxtrotlogo.djvu", new Dimension(24,24) }; return super.createButton(FOXTROTLOGO); } return super.createButton(args); } }
args
- array consisting of tooltip, alt text, and getIcon argument.
protected java.awt.Container createComboBox(java.lang.Object[] args)
args
- used to create the combobox.
protected ToggleButton createToggleButton(java.lang.Object[] args)
class MyApplet extends com.lizardtech.djview.Applet { protected ToggleButton createToggleButton(Object[] args) { if(args == PAN_MODE_BUTTON) { final Object [] button={ "Mouse Scroll", "MouseScroll", PAN_MODE_BUTTON[2], PAN_MODE_BUTTON[3]}; return super.createToggleButton(button); } return super.createToggleButton(args); } }
args
- array consisting of tooltip, alt text, getIcon argument, and
initial selection value.
protected void editorActionListener(java.awt.Container select, java.lang.String appendString)
select
- the combobox being edited.appendString
- String to append.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |