Class S3
- All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsRenderable, IsWidget, ProvidesResize, RequiresResize, ChangeListener, LifecycleListener, RunListener, SampleListener
The view to display time series of data as a trajectory on the \(S_3\)
simplex.
- Author:
- Christoph Hauert
- Implementation Notes:
- Note (yet) ready for multiple species!
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractView
AbstractView.ExportCommand, AbstractView.ExportTypeNested classes/interfaces inherited from class UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface ChangeListener
ChangeListener.PendingAction -
Field Summary
FieldsFields inherited from class AbstractView
engine, exportSubmenu, exportSubmenuTrigger, gCols, graphs, gRows, isActive, isLoaded, logger, MIN_MSEC_BETWEEN_UPDATES, model, options, restoreMenu, timestamp, type, updatetime, wrapperFields inherited from class UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionS3(EvoLudoGWT engine) Construct a new view to display the time series data of the current EvoLudo model as a trajectory in a \(S_3\) simplex. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanAllocate all graphs managed by this view.private S3GraphcreateS3Graph(Module<?> module, int role) Helper method to create and configure an S3Graph for a given role.protected AbstractView.ExportType[]Return the list of export types that are acceptable for _all_ graphs in this view.getName()Get the name of this view.voidCalled after the EvoLudo model got re-initialized.voidreset(boolean hard) Called when a module has been reset.booleansetInitialState(double[] init) Notifies the controller that the user requested setting a new initial configurationinit(optional implementation).voidunload()Unload the view.voidupdate(boolean force) Called when the view needs updating.Methods inherited from class AbstractView
activate, deactivate, destroyGraphs, export, export, exportDataHeader, exportMeanData, exportPNG, exportStatData, exportSVG, exportTrajData, getGraphAt, getLogger, getMode, getModel, getStatus, getStatus, getType, hasLayout, isActive, isRunning, layoutComplete, load, modelChanged, modelDidReset, modelStopped, modelUnloaded, moduleRestored, moduleUnloaded, mouseHitNode, mouseHitNode, onKeyDown, onKeyUp, onResize, onUnload, parse, populateContextMenu, populateContextMenuAt, scheduleUpdate, setBounds, setOptions, shift, update, zoomMethods inherited from class Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface LifecycleListener
modelLoaded, moduleLoadedMethods inherited from interface RunListener
modelRelaxed, modelRunning, modelSettingsMethods inherited from interface SampleListener
modelSample
-
Field Details
-
state
protected double[] stateThe current state of the model. The end point of the current trajectory.
-
-
Constructor Details
-
S3
Construct a new view to display the time series data of the current EvoLudo model as a trajectory in a \(S_3\) simplex.- Parameters:
engine- the pacemaker for running the model
-
-
Method Details
-
getName
Description copied from class:AbstractViewGet the name of this view. This is used to dynamically build the view selector.- Specified by:
getNamein classAbstractView<S3Graph>- Returns:
- the name of this view
-
allocateGraphs
protected boolean allocateGraphs()Description copied from class:AbstractViewAllocate all graphs managed by this view. This is called when loading the view. Once all views are attached to the browser DOM a call to the graph'scalcBounds(int, int)is triggered throughsetBounds(int, int)to properly calculate the layout.- Specified by:
allocateGraphsin classAbstractView<S3Graph>- Returns:
trueif graphs were (re)allocated- See Also:
-
createS3Graph
-
unload
public void unload()Description copied from class:AbstractViewUnload the view. This is called when changing the module or model that implement this view. This is independent of the activation of the view.- Overrides:
unloadin classAbstractView<S3Graph>
-
reset
public void reset(boolean hard) Description copied from class:AbstractViewCalled when a module has been reset. All graphs are reset and updated if needed, unlesshardistrue.- Overrides:
resetin classAbstractView<S3Graph>- Parameters:
hard- the flag to indicate whether to do a hard reset
-
modelDidInit
public void modelDidInit()Description copied from interface:RunListenerCalled after the EvoLudo model got re-initialized.- Specified by:
modelDidInitin interfaceRunListener- Overrides:
modelDidInitin classAbstractView<S3Graph>
-
update
public void update(boolean force) Description copied from class:AbstractViewCalled when the view needs updating. This gets called when the selected view changed or new data is available from the model. Views may ignore updating requests unlessforceistrue.- Specified by:
updatein classAbstractView<S3Graph>- Parameters:
force-trueto force the update
-
setInitialState
public boolean setInitialState(double[] init) Description copied from class:AbstractViewNotifies the controller that the user requested setting a new initial configurationinit(optional implementation).- Overrides:
setInitialStatein classAbstractView<S3Graph>- Parameters:
init- the new initial configuration- Returns:
trueif the request was honoured
-
exportTypes
Description copied from class:AbstractViewReturn the list of export types that are acceptable for _all_ graphs in this view.- Overrides:
exportTypesin classAbstractView<S3Graph>- Returns:
- the list of viable export types
-