Class PoLegend

  • All Implemented Interfaces:
    SafeDisposable
    Direct Known Subclasses:
    PoItemLegend, PoValueLegend

    public class PoLegend
    extends PoGraphMaster
    Abstract class for legend representations. This class handles the title, the values, the margins and the path of the legend.

    All legend 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

      • titleFontSize

        public final SoSFFloat titleFontSize
        Font size of the title.
      • titleFontName

        public final SoSFString titleFontName
        Font name of the title. If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.
      • titleString

        public final SoSFString titleString
        Title string.
      • valueFontName

        public final SoSFString valueFontName
        Font name of values. If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.
      • valueAddStringVisibility

        public final SoSFBool valueAddStringVisibility
        Visibility of a string concatenated to the values.
      • valueAddString

        public final SoSFString valueAddString
        String to be concatenated.
      • marginLeft

        public final SoSFFloat marginLeft
        Left margin.
      • marginRight

        public final SoSFFloat marginRight
        Right margin.
      • marginBottom

        public final SoSFFloat marginBottom
        Bottom margin.
      • marginTop

        public final SoSFFloat marginTop
        Top margin.
      • incrementType

        public final SoSFEnum<PoLegend.IncrementTypes> incrementType
        Increment type for the values of legend. (the values can be incremented vertically or horizontally).
      • numColumns

        public final SoSFUShort numColumns
        Number of columns of the legend.
      • boxRatio

        public final SoSFFloat boxRatio
        Ratio between width and height of the colored boxes in the legend.
    • Method Detail

      • setMiscTextAttr

        public void setMiscTextAttr​(PbMiscTextAttr textAttr)
        Sets a reference to a PbMiscTextAttr for miscellaneous text attributes of all legend texts. 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.