Drawable, Measurable, Plot2Dpublic class VectorPlot extends java.lang.Object implements Plot2D
| Modifier and Type | Field | Description |
|---|---|---|
static int |
FILLEDARROW |
|
static int |
STROKEDARROW |
CONTOUR_PLOT, GRID_PLOT, INTERPOLATED_PLOT, SURFACE_PLOT| Constructor | Description |
|---|---|
VectorPlot() |
Constructs a VectorPlot without data.
|
VectorPlot(GridData _griddata) |
Constructs a VectorPlot that renders the given grid data.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g) |
Draws this vector field in the given 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.
|
static XML.ObjectLoader |
getLoader() |
Gets an XML.ObjectLoader to save and load data for this program.
|
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 |
scaleArrowLenghToGrid(boolean scaleToGrid) |
Sets the autoscale flag for the arrow length.
|
void |
setAll(java.lang.Object obj) |
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 |
setArrowType(int type) |
Sets this vector field to draw vectors with filled shafts and arrowheads.
|
void |
setAutoscaleZ(boolean isAutoscale,
double floor,
double ceil) |
Sets the autoscale flag and the floor and ceiling values.
|
void |
setColorPalette(java.awt.Color[] colors) |
Sets the colors that will be used between the floor and ceiling values.
|
void |
setExpandedZ(boolean expanded,
double expansionFactor) |
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 mode) |
Sets the type of palette.
|
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 vis) |
Sets this vector field to be visible.
|
javax.swing.JFrame |
showLegend() |
Shows how values map to colors.
|
void |
update() |
Updates the vector field using the data array.
|
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.
|
public static final int STROKEDARROW
public static final int FILLEDARROW
public VectorPlot()
public VectorPlot(GridData _griddata)
_griddata - the datapublic int xToIndex(double x)
public int yToIndex(double y)
public double indexToX(int i)
public double indexToY(int i)
public void setAll(java.lang.Object obj)
public void setAll(java.lang.Object obj,
double xmin,
double xmax,
double ymin,
double ymax)
public GridData getGridData()
getGridData in interface Plot2Dpublic void setGridData(GridData _griddata)
setGridData in interface Plot2D_griddata - the new data storagepublic void setIndexes(int[] indexes)
setIndexes in interface Plot2Dindexes - the sample-component indexespublic void setArrowType(int type)
type - public void setPaletteType(int mode)
setPaletteType in interface Plot2Dmode - public void setColorPalette(java.awt.Color[] colors)
setColorPalette in interface Plot2Dcolors - public void setVisible(boolean vis)
setVisible in interface Plot2Dvis - public void setShowGridLines(boolean showGrid)
setShowGridLines in interface Plot2DshowGrid - public void setGridLineColor(java.awt.Color c)
setGridLineColor in interface Plot2Dc - public void draw(DrawingPanel panel, java.awt.Graphics g)
public void scaleArrowLenghToGrid(boolean scaleToGrid)
scaleToGrid - public void setAutoscaleZ(boolean isAutoscale,
double floor,
double ceil)
setAutoscaleZ in interface Plot2DisAutoscale - floor - ceil - public void setSymmetricZ(boolean symmetric)
setSymmetricZ in interface Plot2Dsymmetric - public boolean isSymmetricZ()
isSymmetricZ in interface Plot2Dpublic boolean isAutoscaleZ()
isAutoscaleZ in interface Plot2Dpublic double getFloor()
public double getCeiling()
getCeiling in interface Plot2Dpublic void setFloorCeilColor(java.awt.Color floorColor,
java.awt.Color ceilColor)
setFloorCeilColor in interface Plot2DfloorColor - ceilColor - public javax.swing.JFrame showLegend()
showLegend in interface Plot2Dpublic void update()
public void setExpandedZ(boolean expanded,
double expansionFactor)
setExpandedZ in interface Plot2Dexpanded - booleanexpansionFactor - doublepublic double getXMin()
MeasurablegetXMin in interface Measurablepublic double getXMax()
MeasurablegetXMax in interface Measurablepublic double getYMin()
MeasurablegetYMin in interface Measurablepublic double getYMax()
MeasurablegetYMax in interface Measurablepublic boolean isMeasured()
MeasurableisMeasured in interface Measurablepublic static XML.ObjectLoader getLoader()