Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ascape.view.vis
Class SimplexView

    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.SimplexView

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

    public class SimplexView

extends GraphicsView

A scape view that represents some aspect of agent state in a simplex diagram.

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

Nested Class Summary
`class` | `SimplexView.ConcreteSimplexFeature` The Class ConcreteSimplexFeature.

Field Summary

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
`SimplexView()` Constructs an overhead two-dimensional view.
`SimplexView(java.lang.String name)` Constructs an overhead two-dimensional view.

Method Summary
`org.eclipse.draw2d.geometry.Dimension` | `getPreferredSize()` Returns the preferred size of this view, which is the size of the lattice times this views agentSize.
`SimplexFeature` | `getSimplexFeature()` Returns the color feature this object is using to interpret the object's color.
`int` | `getXPosition(SimplexFeature f, Agent a)` Gets the x position.
`int` | `getYPosition(SimplexFeature f, Agent a)` Gets the y position.
`void` | `setCentroidTradeoff(float t)` Sets the centroid tradeoff.
`void` | `setSimplexFeature(SimplexFeature simplexFeature)` Sets the color feature this object uses to interpret the object's color.
`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.GraphicsView
`addSelectionChangedListener, createEditPart, createFeatures, createImage, createImageFigure, drawSelectedAgent, getAgentAtPixel, getImage, getImageFigure, getMinimumSizeWithin, getPreferredSizeWithin, 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

### SimplexView

    public SimplexView(java.lang.String name)

  Constructs an overhead two-dimensional view.

### SimplexView

    public SimplexView()

  Constructs an overhead two-dimensional view.

  Parameters:
    `data.name` - a user relevant name for this view
    `centroidTradeOff` - the centroid trade off

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

### setCentroidTradeoff

    public void setCentroidTradeoff(float t)

  Sets the centroid tradeoff.

  Parameters:
    `t` - the new centroid tradeoff

### getXPosition

    public int getXPosition(SimplexFeature f,
                            Agent a)

  Gets the x position.

  Parameters:
    `f` - the f
    `a` - the a
  Returns:
    the x position

### getYPosition

    public int getYPosition(SimplexFeature f,
                            Agent a)

  Gets the y position.

  Parameters:
    `f` - the f
    `a` - the a
  Returns:
    the y position

### 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`

### getSimplexFeature

    public SimplexFeature getSimplexFeature()

  Returns the color feature this object is using to interpret the object's color.

  Returns:
    the simplex feature

### setSimplexFeature

    public void setSimplexFeature(SimplexFeature simplexFeature)

  Sets the color feature this object uses to interpret the object's color.

  Parameters:
    `simplexFeature` - the feature to use for coloring

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD