|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
File: DIDRoiIFC.java Version: 1.1 Description: This interface is key to the functionality of this application as is it encapsulates all the common functionality necessary for the ROI architecture to work properly. When implemented it allows ROIs (Rectangles, Polygons and any future implementation) to be passed around and used without knowledge of how the underlying methods are implemented. Modification Log: Date Name Comment xx-xx-xxxx XXX xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Field Summary | |
static int |
BASE
Constant(s) denoting the kind of ROI. |
static int |
CHARACTER
Constant(s) denoting the type of data the ROI represents. |
static int |
CONSTRUCTING
Constant(s) denoting the status of the ROI. |
static int |
LINE
Constant(s) denoting the type of data the ROI represents. |
static int |
MOVING
Constant(s) denoting the status of the ROI. |
static int |
NORMAL
Constant(s) denoting the status of the ROI. |
static int |
PAGE
Constant(s) denoting the type of data the ROI represents. |
static int |
POLYGON
Constant(s) denoting the kind of ROI. |
static int |
RECTANGLE
Constant(s) denoting the kind of ROI. |
static int |
RESIZING
Constant(s) denoting the status of the ROI. |
static int |
ROTATING
Constant(s) denoting the status of the ROI. |
static int |
UNDETERMINED
Constant(s) denoting the type of data the ROI represents. |
static int |
UNSPECIFIED
Constant(s) denoting the type of data the ROI represents. |
static int |
WAITING
Constant(s) denoting the status of the ROI. |
static int |
WORD
Constant(s) denoting the type of data the ROI represents. |
static int |
ZONE
Constant(s) denoting the type of data the ROI represents. |
Method Summary | |
void |
draw(java.awt.Graphics2D g2d)
This method renders the object on the screen. |
void |
draw(java.awt.Graphics2D g2d,
float scale)
|
void |
finalizeROI()
Method used to finalize and ROI. |
DIDNode |
getAnchorNode()
Method used to return a reference to the corresponding DIDNode. |
java.awt.Color |
getFillColor()
Method used to get the color of the ROI's inside. |
java.awt.Color |
getFocusColor()
Method used to get the color of the ROI when it has the focus. |
DIDBaseRoi |
getNextRoi()
Method used to return a reference to the next ROI. |
int |
getNodeType()
Method used to return the type of data this ROI is reprsenting (Zone, Line, Character). |
java.awt.Color |
getNoFocusColor()
Method used to get the color of the ROI when it doesn't have the focus. |
DIDBaseRoi |
getPrevRoi()
/*********************************************************************** Method used to return a reference to the previous ROI. |
int |
getStatus()
Method used to get the Status of the ROI. |
int |
getType()
Method used to get the type (Rectangle, Polygon) of a particular implementation of this class. |
int |
getVertexCount()
Method used to return the number of verticies contained within an ROI. |
boolean |
hasFocus()
Method used to determine if an ROI has the focus. |
void |
rotate(double myAmount)
Method used to rotate an ROI. |
boolean |
setActiveVertex(int x,
int y)
Method used to set the active vertex. |
void |
setActiveVertexCoord(int x,
int y)
Method used to move an active vertex to a new location. |
void |
setAnchorNode(DIDNode newAnchorNode)
Method used to set a reference to the corresponding DIDNode which the ROI is representing. |
void |
setAnchorNode(DIDNode newAnchorNode,
java.lang.String color)
Method used to set a reference to the corresponding DIDNode which the ROI is representing. |
void |
setCoordDisp(boolean dispCoords)
Method used to determine whether coordinate information is to be displayed next to each vertex in the ROI. |
void |
setDrawArrow(boolean myValue)
Method used to determine whether an arrow is to be displayed from the current ROI to the logically followed ROI. |
void |
setFillColor(java.awt.Color c)
Method used to set the color of the ROI's inside. |
void |
setFocus(boolean state)
Method used to set the focus for a particular instance of a ROI. |
void |
setFocusColor(java.awt.Color c)
Method used to set the color of the ROI when it has the focus. |
void |
setNextRoi(DIDBaseRoi nextRoi)
Method used to set a value of the next ROI. |
void |
setNoFocusColor(java.awt.Color c)
Method used to set the color of the ROI when it doesn't have the focus. |
void |
setPrevRoi(DIDBaseRoi prevRoi)
Method used to set a value of the previous ROI. |
void |
setSelected(boolean state)
|
void |
setStatus(int s)
Method used to set the status of the ROI. |
void |
setTranslation(int x,
int y)
Convenience method used move the entire ROI to a new location. |
void |
syncData()
Method used to synchronize coordinate data between the ROI class and the TreeModel (XML). |
java.lang.String |
toString()
Method used to return a string representation of this class. |
Methods inherited from interface java.awt.Shape |
contains,
contains,
contains,
contains,
getBounds,
getBounds2D,
getPathIterator,
getPathIterator,
intersects,
intersects |
Field Detail |
public static final int WAITING
public static final int CONSTRUCTING
public static final int MOVING
public static final int RESIZING
public static final int ROTATING
public static final int NORMAL
public static final int BASE
public static final int RECTANGLE
public static final int POLYGON
public static final int UNDETERMINED
public static final int UNSPECIFIED
public static final int PAGE
public static final int ZONE
public static final int LINE
public static final int WORD
public static final int CHARACTER
Method Detail |
public void draw(java.awt.Graphics2D g2d)
g
- A reference to a specific graphics object. In the absence of a reference this
parameter refers to the current object.public void draw(java.awt.Graphics2D g2d, float scale)
public void setFocus(boolean state)
state
- A boolean primitive used to determine if the current instance of the ROI
should get the focus.public void setSelected(boolean state)
public boolean hasFocus()
public void setStatus(int s)
s
- An integer that specifies the state of the ROI. 1=Moving, 2=Resizing, 3=Normal.DIDCreationHandler
public int getStatus()
public void setFocusColor(java.awt.Color c)
c
- A color object to which the ROI who has the focus should be set.public java.awt.Color getFocusColor()
public void setNoFocusColor(java.awt.Color c)
c
- A color object to which the ROI who doesn't have the focus should be set.public java.awt.Color getNoFocusColor()
public void setFillColor(java.awt.Color c)
A
- color object to which the color of the ROI's inside should be set.public java.awt.Color getFillColor()
public int getType()
public void rotate(double myAmount)
myAmount
- An integer repesenting how far an ROI should be rotated. Positive
integers rotate the ROI to the left and negative integers rotate the ROI to the right.public void finalizeROI()
public void setActiveVertexCoord(int x, int y)
x
- Integer representing the new x coordinate for the active vertex.y
- Integer representing the new y coordinate for the active vertex.public boolean setActiveVertex(int x, int y)
x
- X coordinate to be iterrigated to see if it lies within the active vertex bounds.y
- Y coordinate to be iterrigated to see if it lies within the active vertex bounds.public void setTranslation(int x, int y)
x
- Integer representing the x coordinate to which the ROI should be moved.y
- Integer representing the y coordinate to which the ROI should be moved.public void setAnchorNode(DIDNode newAnchorNode)
newAnchorNode
- A reference to the corresponding DIDNode.public void setAnchorNode(DIDNode newAnchorNode, java.lang.String color)
newAnchorNode
- A reference to the corresponding DIDNode.public DIDNode getAnchorNode()
public void setNextRoi(DIDBaseRoi nextRoi)
public DIDBaseRoi getNextRoi()
public void setPrevRoi(DIDBaseRoi prevRoi)
public DIDBaseRoi getPrevRoi()
public int getNodeType()
public java.lang.String toString()
public void syncData()
public int getVertexCount()
public void setCoordDisp(boolean dispCoords)
dispCoords
- True if coordinate info is to be displayed next to each vertex, false
if no information is to be displayed.public void setDrawArrow(boolean myValue)
myValue
- True if an arrow is to be displayed.
if false, no information is to be displayed.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |