|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.drawing2d.Element org.opensourcephysics.drawing2d.Group org.opensourcephysics.drawing2d.VectorField
public class VectorField
A group of arrows that implements a simpler 2D vector field
Field Summary |
---|
Fields inherited from class org.opensourcephysics.drawing2d.Element |
---|
TARGET_POSITION, TARGET_SIZE |
Constructor Summary | |
---|---|
VectorField()
|
Method Summary | |
---|---|
void |
draw(DrawingPanel _panel,
java.awt.Graphics _g)
Draws the element on a given Graphics2D. |
VectorColorMapper |
getColorMapper()
|
double |
getMagnitudeMaximum()
|
double |
getMagnitudeMinimum()
|
double |
getXMax()
Gets the maximum x needed to draw this object. |
double |
getXMaxLogscale()
Gets the maximum x needed to draw this object on a log scale. |
double |
getXMin()
Gets the minimum x needed to draw this object. |
double |
getXMinLogscale()
Gets the minimum x needed to draw this object on a log scale. |
double |
getYMax()
Gets the maximum y needed to draw this object. |
double |
getYMaxLogscale()
Gets the maximum y needed to draw this object on a log scale on a log scale. |
double |
getYMin()
Gets the minimum y needed to draw this object. |
double |
getYMinLogscale()
Gets the minimum y needed to draw this object on a log scale. |
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 |
isMeasured()
Determines if information is available to set min/max values. |
boolean |
prepareField()
|
void |
setArrowType(int type)
|
void |
setAutoscaleMagnitude(boolean scale)
|
void |
setConstantLength(double length)
|
void |
setInvisibleLevel(int level)
|
void |
setMagnitude(double magnitude)
|
void |
setMagnitudeData(double[][] data)
|
void |
setMagnitudeExtrema(double min,
double max)
|
void |
setMapperPaletteType(int _type)
|
void |
setMaxColor(java.awt.Color _aColor)
|
void |
setMaximumX(double max)
|
void |
setMaximumY(double max)
|
void |
setMinColor(java.awt.Color _aColor)
|
void |
setMinimumX(double min)
|
void |
setMinimumY(double min)
|
void |
setNumberOfLevels(int _lev)
|
void |
setRelativePosition(int position)
|
void |
setShowLegend(boolean _visible)
|
void |
setUseColorMapper(boolean _do)
|
void |
setVectorAngle(double size)
|
void |
setVectorAngleData(double[][] data)
|
void |
setVectorSizeX(double size)
|
void |
setVectorSizeXData(double[][] data)
|
void |
setVectorSizeY(double size)
|
void |
setVectorSizeYData(double[][] data)
|
Methods inherited from class org.opensourcephysics.drawing2d.Group |
---|
addElement, addElementAtIndex, addElements, clear, findInteractive, getColumnNames, getData2D, getData3D, getDataList, getDatasets, getElement, getElements, getFillColors, getID, getInteractedIndex, getLineColors, hasChanged, initialize, removeAllElements, removeElement, setID, setNeedToProject |
Methods inherited from class org.opensourcephysics.drawing2d.Element |
---|
addInteractionListener, getCanBeMeasured, getDataObject, getInteractionTarget, getName, getPanel, getPosition, getSize, getSizeX, getSizeY, getStyle, getTransformation, getX, getY, invokeActions, isEnabled, isVisible, removeInteractionListener, setCanBeMeasured, setDataObject, setElementChanged, setEnabled, setName, setPanel, setPosition, setSize, setSizeX, setSizeXY, setSizeY, setTransformation, setVisible, setX, setXY, setY, toBodyFrame, toSpaceFrame, updateHotSpot |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Data |
---|
getName |
Constructor Detail |
---|
public VectorField()
Method Detail |
---|
public void setMinimumX(double min)
public void setMaximumX(double max)
public void setMinimumY(double min)
public void setMaximumY(double max)
public void setVectorSizeXData(double[][] data)
public void setVectorSizeX(double size)
public void setVectorSizeYData(double[][] data)
public void setVectorSizeY(double size)
public void setVectorAngleData(double[][] data)
public void setVectorAngle(double size)
public void setConstantLength(double length)
public void setAutoscaleMagnitude(boolean scale)
public void setMagnitudeExtrema(double min, double max)
public double getMagnitudeMinimum()
public double getMagnitudeMaximum()
public void setMagnitudeData(double[][] data)
public void setMagnitude(double magnitude)
public void setNumberOfLevels(int _lev)
public void setMinColor(java.awt.Color _aColor)
public void setMaxColor(java.awt.Color _aColor)
public void setInvisibleLevel(int level)
public void setArrowType(int type)
public void setRelativePosition(int position)
public void setUseColorMapper(boolean _do)
public void setMapperPaletteType(int _type)
public VectorColorMapper getColorMapper()
public void setShowLegend(boolean _visible)
public double indexToX(int i)
i
- int
public double indexToY(int i)
i
- int
public boolean isMeasured()
Measurable
isMeasured
in interface Measurable
isMeasured
in class Group
public double getXMin()
Measurable
getXMin
in interface Measurable
getXMin
in class Element
public double getXMax()
Measurable
getXMax
in interface Measurable
getXMax
in class Element
public double getYMin()
Measurable
getYMin
in interface Measurable
getYMin
in class Element
public double getYMax()
Measurable
getYMax
in interface Measurable
getYMax
in class Element
public double getXMinLogscale()
LogMeasurable
getXMinLogscale
in interface LogMeasurable
getXMinLogscale
in class Element
public double getXMaxLogscale()
LogMeasurable
getXMaxLogscale
in interface LogMeasurable
getXMaxLogscale
in class Element
public double getYMinLogscale()
LogMeasurable
getYMinLogscale
in interface LogMeasurable
getYMinLogscale
in class Element
public double getYMaxLogscale()
LogMeasurable
getYMaxLogscale
in interface LogMeasurable
getYMaxLogscale
in class Element
public void draw(DrawingPanel _panel, java.awt.Graphics _g)
Element
draw
in interface Drawable
draw
in class Group
public boolean prepareField()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |