|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.MeasuredImage
public class MeasuredImage
MeasuredImage contains an image and a scale in world units. When a MeasuredImage is added to a drawing panel, the image will scale itself to the panel's world units.
Field Summary | |
---|---|
protected java.awt.image.BufferedImage |
image
|
protected boolean |
visible
|
protected double |
xmax
|
protected double |
xmin
|
protected double |
ymax
|
protected double |
ymin
|
Constructor Summary | |
---|---|
MeasuredImage()
Constructs a MeasuredImage with a pixel scale. |
|
MeasuredImage(java.awt.image.BufferedImage image)
Constructs a MeasuredImage with a pixel scale. |
|
MeasuredImage(java.awt.image.BufferedImage _image,
double _xmin,
double _xmax,
double _ymin,
double _ymax)
Constructs a MeasuredImage with the given scale. |
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the image on the panel. |
double |
getXMax()
Gets the maximum x needed to draw this object. |
double |
getXMin()
Gets the minimum x needed to draw this object. |
double |
getYMax()
Gets the maximum y needed to draw this object. |
double |
getYMin()
Gets the minimum y needed to draw this object. |
boolean |
isMeasured()
Determines if information is available to set min/max values. |
void |
setImage(java.awt.image.BufferedImage _image)
|
void |
setMinMax(double _xmin,
double _xmax,
double _ymin,
double _ymax)
|
void |
setVisible(boolean isVisible)
Sets the visibility of the lattice. |
void |
setXMax(double _xmax)
|
void |
setXMin(double _xmin)
|
void |
setYMax(double _ymax)
|
void |
setYMin(double _ymin)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.image.BufferedImage image
protected double xmin
protected double xmax
protected double ymin
protected double ymax
protected boolean visible
Constructor Detail |
---|
public MeasuredImage()
public MeasuredImage(java.awt.image.BufferedImage image)
image
- the imagepublic MeasuredImage(java.awt.image.BufferedImage _image, double _xmin, double _xmax, double _ymin, double _ymax)
_image
- _xmin
- _xmax
- _ymin
- _ymax
- Method Detail |
---|
public void setImage(java.awt.image.BufferedImage _image)
public void setVisible(boolean isVisible)
isVisible
- public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
panel
- g
- public boolean isMeasured()
Measurable
isMeasured
in interface Measurable
public double getXMin()
Measurable
getXMin
in interface Measurable
public double getXMax()
Measurable
getXMax
in interface Measurable
public double getYMin()
Measurable
getYMin
in interface Measurable
public double getYMax()
Measurable
getYMax
in interface Measurable
public void setXMin(double _xmin)
public void setXMax(double _xmax)
public void setYMin(double _ymin)
public void setYMax(double _ymax)
public void setMinMax(double _xmin, double _xmax, double _ymin, double _ymax)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |