|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDrawCommand
Draw commands do not change the model, rather they simply draw on the top-most layer. They are primarily used to provide user feedback. For example the rubber-banding box drawn by the victim selection tool is drawn using a DrawCommand. The rubber-banding box is a decoration for the user, other commands employed byt the tool change the model. One class of commands that modifies the models are the EditCommands. They edit the features themselves. Because draw commands are executed every paint, instead of once like other types of commands, each DrawCommand has a valid flag which is set false when the lifetime of the command is up. Once the valid flag is set to false the command will be removed from the command stack the next update. The command must be resent if the command is to be drawn again.
MapCommand
Method Summary | |
---|---|
void |
dispose()
Disposes of any resources that need to be disposed of. |
java.awt.Rectangle |
getValidArea()
Returns the rectangle where this command is valid. |
boolean |
isValid()
Returns whether the current command should be drawn. |
void |
setGraphics(ViewportGraphics graphics,
IMapDisplay display)
Sets the graphics2D that this command will draw on. |
void |
setValid(boolean valid)
Sets whether the current command should be drawn. |
Method Detail |
---|
void setGraphics(ViewportGraphics graphics, IMapDisplay display)
graphics
- the graphics2D that this command will draw ondisplay
- The display area that will be draw on.ViewportGraphics
,
IMapDisplay
java.awt.Rectangle getValidArea()
void setValid(boolean valid)
valid
- true if the command should be drawn.boolean isValid()
void dispose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |