Class ControlDescriptor

    • Constructor Detail

      • ControlDescriptor

        protected ControlDescriptor​(String id,
                                    ControlDescriptor.Category category,
                                    int index)
        Create a ControlDescriptor.
        Parameters:
        id - the ID (must be a valid control ID)
        category - the category
        index - the index within the category (used for ordering - must be unique)
    • Method Detail

      • getID

        public final String getID()
        Get the ID.
        Returns:
        id
      • getIndex

        public int getIndex()
        Get the index.
        Returns:
        index
      • getInfo

        public abstract ControlInfo getInfo()
        Get the control info for this control.
        Returns:
        info
      • attach

        public abstract void attach​(CodeContext<?> context,
                                    Control previous)
        Configure the control for the provided context during attachment. The previous control with the same ID is provided - it may be null or of a different type.

        Note : any control passed in as previous will not be disposed

        Parameters:
        context - context being attached to
        previous - previous control with same ID, may be null or different type
      • getControl

        public abstract Control getControl()
        Get the wrapped control. Should only be called when attached - behaviour is otherwise undefined.
        Returns:
        control
      • reset

        public void reset​(boolean full)
        Hook called to reset during attachment / detachment, or execution context state changes. Full reset happens on execution context changes.
        Parameters:
        full - true if execution context state
      • stopping

        @Deprecated
        public void stopping()
        Deprecated.
        Deprecated hook - no op!
      • dispose

        public void dispose()
        Hook called on code context disposal for any control descriptors not carried over.