Class AxisLayout
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.axis.layout.AxisLayout
-
public class AxisLayout extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AxisLayout.FontType
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AxisLayout()
Default AxeBox layout
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyFontSizePolicy()
float
getAxisLabelDistance()
int
getAxisLabelOffsetMargin()
Font
getFont()
Font
getFont(AxisLayout.FontType type, HiDPI hidpi)
Get registered font according to conditionsIFontSizePolicy
getFontSizePolicy()
Color
getGridColor()
Color
getMainColor()
int
getMaxXTickLabelWidth(IPainter painter)
Return the maximum text length in pixel as displayed on screen, given the current ticks and rendererint
getMaxYTickLabelWidth(IPainter painter)
Return the maximum text length in pixel as displayed on screen, given the current ticks and rendererColor
getQuadColor()
float
getTickLengthRatio()
String
getXAxisLabel()
LabelOrientation
getXAxisLabelOrientation()
Color
getXTickColor()
ITickProvider
getXTickProvider()
ITickRenderer
getXTickRenderer()
double[]
getXTicks()
double[]
getXTicks(double min, double max)
String
getYAxisLabel()
LabelOrientation
getYAxisLabelOrientation()
Color
getYTickColor()
ITickProvider
getYTickProvider()
ITickRenderer
getYTickRenderer()
double[]
getYTicks()
double[]
getYTicks(double min, double max)
String
getZAxisLabel()
LabelOrientation
getZAxisLabelOrientation()
ZAxisSide
getZAxisSide()
Color
getZTickColor()
ITickProvider
getZTickProvider()
ITickRenderer
getZTickRenderer()
double[]
getZTicks()
double[]
getZTicks(double min, double max)
boolean
isAxisLabelOffsetAuto()
boolean
isFaceDisplayed()
boolean
isTickLineDisplayed()
boolean
isXAxeLabelDisplayed()
boolean
isXTickLabelDisplayed()
boolean
isYAxeLabelDisplayed()
boolean
isYTickLabelDisplayed()
boolean
isZAxeLabelDisplayed()
boolean
isZTickLabelDisplayed()
void
setAxisLabelDistance(float axisLabelDistance)
void
setAxisLabelOffsetAuto(boolean isAuto)
When enabled, the axis will have the X, Y and Z axis label shifted to avoid covering the tick labels.void
setAxisLabelOffsetMargin(int margin)
When {@link #setAxisLabelOffsetAuto(true)}, use this margin to define the horizontal margin to let between the ticks and the axis labelsvoid
setFaceDisplayed(boolean faceDisplayed)
void
setFont(Font font)
void
setFont(Font font, AxisLayout.FontType type, HiDPI hidpi)
Get font according to a given contextvoid
setFontSizePolicy(IFontSizePolicy fontSizePolicy)
void
setGridColor(Color gridColor)
void
setMainColor(Color color)
void
setQuadColor(Color quadColor)
void
setTickLengthRatio(float tickLengthRatio)
Set the length of ticks, given as a ratio of the scene bounds.void
setTickLineDisplayed(boolean tickLineDisplayed)
void
setXAxeLabelDisplayed(boolean axeLabelDisplayed)
void
setXAxisLabel(String axeLabel)
void
setXAxisLabelOrientation(LabelOrientation xAxisLabelOrientation)
void
setXTickColor(Color tickColor)
void
setXTickLabelDisplayed(boolean tickLabelDisplayed)
Supported by EmulGL onlyvoid
setXTickProvider(ITickProvider tickProvider)
void
setXTickRenderer(ITickRenderer tickRenderer)
void
setYAxeLabelDisplayed(boolean axeLabelDisplayed)
void
setYAxisLabel(String axeLabel)
void
setYAxisLabelOrientation(LabelOrientation yAxisLabelOrientation)
void
setYTickColor(Color tickColor)
void
setYTickLabelDisplayed(boolean tickLabelDisplayed)
Supported by EmulGL onlyvoid
setYTickProvider(ITickProvider tickProvider)
void
setYTickRenderer(ITickRenderer tickRenderer)
void
setZAxeLabelDisplayed(boolean axeLabelDisplayed)
void
setZAxisLabel(String axeLabel)
void
setZAxisLabelOrientation(LabelOrientation zAxisLabelOrientation)
void
setZAxisSide(ZAxisSide zAxisSide)
void
setZTickColor(Color tickColor)
void
setZTickLabelDisplayed(boolean tickLabelDisplayed)
Supported by EmulGL onlyvoid
setZTickProvider(ITickProvider tickProvider)
void
setZTickRenderer(ITickRenderer tickRenderer)
-
-
-
Field Detail
-
FONT_DEFAULT
public static final Font FONT_DEFAULT
-
fontSizePolicy
protected IFontSizePolicy fontSizePolicy
-
font
protected Font font
-
fontMajorHiDPI
protected Font fontMajorHiDPI
-
fontMinorHiDPI
protected Font fontMinorHiDPI
-
fontMajorNoHiDPI
protected Font fontMajorNoHiDPI
-
fontMinorNoHiDPI
protected Font fontMinorNoHiDPI
-
xAxisLabelOrientation
protected LabelOrientation xAxisLabelOrientation
-
yAxisLabelOrientation
protected LabelOrientation yAxisLabelOrientation
-
zAxisLabelOrientation
protected LabelOrientation zAxisLabelOrientation
-
xAxeLabel
protected String xAxeLabel
-
yAxeLabel
protected String yAxeLabel
-
zAxeLabel
protected String zAxeLabel
-
xAxeLabelDisplayed
protected boolean xAxeLabelDisplayed
-
yAxeLabelDisplayed
protected boolean yAxeLabelDisplayed
-
zAxeLabelDisplayed
protected boolean zAxeLabelDisplayed
-
tickLineDisplayed
protected boolean tickLineDisplayed
-
xTicks
protected double[] xTicks
-
yTicks
protected double[] yTicks
-
zTicks
protected double[] zTicks
-
xTickProvider
protected ITickProvider xTickProvider
-
yTickProvider
protected ITickProvider yTickProvider
-
zTickProvider
protected ITickProvider zTickProvider
-
xTickRenderer
protected ITickRenderer xTickRenderer
-
yTickRenderer
protected ITickRenderer yTickRenderer
-
zTickRenderer
protected ITickRenderer zTickRenderer
-
xTickColor
protected Color xTickColor
-
yTickColor
protected Color yTickColor
-
zTickColor
protected Color zTickColor
-
xTickLabelDisplayed
protected boolean xTickLabelDisplayed
-
yTickLabelDisplayed
protected boolean yTickLabelDisplayed
-
zTickLabelDisplayed
protected boolean zTickLabelDisplayed
-
faceDisplayed
protected boolean faceDisplayed
-
quadColor
protected Color quadColor
-
gridColor
protected Color gridColor
-
lastXmin
protected double lastXmin
-
lastXmax
protected double lastXmax
-
lastYmin
protected double lastYmin
-
lastYmax
protected double lastYmax
-
lastZmin
protected double lastZmin
-
lastZmax
protected double lastZmax
-
mainColor
protected Color mainColor
-
zAxisSide
protected ZAxisSide zAxisSide
-
axisLabelOffsetAuto
protected boolean axisLabelOffsetAuto
-
axisLabelOffsetMargin
protected int axisLabelOffsetMargin
-
tickLengthRatio
protected float tickLengthRatio
-
axisLabelDistance
protected float axisLabelDistance
-
-
Method Detail
-
setMainColor
public void setMainColor(Color color)
-
getMainColor
public Color getMainColor()
-
getMaxXTickLabelWidth
public int getMaxXTickLabelWidth(IPainter painter)
Return the maximum text length in pixel as displayed on screen, given the current ticks and renderer
-
getMaxYTickLabelWidth
public int getMaxYTickLabelWidth(IPainter painter)
Return the maximum text length in pixel as displayed on screen, given the current ticks and renderer
-
getXTicks
public double[] getXTicks(double min, double max)
-
getYTicks
public double[] getYTicks(double min, double max)
-
getZTicks
public double[] getZTicks(double min, double max)
-
getXTicks
public double[] getXTicks()
-
getYTicks
public double[] getYTicks()
-
getZTicks
public double[] getZTicks()
-
getXTickProvider
public ITickProvider getXTickProvider()
-
setXTickProvider
public void setXTickProvider(ITickProvider tickProvider)
-
getYTickProvider
public ITickProvider getYTickProvider()
-
setYTickProvider
public void setYTickProvider(ITickProvider tickProvider)
-
getZTickProvider
public ITickProvider getZTickProvider()
-
setZTickProvider
public void setZTickProvider(ITickProvider tickProvider)
-
getXTickRenderer
public ITickRenderer getXTickRenderer()
-
setXTickRenderer
public void setXTickRenderer(ITickRenderer tickRenderer)
-
getYTickRenderer
public ITickRenderer getYTickRenderer()
-
setYTickRenderer
public void setYTickRenderer(ITickRenderer tickRenderer)
-
getZTickRenderer
public ITickRenderer getZTickRenderer()
-
setZTickRenderer
public void setZTickRenderer(ITickRenderer tickRenderer)
-
getXTickColor
public Color getXTickColor()
-
setXTickColor
public void setXTickColor(Color tickColor)
-
getYTickColor
public Color getYTickColor()
-
setYTickColor
public void setYTickColor(Color tickColor)
-
getZTickColor
public Color getZTickColor()
-
setZTickColor
public void setZTickColor(Color tickColor)
-
isXTickLabelDisplayed
public boolean isXTickLabelDisplayed()
-
setXTickLabelDisplayed
public void setXTickLabelDisplayed(boolean tickLabelDisplayed)
Supported by EmulGL only
-
isYTickLabelDisplayed
public boolean isYTickLabelDisplayed()
-
setYTickLabelDisplayed
public void setYTickLabelDisplayed(boolean tickLabelDisplayed)
Supported by EmulGL only
-
isZTickLabelDisplayed
public boolean isZTickLabelDisplayed()
-
setZTickLabelDisplayed
public void setZTickLabelDisplayed(boolean tickLabelDisplayed)
Supported by EmulGL only
-
isTickLineDisplayed
public boolean isTickLineDisplayed()
-
setTickLineDisplayed
public void setTickLineDisplayed(boolean tickLineDisplayed)
-
isAxisLabelOffsetAuto
public boolean isAxisLabelOffsetAuto()
-
setAxisLabelOffsetAuto
public void setAxisLabelOffsetAuto(boolean isAuto)
When enabled, the axis will have the X, Y and Z axis label shifted to avoid covering the tick labels.
-
getAxisLabelOffsetMargin
public int getAxisLabelOffsetMargin()
-
setAxisLabelOffsetMargin
public void setAxisLabelOffsetMargin(int margin)
When {@link #setAxisLabelOffsetAuto(true)}, use this margin to define the horizontal margin to let between the ticks and the axis labels
-
getXAxisLabel
public String getXAxisLabel()
-
setXAxisLabel
public void setXAxisLabel(String axeLabel)
-
getYAxisLabel
public String getYAxisLabel()
-
setYAxisLabel
public void setYAxisLabel(String axeLabel)
-
getZAxisLabel
public String getZAxisLabel()
-
setZAxisLabel
public void setZAxisLabel(String axeLabel)
-
isXAxeLabelDisplayed
public boolean isXAxeLabelDisplayed()
-
setXAxeLabelDisplayed
public void setXAxeLabelDisplayed(boolean axeLabelDisplayed)
-
isYAxeLabelDisplayed
public boolean isYAxeLabelDisplayed()
-
setYAxeLabelDisplayed
public void setYAxeLabelDisplayed(boolean axeLabelDisplayed)
-
isZAxeLabelDisplayed
public boolean isZAxeLabelDisplayed()
-
setZAxeLabelDisplayed
public void setZAxeLabelDisplayed(boolean axeLabelDisplayed)
-
getXAxisLabelOrientation
public LabelOrientation getXAxisLabelOrientation()
-
setXAxisLabelOrientation
public void setXAxisLabelOrientation(LabelOrientation xAxisLabelOrientation)
-
getYAxisLabelOrientation
public LabelOrientation getYAxisLabelOrientation()
-
setYAxisLabelOrientation
public void setYAxisLabelOrientation(LabelOrientation yAxisLabelOrientation)
-
getZAxisLabelOrientation
public LabelOrientation getZAxisLabelOrientation()
-
setZAxisLabelOrientation
public void setZAxisLabelOrientation(LabelOrientation zAxisLabelOrientation)
-
getZAxisSide
public ZAxisSide getZAxisSide()
-
setZAxisSide
public void setZAxisSide(ZAxisSide zAxisSide)
-
isFaceDisplayed
public boolean isFaceDisplayed()
-
setFaceDisplayed
public void setFaceDisplayed(boolean faceDisplayed)
-
getQuadColor
public Color getQuadColor()
-
setQuadColor
public void setQuadColor(Color quadColor)
-
getGridColor
public Color getGridColor()
-
setGridColor
public void setGridColor(Color gridColor)
-
getFontSizePolicy
public IFontSizePolicy getFontSizePolicy()
-
setFontSizePolicy
public void setFontSizePolicy(IFontSizePolicy fontSizePolicy)
-
applyFontSizePolicy
public void applyFontSizePolicy()
-
getFont
public Font getFont()
-
setFont
public void setFont(Font font)
-
getFont
public Font getFont(AxisLayout.FontType type, HiDPI hidpi)
Get registered font according to conditions- Parameters:
type
- the major/minor font casehidpi
- the HiDPI context for this font, allowing to define bigger fonts in case screen resolution is high (and text small)
-
getTickLengthRatio
public float getTickLengthRatio()
-
setTickLengthRatio
public void setTickLengthRatio(float tickLengthRatio)
Set the length of ticks, given as a ratio of the scene bounds. If scene bounding box range is 100 and tickLengthRatio is 20, then the actual tick length on screen will be of 5 pixels.
-
getAxisLabelDistance
public float getAxisLabelDistance()
-
setAxisLabelDistance
public void setAxisLabelDistance(float axisLabelDistance)
-
setFont
public void setFont(Font font, AxisLayout.FontType type, HiDPI hidpi)
Get font according to a given context- Parameters:
font
- the font to use for the contexttype
- the major/minor font possibilites that a drawable or colorbar may usehidpi
- the HiDPI context for this font, allowing to define bigger fonts in case screen resolution is high (and text small)
-
-