Package org.esa.snap.ui.diagram
Class DiagramAxis
- java.lang.Object
-
- org.esa.snap.ui.diagram.DiagramAxis
-
- All Implemented Interfaces:
Serializable
public class DiagramAxis extends Object implements Serializable
Represents an axis in a
. By default an axis has no name, no units and a range set to (0,100).Diagram
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DiagramAxis()
DiagramAxis(String name, String unit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
createTickmarkTexts()
Diagram
getDiagram()
double
getMajorTickMarkDistance()
double
getMaxValue()
double
getMinValue()
String
getName()
int
getNumMajorTicks()
int
getNumMinorTicks()
static double
getOptimalTickDistance(double minValue, double maxValue, int numMajorTicks)
String
getUnit()
double
getUnitFactor()
boolean
isMinToMax()
Does Axis increase from min to max or decrease max to minvoid
setDiagram(Diagram diagram)
void
setMinToMax(boolean isMinToMax)
Sets if Axis increases from min to max or decreases max to min isMinToMax true if increases min to maxvoid
setName(String name)
void
setNumMajorTicks(int numMajorTicks)
void
setNumMinorTicks(int numMinorTicks)
void
setOptimalSubDivision(int numMajorTicksMin, int numMajorTicksMax, int numMinorTicks)
void
setSubDivision(double minValue, double maxValue, int numMajorTicks, int numMinorTicks)
void
setUnit(String unit)
void
setUnitFactor(double unitFactor)
void
setValueRange(double minValue, double maxValue)
-
-
-
Method Detail
-
getName
public String getName()
-
getDiagram
public Diagram getDiagram()
-
setDiagram
public void setDiagram(Diagram diagram)
-
setName
public void setName(String name)
-
getUnit
public String getUnit()
-
setUnit
public void setUnit(String unit)
-
getUnitFactor
public double getUnitFactor()
-
setUnitFactor
public void setUnitFactor(double unitFactor)
-
setMinToMax
public void setMinToMax(boolean isMinToMax)
Sets if Axis increases from min to max or decreases max to min isMinToMax true if increases min to max
-
isMinToMax
public boolean isMinToMax()
Does Axis increase from min to max or decrease max to min- Returns:
- true if increases min to max
-
getMinValue
public double getMinValue()
-
getMaxValue
public double getMaxValue()
-
setValueRange
public void setValueRange(double minValue, double maxValue)
-
getNumMajorTicks
public int getNumMajorTicks()
-
setNumMajorTicks
public void setNumMajorTicks(int numMajorTicks)
-
getNumMinorTicks
public int getNumMinorTicks()
-
setNumMinorTicks
public void setNumMinorTicks(int numMinorTicks)
-
getMajorTickMarkDistance
public double getMajorTickMarkDistance()
-
setSubDivision
public void setSubDivision(double minValue, double maxValue, int numMajorTicks, int numMinorTicks)
-
setOptimalSubDivision
public void setOptimalSubDivision(int numMajorTicksMin, int numMajorTicksMax, int numMinorTicks)
-
getOptimalTickDistance
public static double getOptimalTickDistance(double minValue, double maxValue, int numMajorTicks)
-
createTickmarkTexts
public String[] createTickmarkTexts()
-
-