Dimensioned, Drawable, Measurablepublic class IntegerRaster extends MeasuredImage implements Dimensioned
| Modifier and Type | Field | Description |
|---|---|---|
protected double |
scaleFactor |
|
static int |
WHITE |
| Constructor | Description |
|---|---|
IntegerRaster(int _nrow,
int _ncol) |
Constructs IntegerRaster with the given size.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g) |
Draws the image and the grid.
|
int |
getCell(int _row,
int _col) |
Gets a lattice cell value.
|
java.awt.Dimension |
getInterior(DrawingPanel panel) |
Gets the dimension of the lattice in pixel units.
|
void |
setBlock(int row_offset,
int col_offset,
int[][] val) |
Sets a block of lattice cells to new values.
|
void |
setCell(int _row,
int _col,
int val) |
Sets a lattice cell to a new value.
|
void |
setCol(int row_offset,
int col,
int[] val) |
Sets a column of lattice cells to new values.
|
void |
setRow(int row,
int col_offset,
int[] val) |
Sets a row of lattice cells to new values.
|
getImage, getXMax, getXMin, getYMax, getYMin, isMeasured, setImage, setMinMax, setVisible, setXMax, setXMin, setYMax, setYMinpublic IntegerRaster(int _nrow,
int _ncol)
_nrow - the number of rows_ncol - the number of columnspublic void setBlock(int row_offset,
int col_offset,
int[][] val)
row_offset - col_offset - val - public void setRow(int row,
int col_offset,
int[] val)
row - col_offset - val - public void setCol(int row_offset,
int col,
int[] val)
row_offset - col - val - public void setCell(int _row,
int _col,
int val)
public int getCell(int _row,
int _col)
public java.awt.Dimension getInterior(DrawingPanel panel)
getInterior in interface Dimensionedpanel - public void draw(DrawingPanel panel, java.awt.Graphics g)
draw in interface Drawabledraw in class MeasuredImagepanel - g -