public class GraphicsAxis extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphicsAxis.GraphicsAxisTicks |
Modifier and Type | Field and Description |
---|---|
static int |
AXISTYPE_COLOR |
static int |
AXISTYPE_HORIZONTAL |
static int |
AXISTYPE_VERTICAL |
Constructor and Description |
---|
GraphicsAxis(int AXISTYPE)
default
|
Modifier and Type | Method and Description |
---|---|
void |
drawAxis(Graphics2D g2d,
int x,
int y) |
void |
drawAxis(Graphics2D g2d,
int x,
int y,
int height) |
void |
drawAxisGrid(Graphics2D g2d,
int x,
int y,
int height) |
void |
drawAxisMirror(Graphics2D g2d,
int x,
int y,
int height) |
AxisAttributes |
getAttributes() |
int |
getAxisBounds(Graphics2D g2d) |
int |
getAxisDivisions() |
double |
getAxisPosition(double value)
returns position along the axis, the dimension of the
axis has to be set.
|
List<Double> |
getAxisTicks() |
Dimension1D |
getDimension() |
boolean |
getGrid() |
FontProperties |
getLabelFont()
returns properties for the label fonts.
|
int |
getLabelFontSize() |
boolean |
getLog() |
double |
getMax() |
double |
getMin() |
Dimension1D |
getRange() |
int |
getSize(Graphics2D g2d,
boolean vertical) |
String |
getTitle() |
FontProperties |
getTitleFont()
returns properties of the title font
|
int |
getTitleFontSize() |
boolean |
isAutoScale() |
boolean |
isShowAxis() |
static void |
main(String[] args)
main program for testing the axis
|
void |
setAttributes(AxisAttributes attr) |
void |
setAutoScale(boolean b) |
void |
setAxisDivisions(int ndiv) |
void |
setAxisFont(String fontname) |
void |
setAxisFontSize(int size) |
void |
setAxisType(int type) |
GraphicsAxis |
setDimension(int xmin,
int xmax)
sets the dimension for the axis for plotting.
|
void |
setGrid(boolean isGrid) |
void |
setLog(boolean flag) |
GraphicsAxis |
setRange(double min,
double max)
Sets the range of the axis, it also updates the axis labels.
|
void |
setShowAxis(boolean b) |
void |
setTitle(String title) |
void |
setVertical(boolean flag) |
void |
show()
prints string representation of the axis.
|
String |
toString()
returns string representation of the axis.
|
public static int AXISTYPE_COLOR
public static int AXISTYPE_HORIZONTAL
public static int AXISTYPE_VERTICAL
public final GraphicsAxis setDimension(int xmin, int xmax)
xmin
- xmax
- public void setAxisType(int type)
public Dimension1D getDimension()
public final GraphicsAxis setRange(double min, double max)
min
- max
- public void setTitle(String title)
public boolean getLog()
public void setLog(boolean flag)
public Dimension1D getRange()
public void show()
public double getAxisPosition(double value)
value
- public FontProperties getTitleFont()
public FontProperties getLabelFont()
public void setAxisFont(String fontname)
public void setAxisFontSize(int size)
public int getSize(Graphics2D g2d, boolean vertical)
public int getAxisDivisions()
public void setVertical(boolean flag)
public void setAxisDivisions(int ndiv)
public int getAxisBounds(Graphics2D g2d)
public void drawAxisGrid(Graphics2D g2d, int x, int y, int height)
public void drawAxisMirror(Graphics2D g2d, int x, int y, int height)
public void drawAxis(Graphics2D g2d, int x, int y)
public void drawAxis(Graphics2D g2d, int x, int y, int height)
public String toString()
public static void main(String[] args)
args
- public boolean isAutoScale()
public void setAutoScale(boolean b)
public AxisAttributes getAttributes()
public void setAttributes(AxisAttributes attr)
public boolean getGrid()
public void setGrid(boolean isGrid)
public String getTitle()
public int getTitleFontSize()
public int getLabelFontSize()
public double getMin()
public double getMax()
public void setShowAxis(boolean b)
public boolean isShowAxis()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics