Class AbstractModel<P extends AbstractModel<?,​?>,​D>

    • Method Detail

      • getParent

        protected final P getParent()
        Returns the parent element.
        Returns:
        the parent or null if is a root element.
      • getDefaultValues

        protected final D getDefaultValues()
        Returns the default provider instance.
        Returns:
        the default provider instance.
      • setEventToModel

        protected final void setEventToModel​(AbstractNode model,
                                             Key key,
                                             CallbackProxy.Proxy proxy)
        Adds a proxy function (for events) to a model at the specific key.
        Parameters:
        model - element where adding the function proxy
        key - property name to use to add the function proxy
        proxy - the function proxy instance to add
      • setCallbackToModel

        protected final void setCallbackToModel​(AbstractNode model,
                                                Key key,
                                                CallbackProxy.Proxy proxy)
        Adds a proxy function (for callbacks) to a model at the specific key.
        Parameters:
        model - element where adding the function proxy
        key - property name to use to add the function proxy
        proxy - the function proxy instance to add
      • setCallbackToModel

        protected final void setCallbackToModel​(AbstractNode model,
                                                Key key,
                                                NativeCallback callback)
        Adds a native callback function to a model at the specific key.
        Parameters:
        model - element where adding the function callback
        key - property name to use to add the function callback
        callback - the function callback instance to add
      • loadPadding

        protected final Padding loadPadding​(Key property,
                                            IsDefaultPadding defaultPadding)
        Loads the padding size or object from the abstract model, replacing the property, if is a number, with the object which is returned.
        Parameters:
        property - property where the padding is stored inside the model.
        defaultPadding - default padding instance
        Returns:
        a padding object, attached to this model