Class AxisPositionItem


  • public final class AxisPositionItem
    extends NativeObjectContainer
    This item is used to define the position of an axis related to a value of another axis.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • AxisPositionItem

        public AxisPositionItem​(OptionsEnvelop<NativeObject> envelop)
        Creates the item using an envelop of native java script object which contains all properties.
        Parameters:
        envelop - envelop of native java script object which contains all properties.
      • AxisPositionItem

        public AxisPositionItem​(ScaleId id,
                                double value)
        Creates an item with the position.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • AxisPositionItem

        public AxisPositionItem​(String id,
                                double value)
        Creates an item with the position.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • AxisPositionItem

        public AxisPositionItem​(ScaleId id,
                                String value)
        Creates an item with the position.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • AxisPositionItem

        public AxisPositionItem​(String id,
                                String value)
        Creates an item with the position.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • AxisPositionItem

        public AxisPositionItem​(ScaleId id,
                                Date value)
        Creates an item with the position.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • AxisPositionItem

        public AxisPositionItem​(String id,
                                Date value)
        Creates an item with the position.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • AxisPositionItem

        public AxisPositionItem()
        Creates an empty item.
    • Method Detail

      • getScaleId

        public ScaleId getScaleId()
        Returns the scale id set for positioning.
        Returns:
        the scale id set for positioning
      • getValue

        public double getValue()
        Returns the value on the axis used for positioning.
        Returns:
        the value on the axis used for positioning
      • getValueAsString

        public String getValueAsString()
        Returns the value on the axis used for positioning.
        Returns:
        the value on the axis used for positioning
      • getValueAsDate

        public Date getValueAsDate()
        Returns the value on the axis used for positioning.
        Returns:
        the value on the axis used for positioning
      • setPosition

        public void setPosition​(ScaleId id,
                                double value)
        Sets the position of another scale.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • setPosition

        public void setPosition​(String id,
                                double value)
        Sets the position of another scale.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • setPosition

        public void setPosition​(ScaleId id,
                                String value)
        Sets the position of another scale.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • setPosition

        public void setPosition​(String id,
                                String value)
        Sets the position of another scale.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • setPosition

        public void setPosition​(ScaleId id,
                                Date value)
        Sets the position of another scale.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • setPosition

        public void setPosition​(String id,
                                Date value)
        Sets the position of another scale.
        Parameters:
        id - scale id to use for positioning
        value - value of the scale id to use as position
      • isConsistent

        public boolean isConsistent()
        Returns true if the item is consistent.
        Returns:
        true if the item is consistent
      • nativeObject

        public NativeObject nativeObject()
        Returns the native object instance.
        Returns:
        the native object instance.