public abstract class AbstractAnnotationComponent extends javax.swing.JComponent implements java.awt.event.FocusListener, javax.swing.event.MouseInputListener, AnnotationComponent
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
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 AbstractPageViewComponent |
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 |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
AbstractAnnotationComponent(org.icepdf.core.pobjects.annotations.Annotation annotation,
DocumentViewController documentViewController,
AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel) |
| Modifier and Type | Method and Description |
|---|---|
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() |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, updateUIadd, 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, transferFocusDownCycle, validateTreeaction, 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, 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, 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, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFocus, repaintprotected 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 AbstractPageViewComponent 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
public AbstractAnnotationComponent(org.icepdf.core.pobjects.annotations.Annotation annotation,
DocumentViewController documentViewController,
AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel)
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()
AnnotationComponentgetAnnotation 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 AnnotationComponentprotected java.awt.Rectangle commonBoundsNormalization(java.awt.geom.GeneralPath shapePath,
java.awt.geom.AffineTransform at)
shapePath - path to apply transform toat - transform to apply to shapePathpublic 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.MouseListenerprotected 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()
AnnotationComponentisRollover in interface AnnotationComponentpublic boolean isBorderStyle()
AnnotationComponentisBorderStyle in interface AnnotationComponentpublic boolean isSelected()
isSelected in interface AnnotationComponentpublic void setSelected(boolean selected)
setSelected in interface AnnotationComponentpublic boolean isMovable()
AnnotationComponentisMovable in interface AnnotationComponentpublic boolean isResizable()
AnnotationComponentisResizable in interface AnnotationComponentpublic boolean isShowInvisibleBorder()
AnnotationComponentisShowInvisibleBorder in interface AnnotationComponent