|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.display.drawmodel.SimpleDrawModel
gistoolkit.display.drawmodel.NewShapeDrawModel
Draw model to handle the creation of new shapes.
Field Summary | |
static int |
LINE
Constant for drawing a Line |
static int |
POINT
Constant for drawing a Point |
static int |
POLYGON
Constant for drawing a Polygon |
Fields inherited from class gistoolkit.display.drawmodel.SimpleDrawModel |
myGISDisplay |
Constructor Summary | |
NewShapeDrawModel()
Creates new NewShapeDrawModel |
|
NewShapeDrawModel(Command inCommand)
Creates new NewShapeDrawModel with the given command |
Method Summary | |
void |
done()
Called to finish drawing |
void |
draw()
Draw the shape on the screen |
Shape |
getShape()
Retrieve the shape from the draw model |
Shape |
getShapeLine()
Return the line from the arrays |
Shape |
getShapePoint()
Return the point from the arrays |
Shape |
getShapePolygon()
Return the polygon from the arrrays |
void |
keyPressed(java.awt.event.KeyEvent inKeyEvent)
Called when a key is pressed |
void |
mouseDragged(java.awt.event.MouseEvent e)
Drag the point |
void |
mousePressed(java.awt.event.MouseEvent e)
add a new point to the shape, listens to the gis editor. |
void |
reset()
Reset the draw model to the initial state |
void |
setShapeType(int inShapeType)
Set the type of shape this draw model is to create |
Methods inherited from class gistoolkit.display.drawmodel.SimpleDrawModel |
getGISDisplay, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased, remove, setCommand, setGISDisplay |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int POLYGON
public static final int LINE
public static final int POINT
Constructor Detail |
public NewShapeDrawModel()
public NewShapeDrawModel(Command inCommand)
Method Detail |
public void setShapeType(int inShapeType)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class SimpleDrawModel
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class SimpleDrawModel
public void draw()
draw
in interface DrawModel
draw
in class SimpleDrawModel
public Shape getShape()
public Shape getShapePoint()
public Shape getShapeLine()
public Shape getShapePolygon()
public void done()
public void keyPressed(java.awt.event.KeyEvent inKeyEvent)
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class SimpleDrawModel
public void reset()
reset
in interface DrawModel
reset
in class SimpleDrawModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |