|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.colos.ejs.library.control.drawables.Plot2DWrapper
public class Plot2DWrapper
A wrapper for a plot2D that changes in run-time
Field Summary |
---|
Fields inherited from interface org.opensourcephysics.display2d.Plot2D |
---|
CONTOUR_PLOT, GRID_PLOT, INTERPOLATED_PLOT, SURFACE_PLOT |
Constructor Summary | |
---|---|
Plot2DWrapper()
|
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws a representation of an object in a drawing panel. |
double |
getCeiling()
Gets the ceiling for scaling the z data. |
double |
getFloor()
Gets the floor for scaling the z data. |
GridData |
getGridData()
Gets the GridData object. |
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. |
double |
indexToX(int i)
Gets the x coordinate for the given index. |
double |
indexToY(int i)
Gets the y coordinate for the given index. |
boolean |
isAutoscaleZ()
Gets the autoscale flag for z. |
boolean |
isMeasured()
Determines if information is available to set min/max values. |
boolean |
isSymmetricZ()
Gets the symmetric z flag. |
void |
setAll(java.lang.Object val)
Sets the data to new values. |
void |
setAll(java.lang.Object obj,
double xmin,
double xmax,
double ymin,
double ymax)
Sets the values and the scale. |
void |
setAutoscaleZ(boolean isAutoscale,
double floor,
double ceil)
Sets the autoscale flag and the floor and ceiling values for the colors. |
void |
setColorPalette(java.awt.Color[] colors)
Sets the colors that will be used between the floor and ceiling values. |
void |
setExpandedZ(boolean expanded,
double factor)
Expands the z scale so as to enhance values close to zero. |
void |
setFloorCeilColor(java.awt.Color floorColor,
java.awt.Color ceilColor)
Sets the floor and ceiling colors. |
void |
setGridData(GridData _griddata)
Sets the data storage to the given value. |
void |
setGridLineColor(java.awt.Color c)
Sets the color for grid line boundaries |
void |
setIndexes(int[] indexes)
Sets the indexes for the data components that will be plotted. |
void |
setPaletteType(int type)
Determines the palette type that will be used. |
void |
setShowGridLines(boolean showGrid)
Outlines the data grid's boundaries. |
void |
setSymmetricZ(boolean symmetric)
Forces the z-scale to be symmetric about zero. |
void |
setVisible(boolean isVisible)
Sets the visibility of the plot. |
javax.swing.JFrame |
showLegend()
Shows how values map to colors. |
void |
update()
Updates this object's state using new data values. |
int |
xToIndex(double x)
Gets closest index from the given x world coordinate. |
int |
yToIndex(double y)
Gets closest index from the given y world coordinate. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Plot2DWrapper()
Method Detail |
---|
public void setAll(java.lang.Object val)
Plot2D
setAll
in interface Plot2D
val
- an array of new valuespublic void setAll(java.lang.Object obj, double xmin, double xmax, double ymin, double ymax)
Plot2D
setAll
in interface Plot2D
obj
- array of new valuesxmin
- doublexmax
- doubleymin
- doubleymax
- doublepublic void setGridData(GridData _griddata)
Plot2D
setGridData
in interface Plot2D
public GridData getGridData()
Plot2D
getGridData
in interface Plot2D
public double indexToX(int i)
Plot2D
indexToX
in interface Plot2D
i
- int
public double indexToY(int i)
Plot2D
indexToY
in interface Plot2D
i
- int
public int xToIndex(double x)
Plot2D
xToIndex
in interface Plot2D
x
- double the coordinate
public int yToIndex(double y)
Plot2D
yToIndex
in interface Plot2D
y
- double the coordinate
public boolean isAutoscaleZ()
Plot2D
isAutoscaleZ
in interface Plot2D
public double getFloor()
Plot2D
getFloor
in interface Plot2D
public double getCeiling()
Plot2D
getCeiling
in interface Plot2D
public void setAutoscaleZ(boolean isAutoscale, double floor, double ceil)
Plot2D
setAutoscaleZ
in interface Plot2D
public void setFloorCeilColor(java.awt.Color floorColor, java.awt.Color ceilColor)
Plot2D
setFloorCeilColor
in interface Plot2D
public void setColorPalette(java.awt.Color[] colors)
Plot2D
setColorPalette
in interface Plot2D
public void setPaletteType(int type)
Plot2D
setPaletteType
in interface Plot2D
public void setGridLineColor(java.awt.Color c)
Plot2D
setGridLineColor
in interface Plot2D
public void setShowGridLines(boolean showGrid)
Plot2D
setShowGridLines
in interface Plot2D
public javax.swing.JFrame showLegend()
Plot2D
showLegend
in interface Plot2D
public void setVisible(boolean isVisible)
Plot2D
setVisible
in interface Plot2D
public void setIndexes(int[] indexes)
Plot2D
setIndexes
in interface Plot2D
indexes
- the sample-component indexespublic void update()
Plot2D
update
in interface Plot2D
public void setExpandedZ(boolean expanded, double factor)
Plot2D
setExpandedZ
in interface Plot2D
expanded
- booleanfactor
- doublepublic void setSymmetricZ(boolean symmetric)
Plot2D
setSymmetricZ
in interface Plot2D
public boolean isSymmetricZ()
Plot2D
isSymmetricZ
in interface Plot2D
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 boolean isMeasured()
Measurable
isMeasured
in interface Measurable
public void draw(DrawingPanel panel, java.awt.Graphics g)
Drawable
draw
in interface Drawable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |