Class ViewAttributesHandler<W,​V extends org.kie.workbench.common.stunner.core.client.shape.view.ShapeView>

  • Type Parameters:
    W - The domain's object type.
    V - The shape view type.
    All Implemented Interfaces:
    org.kie.workbench.common.stunner.core.client.shape.view.ShapeViewHandler<W,​V>

    public class ViewAttributesHandler<W,​V extends org.kie.workbench.common.stunner.core.client.shape.view.ShapeView>
    extends Object
    implements org.kie.workbench.common.stunner.core.client.shape.view.ShapeViewHandler<W,​V>
    The default view attributes handler to generic shape views.

    It allows specifying functions which provide the different view attributes managed by this handler, like colors or borders, by having as an input the domain object's instance.

    This way view attribute values can be the ones present in some instance's property value, or just some hardcoded ones.

    If domain object's instance property values are not present (can be null), this handler does not apply updates to the view, so the default attributes from the view will be the ones used to render it.

    • Method Detail

      • handle

        public void handle​(W element,
                           V view)
        Specified by:
        handle in interface org.kie.workbench.common.stunner.core.client.shape.view.ShapeViewHandler<W,​V extends org.kie.workbench.common.stunner.core.client.shape.view.ShapeView>