|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A graphic panel in which to display 2D grids.
| Field Summary | |
static int |
GPSHAPE_CIRCLE
|
static int |
GPSHAPE_HEXAGON
|
static int |
GPSHAPE_NOSHAPE
|
static int |
GPSHAPE_OCTOGON
|
static int |
GPSHAPE_PENTAGON
|
static int |
GPSHAPE_RECTANGLE
|
static int |
GPSHAPE_STAR
|
static int |
GPSHAPE_TRIANGLE
|
static int |
GPSHAPE_TURTLE
|
| Method Summary | |
int |
getCellSize()
Get the size of a grid cell. |
java.awt.Color |
getColor(IXholon xhNode)
Get the color that this xholon should currently be displayed as. |
java.awt.Graphics |
getGraphics()
This is a method inherited by GridPanel from JPanel. |
IXholon |
getGridOwner()
Get grid owner. |
int |
getNeighType()
Get the neighborhood type, as defined in IGrid. |
int |
getNumCols()
Get the number of columns in the grid. |
int |
getNumRows()
Get the number of rows in the grid. |
int |
getShape(IXholon xhNode)
Get the shape that should be used to represent this xholon. |
boolean |
getUseShapes()
Get whether or not to use shapes to draw objects. |
void |
initGridPanel(IXholon gridOwner)
Initialize the GridPanel. |
void |
paintComponent(java.awt.Graphics g)
|
void |
setCellSize(int cellSize)
Set the size of a grid cell. |
void |
setNeighType(int neighType)
Set the neighborhood type, as defined in IGrid. |
void |
setUseShapes(boolean useShapes)
Set whether or not to use shapes to draw objects. |
| Field Detail |
public static final int GPSHAPE_NOSHAPE
public static final int GPSHAPE_CIRCLE
public static final int GPSHAPE_TRIANGLE
public static final int GPSHAPE_RECTANGLE
public static final int GPSHAPE_PENTAGON
public static final int GPSHAPE_HEXAGON
public static final int GPSHAPE_OCTOGON
public static final int GPSHAPE_STAR
public static final int GPSHAPE_TURTLE
| Method Detail |
public IXholon getGridOwner()
public void initGridPanel(IXholon gridOwner)
gridOwner - Owner of the grid.public int getNumRows()
public int getNumCols()
public int getCellSize()
public void setCellSize(int cellSize)
cellSize - The size in pixels.public boolean getUseShapes()
public void setUseShapes(boolean useShapes)
useShapes - true or falsepublic int getNeighType()
public void setNeighType(int neighType)
neighType - The neighborhood type.public void paintComponent(java.awt.Graphics g)
public java.awt.Graphics getGraphics()
public java.awt.Color getColor(IXholon xhNode)
xhNode - An instance of Xholon.
public int getShape(IXholon xhNode)
xhNode - An instance of Xholon.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||