|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentView
A view which listens to (is an observer of) an agent scape. The view must be a sublclass of java.awt.component. May be depreated, as Canvas can be replaced with Panel in Swing.
Method Summary | |
---|---|
void |
build()
Prepare the component view, once the view's scape has been created. |
void |
forceScapeNotify()
Forces the view to notify its scape. |
javax.swing.ImageIcon |
getIcon()
Return an icon that can be used to represent this frame. |
int |
getIterationsPerRedraw()
Returns the number of iterations this compenent will wait before redrawing, that is, calling updateScapeGraphics. |
java.awt.Dimension |
getPreferredSizeWithin(java.awt.Dimension d)
Sets the size this component would be if it had to fit within the allowed dimensions. |
Scape |
getScape()
Returns the Scape being viewed. |
ViewFrameBridge |
getViewFrame()
Return the view frame this component is being displayed within. |
void |
iconUpdated()
Should be called when the view has updated itself in a way that changes icon. |
void |
onChangeIterationsPerRedraw()
Called when the scape requests a change to iterations per redraw. |
void |
setIterationsPerRedraw(int iterations)
Sets the number of iterations this compenent will wait before redrawing, that is, calling updateScapeGraphics. |
void |
setMovieRecorder(MovieRecorder recorder)
Sets the recorder that can be used to record this view. |
void |
setViewFrame(ViewFrameBridge frame)
Sets the view frame this component is being displayed within. |
void |
updateScapeGraphics()
Called when scape has been updated and requires a redraw. |
Methods inherited from interface org.ascape.model.event.ScapeListener |
---|
clone, environmentQuiting, isGraphic, isLifeOfScape, scapeAdded, scapeClosing, scapeDeserialized, scapeInitialized, scapeIterated, scapeNotification, scapeRemoved, scapeSetup, scapeStarted, scapeStopped |
Methods inherited from interface org.ascape.util.HasName |
---|
getName |
Method Detail |
---|
void build()
ViewFrameBridge getViewFrame()
void setViewFrame(ViewFrameBridge frame)
frame
- the framevoid setMovieRecorder(MovieRecorder recorder)
recorder
- the recordervoid updateScapeGraphics()
int getIterationsPerRedraw()
void setIterationsPerRedraw(int iterations)
iterations
- the iterationsvoid onChangeIterationsPerRedraw()
Scape getScape()
getScape
in interface ScapeListener
void forceScapeNotify()
java.awt.Dimension getPreferredSizeWithin(java.awt.Dimension d)
d
- the d
javax.swing.ImageIcon getIcon()
void iconUpdated()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |