Class ExtendedScale

  • All Implemented Interfaces:
    HasLabels, IsDefaultScale

    public final class ExtendedScale
    extends Scale
    Scale options used internally inside the chart configuration.
    Extends the normal scale options with all methods to add callbacks and events.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • ExtendedScale

        public ExtendedScale​(ConfigurationEnvelop<ScaleId> envelop,
                             AxisType type,
                             AxisKind kind,
                             IsDefaultScale defaultValues)
        Creates a scale with default provider.
        The native object is created empty.
        Parameters:
        envelop - envelop with the scale id
        type - scale type
        kind - kind of axis
        defaultValues - default provider.
      • ExtendedScale

        public ExtendedScale​(ConfigurationEnvelop<Scale> envelop,
                             IsDefaultScale defaultValues)
        Creates a scale with the chart options scale as inner object.
        Parameters:
        envelop - envelop with the scale of chart options
        defaultValues - default provider.
    • Method Detail

      • getCharbaId

        public int getCharbaId()
        Returns the unique id of scale.
        Returns:
        the unique id of scale
      • setCallback

        public void setCallback​(ConfigurationEnvelop<AbstractNode> envelop,
                                Key property,
                                CallbackProxy.Proxy proxy)
        Adds a callback proxy function to a element node instance.
        Parameters:
        envelop - contains the element node instance to update
        property - property name
        proxy - the function proxy to activate
      • setCallback

        public void setCallback​(ConfigurationEnvelop<AbstractNode> envelop,
                                Key property,
                                NativeCallback callback)
        Adds a native callback function to a element node instance.
        Parameters:
        envelop - contains the element node instance to update
        property - property name
        callback - the function callback to activate
      • getRemappedOptions

        public final <T extends NativeObjectContainer> T getRemappedOptions​(ControllerMapperFactory<T> factory)
        Returns the options, mapped with a custom object, used for controllers to map the options.
        It uses a factory instance to create a customized options.
        If factory argument is not consistent, null is returned.
        Type Parameters:
        T - type of customized options to return
        Parameters:
        factory - factory instance to create a customized options
        Returns:
        customized options.
        If factory argument is not consistent, null is returned.