|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Drawable
All shapes that are drawn onto a DrawableLabel implement this interface
Method Summary | |
---|---|
void |
createFromShapeRecord(ShapeRecord shapeRecord)
Creates a shape from a single record in the Shapes table |
boolean |
createNewShapeOnMousePress()
|
void |
draw(java.awt.Graphics g)
Draws the shape |
InsertSQL |
getInsertSQL(int scoredImageID)
Returns a SQL statement to insert this shape into the database |
int |
getShapeID()
Returns the ShapeID of the shape in the database |
DrawableStatus |
getStatus()
|
UpdateSQL |
getUpdateSQL()
Returns a SQL statement to update the shape in the database |
void |
handleKeyPressed(java.awt.event.KeyEvent e)
|
void |
handleMouseDragged(java.awt.event.MouseEvent e)
|
void |
handleMousePressed(java.awt.event.MouseEvent e)
|
void |
handleMouseReleased(java.awt.event.MouseEvent e)
|
boolean |
isCompleted()
Returns true if the user is finished drawing the shape. |
boolean |
isHighlighted()
Returns true if the shape is selected |
boolean |
isValid()
Returns true if the shape is "worth saving". |
void |
setIsCompleted(boolean b)
|
void |
setIsHighlighted(boolean b)
|
void |
setShapeID(int i)
|
void |
setStatus(DrawableStatus s)
|
void |
setUserID(int userID)
Used only for setting the InputLog in the shapes table |
boolean |
shouldPointActivate(int x,
int y)
Returns true if the x and y are close enough to the border of the shape to "Select" the shape |
Method Detail |
---|
DrawableStatus getStatus()
void setStatus(DrawableStatus s)
void draw(java.awt.Graphics g)
void handleMousePressed(java.awt.event.MouseEvent e)
void handleMouseReleased(java.awt.event.MouseEvent e)
void handleMouseDragged(java.awt.event.MouseEvent e)
void handleKeyPressed(java.awt.event.KeyEvent e)
boolean shouldPointActivate(int x, int y)
void setIsHighlighted(boolean b)
boolean isHighlighted()
int getShapeID()
void setShapeID(int i)
void createFromShapeRecord(ShapeRecord shapeRecord)
InsertSQL getInsertSQL(int scoredImageID)
UpdateSQL getUpdateSQL()
boolean isCompleted()
void setIsCompleted(boolean b)
boolean isValid()
boolean createNewShapeOnMousePress()
void setUserID(int userID)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |