|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.axes.XYAxis
public abstract class XYAxis
A superclass for the x axis and y axis.
Field Summary | |
---|---|
static int |
DRAW_AT_LOCATION
Field DRAW_AT_LOCATION |
static int |
DRAW_IN_DISPLAY
Field DRAW_IN_DISPLAY |
static int |
DRAW_IN_GUTTER
Field DRAW_IN_GUTTER |
static int |
LINEAR
Field LINEAR |
static int |
LOG10
Field LOG10 |
protected double |
x
|
protected double |
y
|
Constructor Summary | |
---|---|
XYAxis()
Constructor XYAxis |
Method Summary | |
---|---|
void |
calculateLabels(double minimum,
double maximum,
int numTicks)
Calculates the axis labels. |
abstract void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the axis in a drawing panel. |
protected void |
drawMultiplier(int xpix,
int ypix,
int exponent,
java.awt.Graphics2D g2)
|
Interactive |
findInteractive(DrawingPanel panel,
int _xpix,
int _ypix)
|
double |
getX()
|
double |
getXMax()
Gets the maximum x needed to draw this object. |
double |
getXMin()
Gets the minimum x needed to draw this object. |
double |
getY()
|
double |
getYMax()
Gets the maximum y needed to draw this object. |
double |
getYMin()
Gets the minimum y needed to draw this object. |
boolean |
isEnabled()
|
boolean |
isMeasured()
Determines if information is available to set min/max values. |
static double |
log10(double x)
|
void |
setAxisType(int type)
Method setAxisType |
void |
setEnabled(boolean _enabled)
|
void |
setLabelFormat(java.text.DecimalFormat format)
Method setLabelFormat |
void |
setLabelFormat(java.lang.String formatString)
Method setLabelFormat |
void |
setLocation(double _location)
Sets the location type. |
void |
setLocationType(int _locationType)
Sets the location type. |
void |
setShowMajorGrid(boolean show)
|
void |
setTitle(java.lang.String title)
Sets the title. |
void |
setTitle(java.lang.String title,
java.lang.String font_name)
Sets the title. |
void |
setTitleFont(java.lang.String name)
Set the title font. |
void |
setX(double x)
|
void |
setXY(double x,
double y)
|
void |
setY(double y)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DRAW_IN_DISPLAY
public static final int DRAW_IN_GUTTER
public static final int DRAW_AT_LOCATION
public static final int LINEAR
protected double x
protected double y
public static final int LOG10
Constructor Detail |
---|
public XYAxis()
Method Detail |
---|
public abstract void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
panel
- g
- public void setLabelFormat(java.text.DecimalFormat format)
format
- public void setLabelFormat(java.lang.String formatString)
formatString
- public void setLocationType(int _locationType)
_locationType
- public void setLocation(double _location)
_location
- public void setAxisType(int type)
type
- public void setTitle(java.lang.String title, java.lang.String font_name)
title
- font_name
- an optional font namepublic void setTitle(java.lang.String title)
title
- public void setTitleFont(java.lang.String name)
name
- A font name.public void setShowMajorGrid(boolean show)
protected void drawMultiplier(int xpix, int ypix, int exponent, java.awt.Graphics2D g2)
public void calculateLabels(double minimum, double maximum, int numTicks)
minimum
- maximum
- numTicks
- public double getXMin()
getXMin
in interface Measurable
public double getXMax()
getXMax
in interface Measurable
public double getYMin()
getYMin
in interface Measurable
public double getYMax()
getYMax
in interface Measurable
public boolean isMeasured()
isMeasured
in interface Measurable
public Interactive findInteractive(DrawingPanel panel, int _xpix, int _ypix)
findInteractive
in interface Interactive
public void setEnabled(boolean _enabled)
setEnabled
in interface Interactive
public boolean isEnabled()
isEnabled
in interface Interactive
public void setXY(double x, double y)
setXY
in interface Interactive
public void setX(double x)
setX
in interface Interactive
public void setY(double y)
setY
in interface Interactive
public double getX()
getX
in interface Interactive
public double getY()
getY
in interface Interactive
public static double log10(double x) throws java.lang.ArithmeticException
x
- a double value
java.lang.ArithmeticException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |