|
||||||||||
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.CellView
public abstract class CellView
A generic base class for views that draw some kind of spatial view of a group of cells. Cell views have a default draw feature that draws a background for the cell, using the cell color feature.
Field Summary | |
---|---|
protected int |
borderSize
Size of border around each cell. |
DrawFeature |
cells_fill_draw_feature
Draws the provided object, assumed to be a cell, by filling it using the cell color feature. |
DrawFeature |
cells_fill_draw_inset_feature
Draws the provided object, assumed to be a cell, by filling it using the cell 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 | |
---|---|
CellView(java.lang.String name)
Constructs a CellView, adding a listener to present a settings frame when the user double-clicks on the view. |
Method Summary | |
---|---|
void |
createFeatures()
|
int |
getBorderSize()
Returns a one-dimension size in pixels of the cell border. |
ColorFeature |
getCellColorFeature()
Returns the color feature that will be used for determining cell color. |
int |
getCellSize()
Returns a one-dimension size of pixels used to represent each cell. |
ColorFeature |
getPrimaryAgentColorFeature()
Returns the color feature that will be used for determining cell color. |
void |
setBorderSize(int borderSize)
Sets the border size in pixels. |
void |
setCellColorFeature(ColorFeature agentColorFeature)
Set the color feature that will be used for determining cell color. |
void |
setCellSize(int cellSize)
Sets the number of pixels used to represent each cell. |
void |
setPrimaryAgentColorFeature(ColorFeature cellColorFeature)
Set the color feature that will be used for determining cell color. |
Methods inherited from class org.ascape.view.vis.AgentView |
---|
addDrawFeature, calculateAgentSizeForViewSize, calculateViewSizeForAgentSize, 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 |
Field Detail |
---|
public final DrawFeature cells_fill_draw_feature
public final DrawFeature cells_fill_draw_inset_feature
protected int borderSize
Constructor Detail |
---|
public CellView(java.lang.String name)
Method Detail |
---|
public void createFeatures()
createFeatures
in class AgentView
public ColorFeature getPrimaryAgentColorFeature()
public void setPrimaryAgentColorFeature(ColorFeature cellColorFeature)
cellColorFeature
- the color feature, whose object is assumed to be a cell populating this latticepublic ColorFeature getCellColorFeature()
public void setCellColorFeature(ColorFeature agentColorFeature)
agentColorFeature
- the color feature, whose object is assumed to be a cell populating this latticepublic int getBorderSize()
public void setBorderSize(int borderSize)
borderSize
- number of pixelspublic int getCellSize()
public void setCellSize(int cellSize)
cellSize
- number of pixels per edge
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |