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 OverheadRelative2DView

    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.CellView
                                  org.ascape.view.vis.HostedAgentView
                                      org.ascape.view.vis.Overhead2DView
                                          org.ascape.view.vis.OverheadRelative2DView

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 OverheadRelative2DView

extends Overhead2DView

A scape view that draws a view of a 2-dimensional lattice with a relative origin.

Since:
  1.1.1
Version:
  1.1.2
Author:
  Miles Parker
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.ascape.view.vis.Overhead2DView
`drawSelectedNeighbors`

Fields inherited from class org.ascape.view.vis.HostedAgentView
`agents_fill_cells_draw_feature, agents_oval_cells_boundary_draw_feature, agents_oval_cells_desc_draw_feature, agents_oval_cells_draw_feature`

Fields inherited from class org.ascape.view.vis.CellView
`borderSize, cells_fill_draw_feature, cells_fill_draw_inset_feature`

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

Method Summary
`void` | `drawCellAt(org.eclipse.draw2d.Graphics graphics, int x, int y)` Draw cell at.
`void` | `drawCellAtIfUpdate(org.eclipse.draw2d.Graphics graphics, int x, int y)` Draw cell at if update.
`void` | `drawSelectedAgent(org.eclipse.draw2d.Graphics g, LocatedAgent a)` Draws a marker for the provided selected agent.
`Agent` | `getAgentAtPixel(int x, int y)` Returns the cell at the given pixel in this view.
`Coordinate2DDiscrete` | `getOrigin()` Gets the origin.
`void` | `scapeStarted(ScapeEvent scapeEvent)` Called immediatly after the scape is started.
`void` | `setOffset(Coordinate2DDiscrete origin)` Sets the offset.
`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.Overhead2DView
`calculateAgentSizeForViewSize, calculateViewSizeForAgentSize, drawCellAt, drawCellAtIfUpdate, drawNeighborsFor, drawSelectedAgentAt, isDrawByFeature, isDrawFarNeighbors, isDrawNetwork, isDrawSelectedNeighbors, setDrawByFeature, setDrawFarNeighbors, setDrawNetwork, setDrawSelectedNeighbors`

Methods inherited from class org.ascape.view.vis.HostedAgentView
`createFeatures, getHostedAgentColorFeature, getPrimaryAgentColorFeature, setHostedAgentColorFeature, setPrimaryAgentColorFeature`

Methods inherited from class org.ascape.view.vis.CellView
`getBorderSize, getCellColorFeature, getCellSize, setBorderSize, setCellColorFeature, setCellSize`

Methods inherited from class org.ascape.view.vis.AgentView
`addDrawFeature, 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, scapeStopped, setName, setNotifyScapeAutomatically`

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

Constructor Detail

### OverheadRelative2DView

    public OverheadRelative2DView()

  Constructs an overhead relative two-dimensional view.

### OverheadRelative2DView

    public OverheadRelative2DView(java.lang.String name)

  Constructs an overhead relative two-dimensional view.

  Parameters:
    `name` - a user relevant name for this view

Method Detail

### getOrigin

    public Coordinate2DDiscrete getOrigin()

  Gets the origin.

  Returns:
    the origin

### setOffset

    public void setOffset(Coordinate2DDiscrete origin)

  Sets the offset.

  Parameters:
    `origin` - the new offset

### scapeStarted

    public void scapeStarted(ScapeEvent scapeEvent)

  Description copied from class: `DefaultScapeListener`
  Called immediatly after the scape is started.

  Specified by:
    `scapeStarted` in interface `ScapeListener`
  Overrides:
    `scapeStarted` in class `DefaultScapeListener`
  Parameters:
    `scapeEvent` - the scape event

### drawCellAtIfUpdate

    public void drawCellAtIfUpdate(org.eclipse.draw2d.Graphics graphics,
                                   int x,
                                   int y)

  Description copied from class: `Overhead2DView`
  Draw cell at if update.

  Overrides:
    `drawCellAtIfUpdate` in class `Overhead2DView`
    `x` - the x
    `y` - the y

### drawCellAt

    public void drawCellAt(org.eclipse.draw2d.Graphics graphics,
                           int x,
                           int y)

  Description copied from class: `Overhead2DView`
  Draw cell at.

  Overrides:
    `drawCellAt` in class `Overhead2DView`
    `x` - the x
    `y` - the y

### updateScapeGraphics

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

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

  Overrides:
    `updateScapeGraphics` in class `Overhead2DView`

### getAgentAtPixel

    public Agent getAgentAtPixel(int x,
                                 int y)

  Description copied from class: `AgentView`
  Returns the cell at the given pixel in this view.

  Overrides:
    `getAgentAtPixel` in class `Overhead2DView`
  Parameters:
    `x` - the horizontal pixel location
    `y` - the vertical pixel location
  Returns:
    the agent at pixel

### drawSelectedAgent

    public void drawSelectedAgent(org.eclipse.draw2d.Graphics g,
                                  LocatedAgent a)

  Description copied from class: `AgentView`
  Draws a marker for the provided selected agent.

  Overrides:
    `drawSelectedAgent` in class `Overhead2DView`
    `a` - the agent to draw

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