Class AxisLayout


  • public class AxisLayout
    extends Object
    • Field Detail

      • FONT_DEFAULT

        public static final Font FONT_DEFAULT
      • font

        protected Font font
      • fontMajorHiDPI

        protected Font fontMajorHiDPI
      • fontMinorHiDPI

        protected Font fontMinorHiDPI
      • fontMajorNoHiDPI

        protected Font fontMajorNoHiDPI
      • fontMinorNoHiDPI

        protected Font fontMinorNoHiDPI
      • 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
      • 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
      • axisLabelOffsetAuto

        protected boolean axisLabelOffsetAuto
      • axisLabelOffsetMargin

        protected int axisLabelOffsetMargin
      • tickLengthRatio

        protected float tickLengthRatio
      • axisLabelDistance

        protected float axisLabelDistance
    • Constructor Detail

      • AxisLayout

        public AxisLayout()
        Default AxeBox layout
    • 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()
      • setXTickProvider

        public void setXTickProvider​(ITickProvider tickProvider)
      • setYTickProvider

        public void setYTickProvider​(ITickProvider tickProvider)
      • setZTickProvider

        public void setZTickProvider​(ITickProvider tickProvider)
      • setXTickRenderer

        public void setXTickRenderer​(ITickRenderer tickRenderer)
      • setYTickRenderer

        public void setYTickRenderer​(ITickRenderer tickRenderer)
      • 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)
      • setXAxisLabelOrientation

        public void setXAxisLabelOrientation​(LabelOrientation xAxisLabelOrientation)
      • setYAxisLabelOrientation

        public void setYAxisLabelOrientation​(LabelOrientation yAxisLabelOrientation)
      • 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)
      • 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 case
        hidpi - 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 context
        type - the major/minor font possibilites that a drawable or colorbar may use
        hidpi - the HiDPI context for this font, allowing to define bigger fonts in case screen resolution is high (and text small)