|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.Overhead2DContinuousView
public class Overhead2DContinuousView
The Class Overhead2DContinuousView.
| Field Summary | |
|---|---|
DrawFeature |
agents_fill_draw_feature
Draws the provided object, assumed to be a agent, by filling it using the agent color feature. |
DrawFeature |
agents_fill_draw_inset_feature
Draws the provided object, assumed to be a agent, by filling it using the agent color 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 | |
|---|---|
Overhead2DContinuousView()
Constructs a BaseAgentView, adding a listener to present a settings frame when the user double-clicks on the view. |
|
Overhead2DContinuousView(java.lang.String name)
Instantiates a new overhead2 D continuous view. |
|
| Method Summary | |
|---|---|
void |
createFeatures()
|
void |
drawAgentAt(org.eclipse.draw2d.Graphics graphics,
LocatedAgent agent,
int x,
int y,
DrawFeature feature)
Draw agent at. |
void |
drawAgentAtIfUpdate(org.eclipse.draw2d.Graphics graphics,
LocatedAgent agent,
int x,
int y)
Draw agent at if update. |
void |
drawSelectedAgent(org.eclipse.draw2d.Graphics g,
LocatedAgent a)
Set the image feature that will be used for determining agent color. |
Agent |
getAgentAtPixel(int pixelX,
int pixelY)
Returns the agent at the given pixel in this view. |
ColorFeature |
getAgentColorFeature()
Returns the color feature that will be used for determining agent color. |
org.eclipse.swt.graphics.Color |
getBackgroundColor()
|
Coordinate |
getCoordinateAtPixel(int pixelX,
int pixelY)
Returns the agent at the given pixel in this view. |
int |
getNominalAgentSize()
Gets the nominal agent size. |
org.eclipse.draw2d.geometry.Dimension |
getPreferredSize()
|
org.eclipse.draw2d.geometry.Dimension |
getPreferredSizeWithin(org.eclipse.draw2d.geometry.Dimension d)
|
ColorFeature |
getPrimaryAgentColorFeature()
Returns the color feature that will be used for determining agent color. |
boolean |
isDrawSelectedNeighbors()
Checks if is draw selected neighbors. |
void |
setAgentColorFeature(ColorFeature agentColorFeature)
Set the color feature that will be used for determining agent color. |
void |
setBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor)
|
void |
setDrawSelectedNeighbors(boolean drawSelectedNeighbors)
Sets the draw selected neighbors. |
void |
setNominalAgentSize(int nominalAgentSize)
Sets the nominal agent size. |
void |
setPreferredSize(org.eclipse.draw2d.geometry.Dimension preferredSize)
|
void |
setPrimaryAgentColorFeature(ColorFeature agentColorFeature)
Set the color feature that will be used for determining agent 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.AgentView |
|---|
addDrawFeature, calculateAgentSizeForViewSize, calculateViewSizeForAgentSize, getAgentSize, getDrawFeatures, getDrawFeaturesObservable, getDrawSelection, getMiniumSizeWithin, removeDrawFeature, 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, scapeStarted, scapeStopped, setName, setNotifyScapeAutomatically |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final DrawFeature agents_fill_draw_feature
public final DrawFeature agents_fill_draw_inset_feature
| Constructor Detail |
|---|
public Overhead2DContinuousView()
public Overhead2DContinuousView(java.lang.String name)
name - the name| Method Detail |
|---|
public void createFeatures()
createFeatures in class AgentViewpublic void updateScapeGraphics(org.eclipse.draw2d.Graphics graphics)
updateScapeGraphics in class GraphicsView
public void drawAgentAt(org.eclipse.draw2d.Graphics graphics,
LocatedAgent agent,
int x,
int y,
DrawFeature feature)
agent - the agentx - the xy - the yfeature - the feature
public void drawAgentAtIfUpdate(org.eclipse.draw2d.Graphics graphics,
LocatedAgent agent,
int x,
int y)
agent - the agentx - the xy - the y
public Coordinate getCoordinateAtPixel(int pixelX,
int pixelY)
pixelX - the horizontal pixel locationpixelY - the vertical pixel location
public Agent getAgentAtPixel(int pixelX,
int pixelY)
getAgentAtPixel in class AgentViewpixelX - the horizontal pixel locationpixelY - the vertical pixel location
public org.eclipse.draw2d.geometry.Dimension getPreferredSizeWithin(org.eclipse.draw2d.geometry.Dimension d)
getPreferredSizeWithin in class AgentViewpublic org.eclipse.draw2d.geometry.Dimension getPreferredSize()
public void setPreferredSize(org.eclipse.draw2d.geometry.Dimension preferredSize)
public int getNominalAgentSize()
public void setNominalAgentSize(int nominalAgentSize)
nominalAgentSize - the new nominal agent sizepublic ColorFeature getPrimaryAgentColorFeature()
public void setPrimaryAgentColorFeature(ColorFeature agentColorFeature)
agentColorFeature - the color feature, whose object is assumed to be a agent populating this latticepublic ColorFeature getAgentColorFeature()
getAgentColorFeature in class AgentViewpublic void setAgentColorFeature(ColorFeature agentColorFeature)
setAgentColorFeature in class AgentViewagentColorFeature - the color feature, whose object is assumed to be a agent populating this lattice
public void drawSelectedAgent(org.eclipse.draw2d.Graphics g,
LocatedAgent a)
drawSelectedAgent in class AgentViewagentImageFeature - the color feature, whose object is assumed to be a agent populating this latticepublic boolean isDrawSelectedNeighbors()
public void setDrawSelectedNeighbors(boolean drawSelectedNeighbors)
drawSelectedNeighbors - the new draw selected neighborspublic org.eclipse.swt.graphics.Color getBackgroundColor()
public void setBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||