|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.axes.AbstractAxes org.opensourcephysics.display.axes.CartesianType2
public class CartesianType2
Field Summary |
---|
Fields inherited from class org.opensourcephysics.display.axes.AbstractAxes |
---|
defaultBottomGutter, defaultLeftGutter, defaultRightGutter, defaultTopGutter, drawingPanel, gridcolor, interiorColor, labelFont, labelFormat, superscriptFont, titleFont, titleLine, visible |
Constructor Summary | |
---|---|
CartesianType2(PlottingPanel panel)
CartesianType2 draws axes in the drawing panel's gutter. |
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the axes in the drawing panel. |
java.lang.String |
getTitle()
Gets the title. |
double |
getX()
Gets the drawing location. |
java.lang.String |
getXLabel()
Gets the x axis label. |
double |
getY()
Gets the drawing location. |
java.lang.String |
getYLabel()
Gets the y axis label. |
boolean |
isXLog()
Determines if the x axis is logarithmic. |
boolean |
isYLog()
Deteermines if the y axis is logarithmic. |
void |
setInteriorBackground(java.awt.Color color)
Sets the interior background color. |
void |
setShowMajorXGrid(boolean showGrid)
Shows a grid line for every x axis major tickmark. |
void |
setShowMajorYGrid(boolean showGrid)
Shows a grid line for every y axis major tickmark. |
void |
setShowMinorXGrid(boolean showGrid)
Shows a grid line for every x axis minor tickmark. |
void |
setShowMinorYGrid(boolean showGrid)
Shows a grid line for every y axis minor tickmark. |
void |
setTitle(java.lang.String s,
java.lang.String font_name)
Set the title. |
void |
setX(double x)
Sets the drawing location. |
void |
setXLabel(java.lang.String s,
java.lang.String font_name)
Sets the x label of the axes. |
void |
setXLog(boolean isLog)
Sets the x axis to linear or logarithmic. |
void |
setY(double y)
Sets the drawing location. |
void |
setYLabel(java.lang.String s,
java.lang.String font_name)
Sets the y label of the axes. |
void |
setYLog(boolean isLog)
Sets the y axis to linear or logarithmic. |
Methods inherited from class org.opensourcephysics.display.axes.AbstractAxes |
---|
getInteriorBackground, isVisible, resetPanelGutters, resizeFonts, setDefaultGutters, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.axes.DrawableAxes |
---|
getInteriorBackground, resizeFonts, setVisible |
Constructor Detail |
---|
public CartesianType2(PlottingPanel panel)
panel
- the drawing panel that will use the axesMethod Detail |
---|
public void setXLabel(java.lang.String s, java.lang.String font_name)
setXLabel
in interface DrawableAxes
s
- the labelfont_name
- an optional font namepublic void setYLabel(java.lang.String s, java.lang.String font_name)
setYLabel
in interface DrawableAxes
s
- the labelfont_name
- an optional font namepublic java.lang.String getXLabel()
getXLabel
in interface DrawableAxes
public java.lang.String getYLabel()
getYLabel
in interface DrawableAxes
public java.lang.String getTitle()
getTitle
in interface DrawableAxes
getTitle
in class AbstractAxes
public void setTitle(java.lang.String s, java.lang.String font_name)
setTitle
in interface DrawableAxes
setTitle
in class AbstractAxes
s
- the labelfont_name
- an optional font namepublic void setXLog(boolean isLog)
setXLog
in interface CartesianAxes
isLog
- true for log scale; false otherwisepublic void setYLog(boolean isLog)
setYLog
in interface CartesianAxes
isLog
- true for log scale; false otherwisepublic boolean isXLog()
CartesianAxes
isXLog
in interface CartesianAxes
public boolean isYLog()
CartesianAxes
isYLog
in interface CartesianAxes
public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
panel
- g
- public void setInteriorBackground(java.awt.Color color)
setInteriorBackground
in interface DrawableAxes
setInteriorBackground
in class AbstractAxes
color
- The new interiorBackground valuepublic void setShowMajorXGrid(boolean showGrid)
setShowMajorXGrid
in interface DrawableAxes
public void setShowMinorXGrid(boolean showGrid)
setShowMinorXGrid
in interface DrawableAxes
public void setShowMajorYGrid(boolean showGrid)
setShowMajorYGrid
in interface DrawableAxes
public void setShowMinorYGrid(boolean showGrid)
setShowMinorYGrid
in interface DrawableAxes
public void setX(double x)
CartesianAxes
setX
in interface CartesianAxes
public void setY(double y)
CartesianAxes
setY
in interface CartesianAxes
public double getX()
CartesianAxes
getX
in interface CartesianAxes
public double getY()
CartesianAxes
getY
in interface CartesianAxes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |