public class Axis extends Object implements Plotable, BaseDependant, Editable
| Modifier and Type | Field and Description |
|---|---|
protected Base |
base |
protected Color |
color
Color in which the name of the axis is displayed.
|
protected BaseLabel |
darkLabel |
protected double[] |
darkLabel_base_position |
protected double |
darkLabelAngle |
protected Font |
darkLabelFont |
protected BaseLine |
darkLine |
protected double[] |
end |
protected int |
index |
protected String |
label
Axis label
|
protected double[] |
labelsSlicing |
protected double |
lightLabelAngle |
protected Font |
lightLabelFont |
protected String[] |
lightLabelNames |
protected Label[] |
lightLabels |
protected double |
lightLabels_base_offset |
protected Line[][] |
lightLines |
protected int |
linear_slicing |
protected double[] |
linesSlicing |
double |
log10 |
protected int |
note_precision |
protected double[] |
origin |
protected HashMap<String,Double> |
stringMap
Mapping of the data on this axis, which is the association between values
along this axis as String and double numbers.
|
| Constructor and Description |
|---|
Axis(Base b,
String aS,
Color c,
int i) |
| Modifier and Type | Method and Description |
|---|---|
void |
edit(Object plotCanvas)
Opens a dialog window and asks the user for the name of this axis.
|
void |
editnote(AbstractDrawer draw) |
Color |
getColor()
Returns the color of the axis' label.
|
String |
getLegend()
Returns the label of the axis.
|
double[] |
getLegendCoord()
Returns the coordinates of the axis label, in the referential of the
canvas it is drawn in.
|
HashMap<String,Double> |
getStringMap()
Returns the mapping of the data on this axis, which is the association
between values along this axis as String and double numbers.
|
boolean |
getVisible()
Returns the visibility of the whole axis object.
|
void |
init()
Sets the axis to its default initial value.
|
double[] |
isSelected(int[] screenCoordTest,
AbstractDrawer draw) |
static void |
main(String[] args) |
void |
plot(AbstractDrawer draw) |
void |
resetBase()
Resets the axis to its default value.
|
void |
setColor(Color c)
Sets the color used to display the axis' label.
|
void |
setEnd(double[] _end)
Problem here?
|
void |
setGridVisible(boolean v)
Sets the visibility of the light lines and their labels.
|
void |
setLabelAngle(double angle)
Sets the angle with which the label will be displayed.
|
void |
setLabelFont(Font f)
Sets the font used to display the label.
|
void |
setLabelPosition(double... _p)
Sets the position of the axis label on the panel.
|
void |
setLabelText(String _t)
Specifies the label of the axis.
|
void |
setLegend(String _label)
Sets the label of this axis.
|
void |
setLightLabelAngle(double angle)
Sets the angle with which the light labels will be displayed.
|
void |
setLightLabelFont(Font f)
Sets the font used for the light labels.
|
void |
setLightLabels()
When called out of the axis class, resets the light labels to their
default value.
|
void |
setLightLabelText(String[] _lightLabelnames)
Sets the labels of the light lines.
|
void |
setOrigin(double[] _origin) |
void |
setStringMap(HashMap<String,Double> stringMap)
Returns the mapping of the data on this axis, which is the association
between values along this axis as String and double numbers.
|
void |
setVisible(boolean v)
Sets the visibility of the whole axis object.
|
protected HashMap<String,Double> stringMap
protected int linear_slicing
protected int note_precision
protected int index
protected Base base
protected Color color
protected String label
protected double[] linesSlicing
protected double[] labelsSlicing
protected double[] origin
protected double[] end
protected BaseLine darkLine
protected Line[][] lightLines
protected BaseLabel darkLabel
protected Label[] lightLabels
protected Font lightLabelFont
protected Font darkLabelFont
protected double lightLabelAngle
protected double darkLabelAngle
protected String[] lightLabelNames
protected double lightLabels_base_offset
protected double[] darkLabel_base_position
public final double log10
public void setVisible(boolean v)
setVisible in interface Plotablev - Visible if true.public boolean getVisible()
getVisible in interface Plotablepublic HashMap<String,Double> getStringMap()
public void setStringMap(HashMap<String,Double> stringMap)
stringMap - Mapping of the data on this axis.public void setGridVisible(boolean v)
v - Visible if true.public void setColor(Color c)
public Color getColor()
public void setLegend(String _label)
_label - The label to be given to the axis.public String getLegend()
public double[] getLegendCoord()
public void plot(AbstractDrawer draw)
public void init()
public void resetBase()
resetBase in interface BaseDependantpublic void setEnd(double[] _end)
_end - public void setOrigin(double[] _origin)
public void setLightLabels()
public void setLightLabelText(String[] _lightLabelnames)
_lightLabelnames - Array of string containing the labels. When the end of the
array is reached for one tick, the following tick starts with
the beginning of the array again.public void setLightLabelFont(Font f)
f - Font to use.public void setLightLabelAngle(double angle)
angle - Angle in degrees, measured clockwise.public void setLabelText(String _t)
_t - Label to add to the axis.public void setLabelFont(Font f)
f - Font to use.public void setLabelAngle(double angle)
angle - Angle in degrees, measured clockwise.public void setLabelPosition(double... _p)
_p - Position of the label.public void edit(Object plotCanvas)
public double[] isSelected(int[] screenCoordTest,
AbstractDrawer draw)
isSelected in interface EditablescreenCoordTest - draw - public void editnote(AbstractDrawer draw)
public static void main(String[] args)
Copyright © 2015. All rights reserved.