## org.ascape.view.vis
Class Plot2DView

    java.lang.Object
      org.ascape.model.event.DefaultScapeListener
          org.eclipse.amp.escape.ascape.view.ModelScapeView
              org.eclipse.amp.escape.ascape.view.EditPartFactoryScapeView
                  org.eclipse.amp.escape.ascape.view.EditPartScapeView
                      org.ascape.view.vis.GraphicsView
                          org.ascape.view.vis.AgentView
                              org.ascape.view.vis.Plot2DView

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.util.EventListener, java.util.Observer, ScapeListener, HasName, IDrawSelection, org.eclipse.core.runtime.IAdaptable, org.eclipse.gef.EditPartFactory, org.eclipse.jface.viewers.ISelectionProvider

    public class Plot2DView

extends AgentView

A scape view that represents two parameters of agent state in a two-dimensional plot.

Since:
  1.5
Version:
  1.5
Author:
  Miles Parker
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.ascape.view.vis.AgentView
`agentColorFeature, drawSelection`

Fields inherited from class org.ascape.view.vis.GraphicsView
`agentSize, image, imageFigure, imageGC, imageGraphics`

Fields inherited from class org.ascape.model.event.DefaultScapeListener
`listeningToScape, scape`

Constructor Summary
`Plot2DView()` Constructs an overhead two-dimensional view.

Method Summary
`ColorFeature` `getColorFeature()` Returns the color feature responsible for interpreting the agent's color.
`org.eclipse.draw2d.geometry.Dimension` `getPreferredSize()` Returns the preferred size of this view, which is the size of the lattice times this views agentSize.
`UnitIntervalDataPoint` `getXDataPoint()` Returns the data point responsible for interpreting each agent's x position.
`UnitIntervalDataPoint` `getYDataPoint()` Returns the data point responsible for interpreting each agent's y position.
`void` `setColorFeature(ColorFeature colorFeature)` Sets the data point responsible for interpreting the agent's color.
`void` `setXDataPoint(UnitIntervalDataPoint xDataPoint)` Sets the data point responsible for interpreting each agent's x position.
`void` `setYDataPoint(UnitIntervalDataPoint yDataPoint)` Sets the data point responsible for interpreting each agent's y position.
`void` `updateScapeGraphics(org.eclipse.draw2d.Graphics graphics)` On notification of a scape update, draws the actual overhead view.

Methods inherited from class org.ascape.view.vis.AgentView
`addDrawFeature, calculateAgentSizeForViewSize, calculateViewSizeForAgentSize, createFeatures, drawSelectedAgent, getAgentAtPixel, getAgentColorFeature, getAgentSize, getDrawFeatures, getDrawFeaturesObservable, getDrawSelection, getMiniumSizeWithin, getPreferredSizeWithin, removeDrawFeature, setAgentColorFeature, setAgentSize, update`

Methods inherited from class org.ascape.view.vis.GraphicsView
`addSelectionChangedListener, createEditPart, createImage, createImageFigure, getImage, getImageFigure, getMinimumSizeWithin, getSelection, getSize, refresh, removeSelectionChangedListener, scapeAdded, scapeIterated, setSelection`

Methods inherited from class org.eclipse.amp.escape.ascape.view.EditPartScapeView
`createInput`

Methods inherited from class org.eclipse.amp.escape.ascape.view.EditPartFactoryScapeView
`getAdapter, getRootPart`

Methods inherited from class org.eclipse.amp.escape.ascape.view.ModelScapeView
`getModel, getName, toString`

Methods inherited from class org.ascape.model.event.DefaultScapeListener
`clone, environmentQuiting, getScape, isGraphic, isLifeOfScape, isNotifyScapeAutomatically, notifyScapeUpdated, scapeClosing, scapeDeserialized, scapeInitialized, scapeNotification, scapeRemoved, scapeSetup, scapeStarted, scapeStopped, setName, setNotifyScapeAutomatically`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Plot2DView

    public Plot2DView()

  Constructs an overhead two-dimensional view.

Method Detail

### getPreferredSize

    public org.eclipse.draw2d.geometry.Dimension getPreferredSize()

  Returns the preferred size of this view, which is the size of the lattice times this views agentSize.

  Returns:
    the preferred size

### updateScapeGraphics

    public void updateScapeGraphics(org.eclipse.draw2d.Graphics graphics)

  On notification of a scape update, draws the actual overhead view.

  Overrides:
    `updateScapeGraphics` in class `GraphicsView`

### getXDataPoint

    public UnitIntervalDataPoint getXDataPoint()

  Returns the data point responsible for interpreting each agent's x position.

  Returns:
    the x data point

### setXDataPoint

    public void setXDataPoint(UnitIntervalDataPoint xDataPoint)

  Sets the data point responsible for interpreting each agent's x position.

  Parameters:
    `xDataPoint` - the data point to use

### getYDataPoint

    public UnitIntervalDataPoint getYDataPoint()

  Returns the data point responsible for interpreting each agent's y position.

  Returns:
    the y data point

### setYDataPoint

    public void setYDataPoint(UnitIntervalDataPoint yDataPoint)

  Sets the data point responsible for interpreting each agent's y position.

  Parameters:
    `yDataPoint` - the data point to use

### getColorFeature

    public ColorFeature getColorFeature()

  Returns the color feature responsible for interpreting the agent's color.

  Returns:
    the color feature

### setColorFeature

    public void setColorFeature(ColorFeature colorFeature)

  Sets the data point responsible for interpreting the agent's color. Note: if you use a color feature fixed, the view can optimize for it.

  Parameters:
    `colorFeature` - the color feature to use.