Class ScaleContext

  • All Implemented Interfaces:
    IConstants

    public class ScaleContext
    extends Methods
    Scale context for min/max computation.
    • Constructor Detail

      • ScaleContext

        public ScaleContext​(int iMarginPercent,
                            int iType)
      • ScaleContext

        public ScaleContext​(int iMarginPercent,
                            int iType,
                            java.lang.Object oUnit,
                            java.lang.Object oMinValue,
                            java.lang.Object oMaxValue,
                            java.lang.Object oStep)
      • ScaleContext

        public ScaleContext​(int iMarginPercent,
                            int iType,
                            java.lang.Object oMinAuto,
                            java.lang.Object oMaxAuto,
                            java.lang.Object oStep)
    • Method Detail

      • updateShared

        public void updateShared​(ScaleContext that)
        Parameters:
        that -
      • createSimpleScale

        public static ScaleContext createSimpleScale​(java.lang.Object oMin,
                                                     java.lang.Object oMax)
        Creates a simple instance of scale. Note that this instance is just used to store min/max and can not be computed directly.
        Parameters:
        oMin -
        oMax -
        Since:
        2.3
      • setFixedValue

        public void setFixedValue​(boolean bMinimumFixed,
                                  boolean bMaximumFixed,
                                  java.lang.Object oMinFixed,
                                  java.lang.Object oMaxFixed)
      • setFixedStep

        public void setFixedStep​(boolean bStepFixed,
                                 java.lang.Integer oStepNumber)
      • getMin

        public java.lang.Object getMin()
        Returns the minimum of the scale
        Returns:
        the minimum of the scale
      • setMin

        public void setMin​(java.lang.Object oMin)
      • getMax

        public java.lang.Object getMax()
        Returns the maximum of the scale
        Returns:
        the maximum of the scale
      • setMax

        public void setMax​(java.lang.Object oMax)
      • getMinWithMargin

        public java.lang.Object getMinWithMargin()
        Returns the minimum plus margin. Margin means extra space for rendering and clipping. If margin is 0, or no margin needed, return null.
        Returns:
        the minimum plus margin. If no margin, return null.
      • setMinWithMargin

        public void setMinWithMargin​(java.lang.Object oMinAuto)
      • getMaxWithMargin

        public java.lang.Object getMaxWithMargin()
        Returns the maximum plus margin. Margin means extra space for rendering and clipping. If margin is 0, or no margin needed, return null.
        Returns:
        the maximum plus margin. If no margin, return null.
      • setMaxWithMargin

        public void setMaxWithMargin​(java.lang.Object oMaxAuto)
      • getStep

        public java.lang.Object getStep()
      • setStep

        public void setStep​(java.lang.Object oStep)
      • getStepNumber

        public java.lang.Integer getStepNumber()
      • setStepNumber

        public void setStepNumber​(java.lang.Integer oStepNumber)
      • computeMinMax

        public void computeMinMax()
      • computeMinMax

        public void computeMinMax​(boolean bAlignZero)
      • getUnit

        public java.lang.Object getUnit()
        Returns:
        Returns the iUnit.
      • setUnit

        public void setUnit​(java.lang.Object oUnit)
      • isExpandMinmax

        public boolean isExpandMinmax()
        Returns:
        Returns the bExpandMinmax.
      • setExpandMinmax

        public void setExpandMinmax​(boolean expandMinmax)
        Parameters:
        expandMinmax - The bExpandMinmax to set.