Enterprise Information Portal APIs

com.ibm.mm.viewer.annotation
Class CMBPenAnnotation

java.lang.Object
  |
  +--com.ibm.mm.viewer.annotation.CMBPageAnnotation
        |
        +--com.ibm.mm.viewer.annotation.CMBPenAnnotation
All Implemented Interfaces:
java.lang.Cloneable, CMBAnnotationConstants, CMBAnnotationPropertiesInterface, java.io.Serializable, java.awt.datatransfer.Transferable

public class CMBPenAnnotation
extends CMBPageAnnotation

Deriving from CMBPageAnnotation, this class specializes to draw a pen annotation.

See Also:
Serialized Form

Fields inherited from class com.ibm.mm.viewer.annotation.CMBPageAnnotation
allowedToDraw, applyPropertiesNow, canHide, canShow, canUpdate, creationIndex, currentIndex, DEFAULT_BORDER_WIDTH, DEFAULT_TRANSPARENCY, invertedHorz, invertedVert, isInMotion, isVisibleWhileDragging, pageAnnotationFlavor, pageNumber, showHandles, type
 
Fields inherited from interface com.ibm.mm.viewer.annotation.CMBAnnotationConstants
ANN_ARROW, ANN_CIRCLE, ANN_HIGHLIGHT, ANN_LINE, ANN_NAMES, ANN_NOTE, ANN_PEN, ANN_RECT, ANN_STAMP, ANN_TEXT, ANN_UNKNOWN, BOTTOM_HANDLE, BOTTOM_LEFT_HANDLE, BOTTOM_RIGHT_HANDLE, CURSOR_COUNT, DEFAULT_CURSOR, DEFAULT_CURSOR_HOTSPOT, DELETING_ANNOTATION, DOUBLE_CLICK, DRAG_MOVE, DRAG_RESIZE, HANDLE_CURSOR, HANDLE_HEIGHT, HANDLE_HOTSPOT, HANDLE_WIDTH, IDLE, IIDSP_PAGE_SCALE_FACTOR, IIOV_ROTATE_0, IIOV_ROTATE_180, IIOV_ROTATE_270, IIOV_ROTATE_90, INSERTING_ANNOTATION, LEFT_HANDLE, MOVE_CURSOR, MOVE_CURSOR_HOTSPOT, OPAQUE_ALPHA, PRIV_CREATE_ANNOTATION, PRIV_DELETE_ANNOTATION, PRIV_VIEW_ANNOTATION, RIGHT_HANDLE, START_CUSTOM_TYPE, TEXT_OFFSET, TOP_HANDLE, TOP_LEFT_HANDLE, TOP_RIGHT_HANDLE, TRANSPARENT_ALPHA, UPDATE_ANN_WITH_DEFAULTS, UPDATE_ANN_WITH_GUI, UPDATE_DEFAULTS_WITH_ANN, UPDATE_DEFAULTS_WITH_GUI, UPDATE_GUI_WITH_ANN, UPDATE_GUI_WITH_DEFAULTS
 
Constructor Summary
CMBPenAnnotation()
           
CMBPenAnnotation(java.util.Vector strokes, int pageNumber)
           
 
Method Summary
 void addPropertyComponent(java.lang.String propertyName, javax.swing.JComponent component)
           
 void dispose()
           
 void draw(java.awt.Graphics2D g2)
          Draws the annotation on the supplied graphics.
protected  void drawHandles(java.awt.Graphics2D g)
          Draws the handles on the given graphics
 void drawOutline(java.awt.Graphics2D g2)
          Draws the dashed outline of the annotation.
 void eraseSegment(java.awt.Point point)
           
 CMBPropertiesPanel getAnnotationPropertiesPanel()
           
 java.util.Vector getPenStrokes()
           
 javax.swing.JPanel getPropertiesPanel()
          Returns the custom properties panel that is used to build the custom properties dialog for the annotation.
 void growBy(int dx, int dy)
          Override of the parent class GrowBy method, as Pen is not resizable, do nothing
 void handlePropertyChange(java.lang.String propName, javax.swing.JComponent comp, int action)
           
 void init()
           
 boolean pointInHandle(java.awt.Point p)
          Override pointInHandle to prevent cursor change
 void translateBy(int dx, int dy)
          Overide of the parent class TranslateBy method, as Pen requires special handling
 void translateTo(java.awt.Point p)
          Override of the parent class TranslateTo method, as Pen requires special handling
 void updateValues(int action)
           
 
Methods inherited from class com.ibm.mm.viewer.annotation.CMBPageAnnotation
addAnnotationPropertiesListener, canHide, canShow, canUpdate, clone, contains, dontDraw, drawSelectionBox, firePropertiesChangeEvent, firePropertiesWillChangeEvent, getAnnotationRotation, getBorderColor, getBorderWidth, getCreationIndex, getCurrentIndex, getDefaultHandleHeight, getDefaultHandleWidth, getDrawRect, getFillColor, getFillRect, getFont, getInvertHorizontal, getInvertVertical, getName, getOutlineStroke, getPageNumber, getPropertiesGroupTitle, getRefreshRect, getRotateWithImage, getRotation, getTransferData, getTransferDataFlavors, getTransparent, getType, getVisibleWhileDragging, handlesShowing, isDataFlavorSupported, modifyDeltas, pleaseDraw, resizeDrawRect, rotateDocRect, scaleRectangle, setAnnotationRotation, setApplyNow, setBorderColor, setBorderWidth, setCanHide, setCanShow, setCanUpdate, setCurrentIndex, setDrawRect, setFillColor, setFont, setImageHeight, setImageWidth, setInMotion, setInvertHorizontal, setInvertVertical, setPageNumber, setRotateWithImage, setRotation, setScaleNum, setTransparent, setVisibleWhileDragging, showHandles, toString, translateDocRect, translateRotateDocRect
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMBPenAnnotation

public CMBPenAnnotation()

CMBPenAnnotation

public CMBPenAnnotation(java.util.Vector strokes,
                        int pageNumber)
Method Detail

init

public void init()

getPenStrokes

public java.util.Vector getPenStrokes()

draw

public void draw(java.awt.Graphics2D g2)
Description copied from class: CMBPageAnnotation
Draws the annotation on the supplied graphics. This is always overriden by the subclasses
Overrides:
draw in class CMBPageAnnotation
Following copied from class: com.ibm.mm.viewer.annotation.CMBPageAnnotation
Parameters:
g2 - - Graphics to draw on

drawOutline

public void drawOutline(java.awt.Graphics2D g2)
Description copied from class: CMBPageAnnotation
Draws the dashed outline of the annotation. Useful when dragging it or resizing it. This is always overriden by the subclasses
Overrides:
drawOutline in class CMBPageAnnotation
Following copied from class: com.ibm.mm.viewer.annotation.CMBPageAnnotation
Parameters:
g2 - - Graphics to draw on

drawHandles

protected void drawHandles(java.awt.Graphics2D g)
Draws the handles on the given graphics
Overrides:
drawHandles in class CMBPageAnnotation
Parameters:
g -  

pointInHandle

public boolean pointInHandle(java.awt.Point p)
Override pointInHandle to prevent cursor change
Overrides:
pointInHandle in class CMBPageAnnotation
Following copied from class: com.ibm.mm.viewer.annotation.CMBPageAnnotation
Parameters:
p - A point to check

translateBy

public void translateBy(int dx,
                        int dy)
Overide of the parent class TranslateBy method, as Pen requires special handling
Overrides:
translateBy in class CMBPageAnnotation
Following copied from class: com.ibm.mm.viewer.annotation.CMBPageAnnotation
Parameters:
x - How far to translate on the x axis
y - How much to translate on y axis

translateTo

public void translateTo(java.awt.Point p)
Override of the parent class TranslateTo method, as Pen requires special handling

growBy

public void growBy(int dx,
                   int dy)
Override of the parent class GrowBy method, as Pen is not resizable, do nothing
Overrides:
growBy in class CMBPageAnnotation
Following copied from class: com.ibm.mm.viewer.annotation.CMBPageAnnotation
Parameters:
dx - how much to grow on the x axis
dy - how much to grow on the y axis

eraseSegment

public void eraseSegment(java.awt.Point point)

getAnnotationPropertiesPanel

public CMBPropertiesPanel getAnnotationPropertiesPanel()
Returns:
JPanel The panel used for this annotation type in the properties dialog to edit the properties of this annotation.

getPropertiesPanel

public javax.swing.JPanel getPropertiesPanel()
Description copied from interface: CMBAnnotationPropertiesInterface
Returns the custom properties panel that is used to build the custom properties dialog for the annotation.
Overrides:
getPropertiesPanel in class CMBPageAnnotation
Following copied from class: com.ibm.mm.viewer.annotation.CMBPageAnnotation
Returns:
JPanel The panel used for this annotation type in the properties dialog to edit the properties of this annotation.

handlePropertyChange

public void handlePropertyChange(java.lang.String propName,
                                 javax.swing.JComponent comp,
                                 int action)
Overrides:
handlePropertyChange in class CMBPageAnnotation
Following copied from interface: com.ibm.mm.viewer.annotation.CMBAnnotationPropertiesInterface
Parameters:
String -  
JComponent -  
int -  

updateValues

public void updateValues(int action)
Overrides:
updateValues in class CMBPageAnnotation
Following copied from interface: com.ibm.mm.viewer.annotation.CMBAnnotationPropertiesInterface
Parameters:
int -  

addPropertyComponent

public void addPropertyComponent(java.lang.String propertyName,
                                 javax.swing.JComponent component)
Overrides:
addPropertyComponent in class CMBPageAnnotation
Following copied from interface: com.ibm.mm.viewer.annotation.CMBAnnotationPropertiesInterface
Parameters:
String -  
JComponent -  

dispose

public void dispose()
Overrides:
dispose in class CMBPageAnnotation

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.