Class PercentageAxisModel

    • Field Detail

      • m_Flipped

        protected boolean m_Flipped
        whether the axis is flipped.
    • Constructor Detail

      • PercentageAxisModel

        public PercentageAxisModel()
    • Method Detail

      • assign

        public void assign​(AbstractAxisModel model)
        Obtains the necessary values from the given model and updates itself.
        Overrides:
        assign in class AbstractAxisModel
        Parameters:
        model - the model to get the parameters from
      • canHandle

        public boolean canHandle​(double min,
                                 double max)
        Checks whether the data range can be handled by the model.
        Specified by:
        canHandle in class AbstractAxisModel
        Parameters:
        min - the minimum value
        max - the maximum value
        Returns:
        always true
      • adjustMinimum

        public double adjustMinimum​(double min)
        Adjusts the minimum to work with this model.
        Specified by:
        adjustMinimum in class AbstractAxisModel
        Parameters:
        min - the minimum to adjust
        Returns:
        the updated value
      • adjustMaximum

        public double adjustMaximum​(double max)
        Adjusts the maximum to work with this model.
        Specified by:
        adjustMaximum in class AbstractAxisModel
        Parameters:
        max - the maximum to adjust
        Returns:
        the updated value
      • setFlipped

        public void setFlipped​(boolean value)
        Sets whether to flip the axis.
        Specified by:
        setFlipped in interface FlippableAxisModel
        Parameters:
        value - if true the axis gets flipped
      • isFlipped

        public boolean isFlipped()
        Returns whether the axis is flipped.
        Specified by:
        isFlipped in interface FlippableAxisModel
        Returns:
        true if the axis is flipped
      • doValueToDisplay

        protected String doValueToDisplay​(double value)
        Returns the display string of the value for the tooltip, for instance.
        Specified by:
        doValueToDisplay in class AbstractAxisModel
        Parameters:
        value - the value to turn into string
        Returns:
        the display string
      • valueToPos

        public int valueToPos​(double value)
        Returns the position on the axis for the given value.
        Specified by:
        valueToPos in class AbstractAxisModel
        Parameters:
        value - the value to get the position for
        Returns:
        the corresponding position
      • posToValue

        public double posToValue​(int pos)
        Returns the value for the given position on the axis.
        Specified by:
        posToValue in class AbstractAxisModel
        Parameters:
        pos - the position to get the corresponding value for
        Returns:
        the corresponding value
      • pushZoom

        public void pushZoom​(double min,
                             double max)
        Adds the zoom to its internal list and updates the axis.
        Overrides:
        pushZoom in class AbstractAxisModel
        Parameters:
        min - the minimum of the zoom
        max - the maximum of the zoom