|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.icepdf.ri.common.views.annotations.AbstractAnnotationComponent
public abstract class AbstractAnnotationComponent
AbstractAnnotationComponent contains base functionality for annotation components which are used to display annotation for a given page view. This class controls icon state, focus and basic component states: editable, movable, resizable, selected and show invisible border.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| 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 | |
|---|---|
protected org.icepdf.core.pobjects.annotations.Annotation |
annotation
|
protected static float |
annotationHighlightAlpha
|
protected static java.awt.Color |
annotationHighlightColor
|
protected float |
currentRotation
|
protected float |
currentZoom
|
protected int |
cursor
|
protected DocumentViewController |
documentViewController
|
protected DocumentViewModel |
documentViewModel
|
protected java.awt.Point |
endOfMousePress
|
protected boolean |
isEditable
|
protected static boolean |
isInteractiveAnnotationsEnabled
|
protected boolean |
isMousePressed
|
protected boolean |
isMovable
|
protected boolean |
isResizable
|
protected boolean |
isRollover
|
protected boolean |
isSelected
|
protected boolean |
isShowInvisibleBorder
|
protected static java.util.logging.Logger |
logger
|
protected java.util.ResourceBundle |
messageBundle
|
protected PageViewComponentImpl |
pageViewComponent
|
protected AnnotationState |
previousAnnotationState
|
protected static ResizableBorder |
resizableBorder
|
static int |
resizeBoxSize
|
protected boolean |
resized
|
protected java.awt.Point |
startOfMousePress
|
protected java.awt.Point |
startPos
|
protected boolean |
wasResized
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AbstractAnnotationComponent(org.icepdf.core.pobjects.annotations.Annotation annotation,
DocumentViewController documentViewController,
AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel)
|
|
| Method Summary | |
|---|---|
protected boolean |
additionalActionsHandler(org.icepdf.core.pobjects.Name additionalActionKey,
java.awt.event.MouseEvent e)
|
protected java.awt.Rectangle |
commonBoundsNormalization(java.awt.geom.GeneralPath shapePath,
java.awt.geom.AffineTransform at)
Normalizes and the given path with the specified transform. |
protected java.awt.Rectangle |
convertToPageSpace(java.awt.Rectangle rect)
Convert the shapes that make up the annotation to page space so that they will scale correctly at different zooms. |
void |
dispose()
|
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
org.icepdf.core.pobjects.annotations.Annotation |
getAnnotation()
Gets wrapped annotation object. |
org.icepdf.core.pobjects.Document |
getDocument()
|
int |
getPageIndex()
|
protected java.awt.geom.AffineTransform |
getPageTransform()
|
AbstractPageViewComponent |
getPageViewComponent()
|
PageViewComponent |
getParentPageView()
|
protected void |
initiateMouseMoved(java.awt.event.MouseEvent e)
|
abstract boolean |
isActive()
|
boolean |
isBorderStyle()
border has defined style. |
boolean |
isEditable()
Is the annotation editable |
boolean |
isMovable()
Component is movable. |
boolean |
isResizable()
Component is resizable. |
boolean |
isRollover()
Component highlight/select border is draw on mouse over. |
boolean |
isSelected()
|
boolean |
isShowInvisibleBorder()
Component is editable, contents can be updated in ui |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent me)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent mouseEvent)
|
void |
mouseMoved(java.awt.event.MouseEvent me)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent mouseEvent)
|
abstract void |
paintComponent(java.awt.Graphics g)
|
void |
refreshAnnotationRect()
Refreshes/transforms the page space bounds back to user space. |
void |
refreshDirtyBounds()
Refreshes the components bounds for the current page transformation. |
void |
removeMouseListeners()
|
abstract void |
resetAppearanceShapes()
|
protected void |
resize()
|
void |
setSelected(boolean selected)
|
void |
validate()
|
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, 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.Container |
|---|
add, 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, transferFocusBackward, transferFocusDownCycle, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.icepdf.ri.common.views.AnnotationComponent |
|---|
hasFocus, repaint |
| Field Detail |
|---|
protected static final java.util.logging.Logger logger
protected static boolean isInteractiveAnnotationsEnabled
protected static java.awt.Color annotationHighlightColor
protected static float annotationHighlightAlpha
public static final int resizeBoxSize
protected static ResizableBorder resizableBorder
protected PageViewComponentImpl pageViewComponent
protected DocumentViewController documentViewController
protected DocumentViewModel documentViewModel
protected float currentZoom
protected float currentRotation
protected org.icepdf.core.pobjects.annotations.Annotation annotation
protected boolean isMousePressed
protected boolean resized
protected boolean wasResized
protected boolean isEditable
protected boolean isRollover
protected boolean isMovable
protected boolean isResizable
protected boolean isShowInvisibleBorder
protected boolean isSelected
protected int cursor
protected java.awt.Point startPos
protected AnnotationState previousAnnotationState
protected java.awt.Point startOfMousePress
protected java.awt.Point endOfMousePress
protected java.util.ResourceBundle messageBundle
| Constructor Detail |
|---|
public AbstractAnnotationComponent(org.icepdf.core.pobjects.annotations.Annotation annotation,
DocumentViewController documentViewController,
AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel)
| Method Detail |
|---|
public abstract boolean isActive()
public org.icepdf.core.pobjects.Document getDocument()
getDocument in interface AnnotationComponentpublic int getPageIndex()
getPageIndex in interface AnnotationComponentpublic PageViewComponent getParentPageView()
getParentPageView in interface AnnotationComponentpublic AbstractPageViewComponent getPageViewComponent()
getPageViewComponent in interface AnnotationComponentpublic void removeMouseListeners()
public org.icepdf.core.pobjects.annotations.Annotation getAnnotation()
AnnotationComponent
getAnnotation in interface AnnotationComponentpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerprotected void resize()
public void refreshDirtyBounds()
refreshDirtyBounds in interface AnnotationComponentpublic void refreshAnnotationRect()
refreshAnnotationRect in interface AnnotationComponent
protected java.awt.Rectangle commonBoundsNormalization(java.awt.geom.GeneralPath shapePath,
java.awt.geom.AffineTransform at)
shapePath - path to apply transform toat - transform to apply to shapePath
public void validate()
validate in class java.awt.Containerpublic abstract void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic abstract void resetAppearanceShapes()
resetAppearanceShapes in interface AnnotationComponentpublic void mouseMoved(java.awt.event.MouseEvent me)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void dispose()
dispose in interface AnnotationComponentpublic void mouseExited(java.awt.event.MouseEvent mouseEvent)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListener
protected boolean additionalActionsHandler(org.icepdf.core.pobjects.Name additionalActionKey,
java.awt.event.MouseEvent e)
protected void initiateMouseMoved(java.awt.event.MouseEvent e)
public void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent mouseEvent)
mouseReleased in interface java.awt.event.MouseListenerprotected java.awt.Rectangle convertToPageSpace(java.awt.Rectangle rect)
protected java.awt.geom.AffineTransform getPageTransform()
public boolean isEditable()
isEditable in interface AnnotationComponentpublic boolean isRollover()
AnnotationComponent
isRollover in interface AnnotationComponentpublic boolean isBorderStyle()
AnnotationComponent
isBorderStyle in interface AnnotationComponentpublic boolean isSelected()
isSelected in interface AnnotationComponentpublic void setSelected(boolean selected)
setSelected in interface AnnotationComponentpublic boolean isMovable()
AnnotationComponent
isMovable in interface AnnotationComponentpublic boolean isResizable()
AnnotationComponent
isResizable in interface AnnotationComponentpublic boolean isShowInvisibleBorder()
AnnotationComponent
isShowInvisibleBorder in interface AnnotationComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||