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 StretchyView

    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

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:
  FixedStretchyView, MovingStretchyView

    public class StretchyView

extends CellView

A view of a scape vector. Currently unmaintained, but should work.

Since:
  1.0
Version:
  1.0
Author:
  Miles Parker
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
`StretchyView(java.lang.String name)` Instantiates a new stretchy view.
`StretchyView(java.lang.String name, int maxAgents, int maxDisplayAgents)` Instantiates a new stretchy view.

Method Summary
`static org.eclipse.swt.graphics.Color` | `adjustBrightness(org.eclipse.swt.graphics.Color color, float factor)`
`int` | `calculateAgentSizeForViewSize(org.eclipse.draw2d.geometry.Dimension d)` Calculate agent size for view size.
`org.eclipse.draw2d.geometry.Dimension` | `calculateViewSizeForAgentSize(org.eclipse.draw2d.geometry.Dimension availableSize, int cellSize)` Calculate view size for agent size.
`void` | `drawAgentAt(org.eclipse.draw2d.Graphics graphics, Agent agent, int position)`
`void` | `setBarValueAttribute1(java.lang.String barAttribute1)` Sets the bar value attribute1.
`void` | `setBarValueAttribute2(java.lang.String barAttribute2)` Sets the bar value attribute2.

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

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

### StretchyView

    public StretchyView(java.lang.String name)

  Instantiates a new stretchy view.

### StretchyView

    public StretchyView(java.lang.String name,
                        int maxAgents,
                        int maxDisplayAgents)

  Instantiates a new stretchy view.

  Parameters:
    `maxAgents` - the max agents
    `maxDisplayAgents` - the max display agents

Method Detail

### calculateViewSizeForAgentSize

    public org.eclipse.draw2d.geometry.Dimension calculateViewSizeForAgentSize(org.eclipse.draw2d.geometry.Dimension availableSize,
                                                                               int cellSize)

  Description copied from class: `AgentView`
  Calculate view size for agent size.

  Overrides:
    `calculateViewSizeForAgentSize` in class `AgentView`
  Parameters:
    `availableSize` - TODO
    `cellSize` - the agent size
  Returns:
    the dimension

### calculateAgentSizeForViewSize

    public int calculateAgentSizeForViewSize(org.eclipse.draw2d.geometry.Dimension d)

  Description copied from class: `AgentView`
  Calculate agent size for view size.

  Overrides:
    `calculateAgentSizeForViewSize` in class `AgentView`
  Parameters:
    `d` - the d
  Returns:
    the int

### setBarValueAttribute1

    public void setBarValueAttribute1(java.lang.String barAttribute1)

  Sets the bar value attribute1.

  Parameters:
    `barAttribute1` - the new bar value attribute1

### setBarValueAttribute2

    public void setBarValueAttribute2(java.lang.String barAttribute2)

  Sets the bar value attribute2.

  Parameters:
    `barAttribute2` - the new bar value attribute2

### drawAgentAt

    public void drawAgentAt(org.eclipse.draw2d.Graphics graphics,
                            Agent agent,
                            int position)

### adjustBrightness

    public static org.eclipse.swt.graphics.Color adjustBrightness(org.eclipse.swt.graphics.Color color,
                                                                  float factor)

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