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 GraphicsView

    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

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

Direct Known Subclasses:
  AgentView, SimplexView

    public class GraphicsView

extends EditPartScapeView
implements org.eclipse.jface.viewers.ISelectionProvider

See Also:
  Serialized Form

Field Summary
`protected int` | `agentSize` Size of each individual cell, typically in pixels.
`protected org.eclipse.swt.graphics.Image` | `image`
`protected org.eclipse.draw2d.IFigure` | `imageFigure`
`protected org.eclipse.swt.graphics.GC` | `imageGC`
`protected org.eclipse.draw2d.Graphics` | `imageGraphics`

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

Constructor Summary
`GraphicsView(java.lang.String name)`

Method Summary
`void` | `addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)`
`org.eclipse.gef.EditPart` | `createEditPart(org.eclipse.gef.EditPart context, java.lang.Object model)`
`void` | `createFeatures()`
`void` | `createImage()`
`void` | `createImageFigure()`
`protected void` | `drawSelectedAgent(org.eclipse.draw2d.Graphics graphics, LocatedAgent a)`
`Agent` | `getAgentAtPixel(int x, int y)`
`org.eclipse.swt.graphics.Image` | `getImage()`
`org.eclipse.draw2d.IFigure` | `getImageFigure()`
`org.eclipse.draw2d.geometry.Dimension` | `getMinimumSizeWithin(org.eclipse.draw2d.geometry.Dimension d)`
`org.eclipse.draw2d.geometry.Dimension` | `getPreferredSizeWithin(org.eclipse.draw2d.geometry.Dimension d)`
`org.eclipse.jface.viewers.ISelection` | `getSelection()`
`org.eclipse.draw2d.geometry.Dimension` | `getSize()`
`void` | `refresh()`
`void` | `removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)`
`void` | `scapeAdded(ScapeEvent scapeEvent)` Add the view to the scape, registering it as a listener, and ensuring that it hasn't been added to any other scapes.
`void` | `scapeIterated(ScapeEvent scapeEvent)` Called immediatly after scape is iterated.
`void` | `setSelection(org.eclipse.jface.viewers.ISelection selection)`
`protected void` | `updateScapeGraphics(org.eclipse.draw2d.Graphics graphics)`

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`

Field Detail

### image

    protected org.eclipse.swt.graphics.Image image

### imageFigure

    protected org.eclipse.draw2d.IFigure imageFigure

### imageGraphics

    protected org.eclipse.draw2d.Graphics imageGraphics

### agentSize

    protected int agentSize

  Size of each individual cell, typically in pixels. 6 by default.

### imageGC

    protected org.eclipse.swt.graphics.GC imageGC

Constructor Detail

### GraphicsView

    public GraphicsView(java.lang.String name)

Method Detail

### updateScapeGraphics

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

### createEditPart

    public org.eclipse.gef.EditPart createEditPart(org.eclipse.gef.EditPart context,
                                                   java.lang.Object model)

  Specified by:
    `createEditPart` in interface `org.eclipse.gef.EditPartFactory`

### createImageFigure

    public void createImageFigure()

### getAgentAtPixel

    public Agent getAgentAtPixel(int x,
                                 int y)

### createImage

    public void createImage()

### refresh

    public void refresh()

### drawSelectedAgent

    protected void drawSelectedAgent(org.eclipse.draw2d.Graphics graphics,
                                     LocatedAgent a)

### scapeAdded

    public void scapeAdded(ScapeEvent scapeEvent)
                    throws java.util.TooManyListenersException

  Description copied from class: `DefaultScapeListener`
  Add the view to the scape, registering it as a listener, and ensuring that it hasn't been added to any other scapes.

  Specified by:
    `scapeAdded` in interface `ScapeListener`
  Overrides:
    `scapeAdded` in class `ModelScapeView`
  Parameters:
    `scapeEvent` - the event for this scape to make this view the observer of
  Throws:
    `java.util.TooManyListenersException` - the too many listeners exception

### scapeIterated

    public void scapeIterated(ScapeEvent scapeEvent)

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

  Specified by:
    `scapeIterated` in interface `ScapeListener`
  Overrides:
    `scapeIterated` in class `DefaultScapeListener`
  Parameters:
    `scapeEvent` -
  See Also:
    `DefaultScapeListener.scapeIterated(org.ascape.model.event.ScapeEvent)`

### createFeatures

    public void createFeatures()

### getSize

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

### getPreferredSizeWithin

    public org.eclipse.draw2d.geometry.Dimension getPreferredSizeWithin(org.eclipse.draw2d.geometry.Dimension d)

### getMinimumSizeWithin

    public org.eclipse.draw2d.geometry.Dimension getMinimumSizeWithin(org.eclipse.draw2d.geometry.Dimension d)

### getImage

    public org.eclipse.swt.graphics.Image getImage()

### getImageFigure

    public org.eclipse.draw2d.IFigure getImageFigure()

  Returns:
    the imageFigure

### addSelectionChangedListener

    public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)

  Specified by:
    `addSelectionChangedListener` in interface `org.eclipse.jface.viewers.ISelectionProvider`
  Parameters:
    `listener` -
  See Also:
    `ISelectionProvider.addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)`

### getSelection

    public org.eclipse.jface.viewers.ISelection getSelection()

  Specified by:
    `getSelection` in interface `org.eclipse.jface.viewers.ISelectionProvider`
  Returns:
  See Also:
    `ISelectionProvider.getSelection()`

### removeSelectionChangedListener

    public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)

  Specified by:
    `removeSelectionChangedListener` in interface `org.eclipse.jface.viewers.ISelectionProvider`
  Parameters:
    `listener` -
  See Also:
    `ISelectionProvider.removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)`

### setSelection

    public void setSelection(org.eclipse.jface.viewers.ISelection selection)

  Specified by:
    `setSelection` in interface `org.eclipse.jface.viewers.ISelectionProvider`
  Parameters:
    `selection` -
  See Also:
    `ISelectionProvider.setSelection(org.eclipse.jface.viewers.ISelection)`

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