Class PoAxis

  • All Implemented Interfaces:
    SafeDisposable
    Direct Known Subclasses:
    PoAngularAxis, PoCartesianAxis, PoPolarAxis, PoTimeAxis

    public class PoAxis
    extends PoBaseAxis
    Abstract class for axis representations. This class groups all common methods and all common fields of all axes. Some enumerations are named DEPEND, in such a case, the choice of these values is done when building the axis.

    All axis texts depend on the current miscellaneous text attributes which define the font name, line length and so on. If the method setMiscTextAttr(textAttr) is called, the current miscellaneous text attributes are defined by "textAttr". Otherwise the current miscellaneous text attributes are specified in the current inherited state (cf property node PoMiscTextAttr).

    • Field Detail

      • gradFontName

        public final SoSFString gradFontName
        Graduations font name. If the font is equal to its default value (empty string), the font used is the font of the current miscellaneous text attributes. Default is empty string.
      • gradFontSize

        public final SoSFFloat gradFontSize
        Font size of the graduations. If this value is <= 0, the graduations font size is fixed at 0.04 if the graduations do not cross each other. This value is a percentage of the current domain (see PoBase description). As a result, the size of graduations text on the screen is the same regardless of text orientation. Default is 0.
      • gradDistAxis

        public final SoSFFloat gradDistAxis
        Distance from the graduations to the axis. If this value is <= 0, the distance is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.
      • gradAddStringVisibility

        public final SoSFBool gradAddStringVisibility
        Specify the visibility of a string concatenated with the graduations. Default is false.
      • gradAddString

        public final SoSFString gradAddString
        String to be concatenated. Default is empty string.
      • marginStart

        public final SoSFFloat marginStart
        Margin at the start of the axis. Default is 0.
      • marginEnd

        public final SoSFFloat marginEnd
        Margin at the end of the axis. Default is 0.
      • titleFontName

        public final SoSFString titleFontName
        Title font name. If the font is equal to its default value (empty string), the font used is the font of the current miscellaneous text attributes. Default is empty string.
      • titleFontSize

        public final SoSFFloat titleFontSize
        Font size of the title. If this value is <= 0, the graduations font size is fixed at 0.055. This value is a percentage of the current domain (see PoBase description). As a result, the size of text on the screen is the same regardless of text orientation. Default is 0.
      • titleDistAxis

        public final SoSFFloat titleDistAxis
        Distance from the title to the axis. If this value is <= 0, the distance is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.
      • titleString

        public final SoSFString titleString
        Title string. Default is empty string.
      • gridLengthGradSide

        public final SoSFFloat gridLengthGradSide
        Grid lines length side graduation texts. Default is 0.
      • gridLengthGradOtherSide

        public final SoSFFloat gridLengthGradOtherSide
        Grid lines length other side graduation texts. Default is 1.
      • arrowHeight

        public final SoSFFloat arrowHeight
        Arrow height. If this value is <= 0, the height is fixed at 0.03. This value is a percentage of the current domain (cf PoBase description). Default is 0.03.
      • arrowLength

        public final SoSFFloat arrowLength
        Arrow length. If this value is <= 0, the length is fixed at 0.05. This value is a percentage of the current domain (cf PoBase description). Default is 0.05.
      • tickMainLength

        public final SoSFFloat tickMainLength
        Main graduations ticks length. If this value is <= 0, the height is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.
      • tickSubLength

        public final SoSFFloat tickSubLength
        Secondary graduations ticks length. If this value is <= 0, the length is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.
      • tickSubDef

        public final SoSFEnum<PoAxis.TickSubDefs> tickSubDef
        Secondary graduations tick definition. The secondary graduations can be given either by a number or by a period. . Default is PERIOD_MAIN_TICK.
      • tickNumOrPeriod

        public final SoSFUShort tickNumOrPeriod
        Number of secondary graduations (tickSubDef = NUM_SUB_TICK), or period of texts of graduations (tickSubDef = PERIOD_MAIN_TICK). Default is 1.
      • tickFirstGrad

        public final SoSFUShort tickFirstGrad
        First graduation to display. Default is 1.
      • tickLastGrad

        public final SoSFUShort tickLastGrad
        Last graduation to display (number starting with the ending one). Default is 1.
      • reverseFlag

        public final SoSFEnum<PoAxis.AxisReverses> reverseFlag
        Allow to reverse the writing path of all axis texts. . Default is AXIS_REVERSE_DEPEND.
    • Method Detail

      • getGrid

        public PoAxis.GridAttributes getGrid()
        Gets the grid axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.
      • getArrow

        public PoAxis.ArrowAttributes getArrow()
        Gets the arrow axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.
      • getTitle

        public PoAxis.TitleAttributes getTitle()
        Gets the title axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.
      • getReverseFlag

        public PoAxis.AxisReverses getReverseFlag()
        Gets the reverse flag axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.
      • getTick

        public PoAxis.TickAttributes getTick()
        Gets the tick axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.
      • setMiscTextAttr

        public void setMiscTextAttr​(PbMiscTextAttr textAttr)
        Sets a reference to PbMiscTextAttr object for miscellaneous text attributes. If this method is not called (or called passing NULL as argument), this is the miscellaneous text attributes defined in the current inherited state (defined with the property node PoMiscTextAttr) which are used.
      • getMargin

        public PoAxis.MarginAttributes getMargin()
        Gets the margin axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.
      • getGrad

        public PoAxis.GradAttributes getGrad()
        Gets the graduations axis attributes computed by the last axis rebuilding. If the axis have never been built, the method return the value of the equivalent field.