|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.display.MeasuredImage
org.opensourcephysics.display2d.IntegerRaster
public class IntegerRaster
A IntegerRaster contains an array of integers where each integer representents an image pixel. Because the image created by a IntegerRaster cannot be resized, the image dimensions are the same as the dimensions of the integer array.
| Field Summary | |
|---|---|
protected double |
scaleFactor
|
static int |
WHITE
|
| Fields inherited from class org.opensourcephysics.display.MeasuredImage |
|---|
image, xmax, xmin, ymax, ymin |
| Constructor Summary | |
|---|---|
IntegerRaster(int _nrow,
int _ncol)
Constructs IntegerRaster with the given size. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.opensourcephysics.display.MeasuredImage |
|---|
getXMax, getXMin, getYMax, getYMin, isMeasured, setImage, setMinMax, setVisible, setXMax, setXMin, setYMax, setYMin |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int WHITE
protected double scaleFactor
| Constructor Detail |
|---|
public IntegerRaster(int _nrow,
int _ncol)
_nrow - the number of rows_ncol - the number of columns| Method Detail |
|---|
public 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 -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||