Interface AxisType

  • All Superinterfaces:
    Key, PropertyKey
    All Known Implementing Classes:
    ChartAxisType

    public interface AxisType
    extends PropertyKey
    Represents the scale type of a scale/axis object.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • create

        static AxisType create​(String type,
                               ChartAxisType baseType)
        Returns a axis type by its string value and extended existing axis type.
        It uses the ScaleDataType and default ScaleId of extended axis type.
        Parameters:
        type - scale type
        baseType - base type (extended) for axis type
        Returns:
        new scale type instance
      • create

        static AxisType create​(String type,
                               ChartAxisType baseType,
                               ScaleId defaultScaleId)
        Returns a axis type by its string value, extended existing axis type and default ScaleId.
        It uses the ScaleDataType of extended axis type.
        Parameters:
        type - scale type
        baseType - base type (extended) for axis type
        defaultScaleId - default scale id for this axis type
        Returns:
        new scale type instance
      • create

        static AxisType create​(String type,
                               ChartAxisType baseType,
                               ScaleId defaultScaleId,
                               ScaleDataType dataType)
        Returns a axis type by all needed objects to create a axis type.
        Parameters:
        type - scale type
        baseType - base type (extended) for axis type
        defaultScaleId - default scale id for this axis type
        dataType - type of data which the scale can manage
        Returns:
        new scale type instance
      • register

        static void register​(AxisType type)
        Registers the passed axis type.
        Parameters:
        type - axis type
      • register

        static void register​(AxisType type,
                             boolean force)
        Registers the passed axis type, with possibility to force the registration if already registered.
        Parameters:
        type - axis type
        force - if true, the axis type is register even if already registered.
      • isValid

        static boolean isValid​(AxisType type)
        Returns true if scale type passed as argument is not null and its value is not null as well and could be a valid scale type.
        Parameters:
        type - scale type to be checked
        Returns:
        true if scale type passed as argument is not null and its value is not null as well and could be a valid scale type.
      • checkIfValid

        static void checkIfValid​(AxisType type)
        Checks if scale type passed as argument is not null and its value is not null as well and could be a valid scale type.
        If not, throw a IllegalArgumentException.
        Parameters:
        type - scale type to be checked
      • checkAndGetIfValid

        static <T extends AxisType> T checkAndGetIfValid​(T type)
        Checks if key passed as argument is a valid AxisType.
        If not, throw a IllegalArgumentException, otherwise it returns the key.
        Type Parameters:
        T - type of axis
        Parameters:
        type - axis type to be checked
        Returns:
        the same axis type passed as argument
      • getBaseType

        AxisType getBaseType()
        Returns the base type (extended) for this axis type.
        Returns:
        the base type (extended) for this axis type
      • getDefaultScaleId

        ScaleId getDefaultScaleId()
        Returns the default scale id for this axis type.
        Returns:
        the default scale id for this axis type
      • getDataType

        ScaleDataType getDataType()
        Returns the type of managed data for this axis type.
        Returns:
        the type of managed data for this axis type