## org.ascape.view.vis
Class FixedStretchyView

    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.StretchyView
                                      org.ascape.view.vis.FixedStretchyView

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

Direct Known Subclasses:
  FixedAgentStretchyView

    public class FixedStretchyView

extends StretchyView

A class providing a view of an scape vector.

Since:
  1.0
Version:
  1.9
See Also:
  Serialized Form

Field Summary

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
`FixedStretchyView()`
`FixedStretchyView(java.lang.String name, int maxElements, int maxDisplayElements)` Instantiates a new fixed stretchy view.

Method Summary
`void` `drawSelectedAgent(org.eclipse.draw2d.Graphics graphics, 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.
`boolean` `isRemoveGaps()` Should gaps be removed? Default is false.
`void` `scapeInitialized(ScapeEvent scapeEvent)` Called immediatly after the scape is initialized.
`void` `setRemoveGaps(boolean removeGaps)` Should gaps be removed from model as firms are removed? (New agents then appear to the right.)
`void` `updateScapeGraphics(org.eclipse.draw2d.Graphics graphics)`

Methods inherited from class org.ascape.view.vis.StretchyView
`adjustBrightness, calculateAgentSizeForViewSize, calculateViewSizeForAgentSize, drawAgentAt, setBarValueAttribute1, setBarValueAttribute2`

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

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, 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

### FixedStretchyView

    public FixedStretchyView(java.lang.String name,
                             int maxElements,
                             int maxDisplayElements)

  Instantiates a new fixed stretchy view.

  Parameters:
    `maxElements` - the max elements
    `maxDisplayElements` - the max display elements

### FixedStretchyView

    public FixedStretchyView()

Method Detail

### scapeInitialized

    public void scapeInitialized(ScapeEvent scapeEvent)

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

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

### updateScapeGraphics

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

  Overrides:
    `updateScapeGraphics` in class `GraphicsView`

### 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 `AgentView`
  Parameters:
    `x` - the horizontal pixel location
    `y` - the vertical pixel location
  Returns:
    the agent at pixel

### drawSelectedAgent

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

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

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

### isRemoveGaps

    public boolean isRemoveGaps()

  Should gaps be removed? Default is false.

  Returns:

### setRemoveGaps

    public void setRemoveGaps(boolean removeGaps)

  Should gaps be removed from model as firms are removed? (New agents then appear to the right.)

  Parameters:
    `removeGaps` -