com.qoppa.pdfNotes
Class AnnotPropertiesToolbar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JToolBar
                  extended by com.qoppa.pdfNotes.AnnotPropertiesToolbar
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class AnnotPropertiesToolbar
extends JToolBar

The AnnotPropertiesToolbar allows changing common annotation properties quickly from a tool bar without the need to open the full properties dialog. The controls in the tool bar are customized depending on the type of annotation selected.

The tool bar can be shown in a dialog with setDefaultDialogVisible(boolean), or the tool bar can be added to another Container.

Author:
Qoppa Software
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JToolBar
JToolBar.Separator
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AnnotPropertiesToolbar(PDFNotesBean notesBean)
          This method initializes the annotations toolbar.
 
Method Summary
 JSeparator createSeparator()
          Convenience method to create a JSeparator that is used in other tool bars.
 JButton getJbBorderColor()
          Returns the border color button.
 JButton getJbColor()
          Returns the color button.
 JButton getJbFillColor()
          Returns the fill color button.
 AbstractButton getJbLineWidth()
          Returns the line width button.
 JButton getJbTextColor()
          Returns the text color button.
 AbstractButton getJbTransparency()
          Returns the transparency button.
 JComboBox getJcbTextFont()
          Returns the Text Font combobox.
 JComboBox getJcbTextFontSize()
          Returns the Text Font Size combobox.
 Window setDefaultDialogVisible(boolean visible)
          Shows or hides the AnnotPropertiesToolbar in a default floating dialog implementation.
 void setPackWindowOnSelection(boolean packWindow)
          The AnnotProperitesToolbar can be added to a PDFNotesBean or displayed in another Component or Window.
 
Methods inherited from class javax.swing.JToolBar
add, addSeparator, addSeparator, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, 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
 
Methods inherited from class java.awt.Container
add, 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, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, 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, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotPropertiesToolbar

public AnnotPropertiesToolbar(PDFNotesBean notesBean)
This method initializes the annotations toolbar.

Method Detail

getJbColor

public JButton getJbColor()
Returns the color button.

Returns:
Color button

getJbBorderColor

public JButton getJbBorderColor()
Returns the border color button.

Returns:
Border Color button

getJbFillColor

public JButton getJbFillColor()
Returns the fill color button.

Returns:
Fill Color button

getJbTextColor

public JButton getJbTextColor()
Returns the text color button.

Returns:
Text Color button

getJbLineWidth

public AbstractButton getJbLineWidth()
Returns the line width button.

Returns:
Line Width button

getJbTransparency

public AbstractButton getJbTransparency()
Returns the transparency button.

Returns:
Transparency button

getJcbTextFont

public JComboBox getJcbTextFont()
Returns the Text Font combobox.

Returns:
javax.swing.JComboBox

getJcbTextFontSize

public JComboBox getJcbTextFontSize()
Returns the Text Font Size combobox.

Returns:
javax.swing.JComboBox

createSeparator

public JSeparator createSeparator()
Convenience method to create a JSeparator that is used in other tool bars.

Returns:
a JSeparator

setPackWindowOnSelection

public void setPackWindowOnSelection(boolean packWindow)
The AnnotProperitesToolbar can be added to a PDFNotesBean or displayed in another Component or Window. If the toolbar is displayed it's own Window, setting this property will cause the Window to pack when an Annotation is selected and the AnnotPropertiesToolbar components' visibility changes.

Parameters:
packWindow - boolean indicating whether to pack it's parent Window when an Annotation is selected

setDefaultDialogVisible

public Window setDefaultDialogVisible(boolean visible)
Shows or hides the AnnotPropertiesToolbar in a default floating dialog implementation. If a custom dialog is preferred, the AnnotPropertiesToolbar can be added to another Window or Container.

Parameters:
visible - if true, shows the dialog; otherwise, hides this dialog