|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.client.image.draw.AbstractDrawable edu.jhu.tmaj.client.image.draw.TextDrawable
public final class TextDrawable
Text drawn onto an image
Field Summary |
---|
Fields inherited from class edu.jhu.tmaj.client.image.draw.AbstractDrawable |
---|
BLACK_SQUARE_SIZE, drawableLabel, isCompleted, MARGIN, userID |
Constructor Summary | |
---|---|
TextDrawable(DrawableLabel d)
|
Method Summary | |
---|---|
protected boolean |
allowMoving()
Returns true if user has completed drawing the shape |
void |
createFromShapeRecord(ShapeRecord shapeRecord)
Called from subclasses that override this method, this class only sets the shapeID variable |
boolean |
createNewShapeOnMousePress()
Returns true |
void |
draw(java.awt.Graphics g)
Sets the color and draws the black squares aroudn the Drawable |
protected Point[] |
getBlackSquares()
Returns an empty array; This method is overwritten in subclasses |
InsertSQL |
getInsertSQL(int scoredImageID)
Returns a SQL statement to update an existing shape in the database. |
UpdateSQL |
getUpdateSQL()
Returns a SQL statement to insert this shape into the database. |
void |
handleKeyPressed(java.awt.event.KeyEvent e)
Does nothing. |
void |
handleMouseDragged(java.awt.event.MouseEvent e)
Moves the shape depending on difference between last point, if the user has finished drawing it. |
void |
handleMousePressed(java.awt.event.MouseEvent e)
Registers tempX and tempX if moving is allowed |
boolean |
isValid()
Returns true if the shape is "worth saving". |
protected void |
move(int xDiff,
int yDiff)
Moves the shape by adding xDiff and YDiff to it's current x and y, respectively. |
boolean |
shouldPointActivate(int xPos,
int yPos)
Returns true if the x and y are close enough to the border of the shape to "Select" the shape |
java.lang.String |
toString()
|
Methods inherited from class edu.jhu.tmaj.client.image.draw.AbstractDrawable |
---|
changeNormalStatusToModified, drawBlackSquare, drawBlackSquares, getColor, getDrawingX, getDrawingY, getNormalX, getNormalY, getShapeID, getStatus, getUserID, handleMouseReleased, isCompleted, isHighlighted, repaintDrawableLabel, setDrawableLabel, setIsCompleted, setIsHighlighted, setShapeID, setStatus, setUserID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.jhu.tmaj.client.image.draw.Drawable |
---|
getShapeID, getStatus, handleMouseReleased, isCompleted, isHighlighted, setIsCompleted, setIsHighlighted, setShapeID, setStatus, setUserID |
Constructor Detail |
---|
public TextDrawable(DrawableLabel d)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void draw(java.awt.Graphics g)
AbstractDrawable
draw
in interface Drawable
draw
in class AbstractDrawable
protected Point[] getBlackSquares()
AbstractDrawable
getBlackSquares
in class AbstractDrawable
public boolean shouldPointActivate(int xPos, int yPos)
Drawable
shouldPointActivate
in interface Drawable
protected void move(int xDiff, int yDiff)
AbstractDrawable
move
in class AbstractDrawable
public void handleMouseDragged(java.awt.event.MouseEvent e)
AbstractDrawable
handleMouseDragged
in interface Drawable
handleMouseDragged
in class AbstractDrawable
public void handleMousePressed(java.awt.event.MouseEvent e)
AbstractDrawable
handleMousePressed
in interface Drawable
handleMousePressed
in class AbstractDrawable
public void handleKeyPressed(java.awt.event.KeyEvent e)
AbstractDrawable
handleKeyPressed
in interface Drawable
handleKeyPressed
in class AbstractDrawable
public void createFromShapeRecord(ShapeRecord shapeRecord)
AbstractDrawable
createFromShapeRecord
in interface Drawable
createFromShapeRecord
in class AbstractDrawable
public InsertSQL getInsertSQL(int scoredImageID)
AbstractDrawable
getInsertSQL
in interface Drawable
getInsertSQL
in class AbstractDrawable
public UpdateSQL getUpdateSQL()
AbstractDrawable
getUpdateSQL
in interface Drawable
getUpdateSQL
in class AbstractDrawable
public boolean isValid()
Drawable
isValid
in interface Drawable
protected boolean allowMoving()
AbstractDrawable
allowMoving
in class AbstractDrawable
public boolean createNewShapeOnMousePress()
AbstractDrawable
createNewShapeOnMousePress
in interface Drawable
createNewShapeOnMousePress
in class AbstractDrawable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |