|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface View
A View provides a visualization of the current state of a Model and may further visualize Actions as they modify this state. Views may also show information regarding the state of one or more Agents if the Agents implement the Annotated interface. Default views are provided for each major Model type, and users needing a more specific implementation may extend these or build their own from scratch.
Method Summary | |
---|---|
ColorScheme |
colorScheme()
Obtain the ColorScheme used by this View. |
Controller |
controller()
Obtain a reference to the Controller associated with this View. |
void |
draw(Graphics2D g)
Draw this view. |
void |
flush()
Release any transient view state and update the View to reflect the current state of the Model. |
int |
height()
Obtain the preferred height of this View, in pixels. |
void |
tick(double time)
Advance the state of the simulation. |
int |
width()
Obtain the preferred width of this View, in pixels. |
Method Detail |
---|
Controller controller()
ColorScheme colorScheme()
int width()
int height()
void draw(Graphics2D g)
g
- the target Graphics2D surface.void tick(double time)
time
- the amount of time that has passed since the last tickvoid flush()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |