|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.viewer.annotation.CMBPageAnnotation
The base class for all annotation objects.
Field Summary | |
protected boolean |
allowedToDraw
flag that tells whether the annotation should draw itself or not |
protected boolean |
applyPropertiesNow
true when the annotation properties are applied immediately |
protected boolean |
canHide
|
protected boolean |
canShow
|
protected boolean |
canUpdate
|
protected int |
creationIndex
The creation index to keep track of the z-order of the annotation when it was created. |
protected int |
currentIndex
The current index that indicates the z-order of the annotation. |
protected static int |
DEFAULT_BORDER_WIDTH
|
protected static boolean |
DEFAULT_TRANSPARENCY
|
protected boolean |
invertedHorz
true if the bounding rectangle has been reversed (say by dragging a right handle accross a left handle) |
protected boolean |
invertedVert
true if the bounding rectangle has been reversed (say by dragging a bottom handle accross a top handle) |
protected boolean |
isInMotion
true when the annotation is resized or moved |
protected boolean |
isVisibleWhileDragging
true if the entire annotation must be drawn while it is moved or resized otherwise only the outline is drawn |
static java.awt.datatransfer.DataFlavor |
pageAnnotationFlavor
DataFlavor used for clipboard operations as part of the Transferable interface |
protected int |
pageNumber
page that the annotation is drawn on |
protected boolean |
showHandles
flag that tells whether to show or hide the selection handles around the annotation |
protected int |
type
The annotation type |
Constructor Summary | |
CMBPageAnnotation()
Standard constructor |
|
CMBPageAnnotation(java.awt.Rectangle r)
|
|
CMBPageAnnotation(java.awt.Rectangle r,
int pageNumber)
|
Method Summary | |
void |
addAnnotationPropertiesListener(CMBAnnotationPropertiesListener apl)
|
void |
addPropertyComponent(java.lang.String propertyName,
javax.swing.JComponent component)
|
boolean |
canHide()
|
boolean |
canShow()
Privilege testing for annotations. |
boolean |
canUpdate()
|
java.lang.Object |
clone()
Cloneable interface |
boolean |
contains(java.awt.Point p)
|
void |
dispose()
|
void |
dontDraw()
Sets an internal flag that tells the annotation not to draw itself even though its draw() method is invoked. |
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. |
protected void |
drawSelectionBox(java.awt.Graphics2D g)
|
void |
firePropertiesChangeEvent()
|
void |
firePropertiesWillChangeEvent()
|
int |
getAnnotationRotation()
|
java.awt.Color |
getBorderColor()
gets The color used for border. |
int |
getBorderWidth()
|
int |
getCreationIndex()
|
int |
getCurrentIndex()
|
protected int |
getDefaultHandleHeight()
|
protected int |
getDefaultHandleWidth()
|
java.awt.Rectangle |
getDrawRect()
Gets the rectangle in which the annotation will be drawn. |
java.awt.Color |
getFillColor()
gets The color used for fill. |
protected java.awt.Rectangle |
getFillRect()
Gets the inner 'hollow' rectangle that is to be filled. |
java.awt.Font |
getFont()
|
boolean |
getInvertHorizontal()
|
boolean |
getInvertVertical()
|
java.lang.String |
getName()
|
protected java.awt.Stroke |
getOutlineStroke()
gets The stroke being used to paint the outline of the annotation (like when dragging). |
int |
getPageNumber()
|
java.lang.String |
getPropertiesGroupTitle()
|
javax.swing.JPanel |
getPropertiesPanel()
Returns the custom properties panel that is used to build the custom properties dialog for the annotation. |
java.awt.Rectangle |
getRefreshRect()
Gets the rectangle that encompasses the entire annotation, including borders and handles For example a 1 inch annotation can have a 1 inch border, and so it covers 2 inches not 1. |
boolean |
getRotateWithImage()
|
int |
getRotation()
|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Transferable interfaces |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
|
boolean |
getTransparent()
returns true if transparent. |
int |
getType()
gets an enumerated type of the current annoation. |
boolean |
getVisibleWhileDragging()
|
void |
growBy(int dx,
int dy)
grows the annotation (its bounding rectangle) by dx dy |
void |
handlePropertyChange(java.lang.String s,
javax.swing.JComponent o,
int action)
|
boolean |
handlesShowing()
Returns the visibility status of the handles |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
|
protected void |
modifyDeltas(java.awt.Point deltasContainer)
|
void |
pleaseDraw()
Sets an internal flag that tells the annotation to draw itself when its draw() method is invoked. |
boolean |
pointInHandle(java.awt.Point p)
returns true if the supplied point is in a handle |
protected void |
resizeDrawRect(int newWidth,
int newHeight)
changes the width and the height of the draw rectangle. |
protected java.awt.Rectangle |
rotateDocRect(java.awt.Rectangle toRotate)
|
protected java.awt.Rectangle |
scaleRectangle(java.awt.Rectangle toScale)
Scales the input rectangle according to the current scale (zoom) factors. |
void |
setAnnotationRotation(int rot)
Must be called only when annotation is first created rot passed must be 0 when annotation is created |
void |
setApplyNow(boolean now)
|
void |
setBorderColor(java.awt.Color c)
sets The color used for border. |
void |
setBorderWidth(int width)
sets the width of the stroke used to paint the line (borders). |
void |
setCanHide(boolean hide)
|
void |
setCanShow(boolean show)
|
void |
setCanUpdate(boolean update)
|
void |
setCurrentIndex(int index)
|
protected void |
setDrawRect(int x,
int y,
int width,
int height)
changes the draw rectangle to the coordinates supplied. |
void |
setFillColor(java.awt.Color c)
sets The color used for fill. |
void |
setFont(java.awt.Font font)
|
void |
setImageHeight(int h)
|
void |
setImageWidth(int w)
|
void |
setInMotion(boolean inMotion)
Called to notify the annotation that it has started moving or stopped moving. |
void |
setInvertHorizontal(boolean invertH)
|
void |
setInvertVertical(boolean invertV)
|
void |
setPageNumber(int page)
|
void |
setRotateWithImage(boolean b)
|
void |
setRotation(int rot)
|
void |
setScaleNum(int sn)
|
void |
setTransparent(boolean bTrans)
true makes it transparent, false makes it non-transparent |
void |
setVisibleWhileDragging(boolean visible)
|
void |
showHandles(boolean showHandles)
Shows/hides the handles on the annotation. |
java.lang.String |
toString()
|
void |
translateBy(int dx,
int dy)
Translates the anotation by x, y |
protected java.awt.Rectangle |
translateDocRect(java.awt.Rectangle toRotate)
|
protected java.awt.Rectangle |
translateRotateDocRect(java.awt.Rectangle toRotate)
|
void |
updateValues(int action)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient boolean allowedToDraw
protected transient boolean showHandles
protected int type
protected int pageNumber
protected int creationIndex
protected int currentIndex
protected boolean invertedHorz
protected boolean invertedVert
public static java.awt.datatransfer.DataFlavor pageAnnotationFlavor
protected transient boolean isInMotion
protected boolean isVisibleWhileDragging
protected transient boolean applyPropertiesNow
protected boolean canShow
protected boolean canHide
protected boolean canUpdate
protected static final int DEFAULT_BORDER_WIDTH
protected static final boolean DEFAULT_TRANSPARENCY
Constructor Detail |
public CMBPageAnnotation()
public CMBPageAnnotation(java.awt.Rectangle r)
r
- An initial bounding rectanglepublic CMBPageAnnotation(java.awt.Rectangle r, int pageNumber)
Method Detail |
public int getRotation()
public void setRotation(int rot)
public void setAnnotationRotation(int rot)
public int getAnnotationRotation()
public void setScaleNum(int sn)
public boolean getRotateWithImage()
public void setRotateWithImage(boolean b)
public void setBorderWidth(int width)
public void setImageHeight(int h)
public void setImageWidth(int w)
public int getBorderWidth()
public boolean getInvertHorizontal()
public boolean getInvertVertical()
public void setInvertHorizontal(boolean invertH)
public void setInvertVertical(boolean invertV)
protected java.awt.Stroke getOutlineStroke()
public boolean getTransparent()
public void setTransparent(boolean bTrans)
public java.awt.Color getBorderColor()
public void setPageNumber(int page)
public int getPageNumber()
protected java.awt.Rectangle rotateDocRect(java.awt.Rectangle toRotate)
protected java.awt.Rectangle translateDocRect(java.awt.Rectangle toRotate)
protected java.awt.Rectangle translateRotateDocRect(java.awt.Rectangle toRotate)
public void setBorderColor(java.awt.Color c)
public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color c)
public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public int getType()
public java.lang.String getName()
public void setInMotion(boolean inMotion)
public void setApplyNow(boolean now)
public void setVisibleWhileDragging(boolean visible)
public boolean getVisibleWhileDragging()
public void dontDraw()
public void pleaseDraw()
public boolean contains(java.awt.Point p)
p
- A pointprotected void resizeDrawRect(int newWidth, int newHeight)
newWidth
- - new width of the draw rectangle.newHeight
- - new height of the draw rectangle.protected void setDrawRect(int x, int y, int width, int height)
public void translateBy(int dx, int dy)
x
- How far to translate on the x axisy
- How much to translate on y axispublic java.awt.Rectangle getRefreshRect()
public java.awt.Rectangle getDrawRect()
protected java.awt.Rectangle getFillRect()
protected int getDefaultHandleWidth()
protected int getDefaultHandleHeight()
public void addAnnotationPropertiesListener(CMBAnnotationPropertiesListener apl)
public void firePropertiesChangeEvent()
public void firePropertiesWillChangeEvent()
public void draw(java.awt.Graphics2D g2)
g2
- - Graphics to draw onpublic void drawOutline(java.awt.Graphics2D g2)
g2
- - Graphics to draw onpublic boolean handlesShowing()
public void showHandles(boolean showHandles)
showHandles
- true-show handles
false-hide thempublic boolean pointInHandle(java.awt.Point p)
p
- A point to checkpublic java.lang.String getPropertiesGroupTitle()
protected void drawSelectionBox(java.awt.Graphics2D g)
protected void drawHandles(java.awt.Graphics2D g)
g
- protected void modifyDeltas(java.awt.Point deltasContainer)
public void growBy(int dx, int dy)
dx
- how much to grow on the x axisdy
- how much to grow on the y axisprotected java.awt.Rectangle scaleRectangle(java.awt.Rectangle toScale)
public int getCreationIndex()
public void setCurrentIndex(int index)
public int getCurrentIndex()
public javax.swing.JPanel getPropertiesPanel()
CMBAnnotationPropertiesInterface
getPropertiesPanel
in interface CMBAnnotationPropertiesInterface
public void updateValues(int action)
updateValues
in interface CMBAnnotationPropertiesInterface
com.ibm.mm.viewer.annotation.CMBAnnotationPropertiesInterface
int
- public void handlePropertyChange(java.lang.String s, javax.swing.JComponent o, int action)
handlePropertyChange
in interface CMBAnnotationPropertiesInterface
com.ibm.mm.viewer.annotation.CMBAnnotationPropertiesInterface
String
- JComponent
- int
- public void addPropertyComponent(java.lang.String propertyName, javax.swing.JComponent component)
addPropertyComponent
in interface CMBAnnotationPropertiesInterface
com.ibm.mm.viewer.annotation.CMBAnnotationPropertiesInterface
String
- JComponent
- public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean canShow()
public boolean canHide()
public boolean canUpdate()
public void setCanShow(boolean show)
public void setCanHide(boolean hide)
public void setCanUpdate(boolean update)
public void dispose()
public java.lang.String toString()
toString
in class java.lang.Object
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |