Class AbstractControl

    • Constructor Detail

      • AbstractControl

        public AbstractControl​(InfoModel infoModel,
                               Enableable enableable)
        Info model and enableable object constructor.
        infoModel - The component info model.
        enableable - The enableable object in which to store enabled status.
        java.lang.NullPointerException - if the given info model and/or enableable object is null.
    • Method Detail

      • getEnableable

        protected Enableable getEnableable()
        The enableable object decorated by this component.
      • getStatus

        public Control.Status getStatus()
        Specified by:
        getStatus in interface Control
        The status of the current user input, or null if there is no status to report.
      • setStatus

        protected void setStatus​(Control.Status newStatus)
        Sets the status of the current user input. This is a bound property.
        newStatus - The new status of the current user input, or null if there is no status to report.
        See Also:
      • updateStatus

        protected void updateStatus()
        Rechecks user input status of this component, and updates the status.
        See Also:
      • updateValid

        protected void updateValid()
        Rechecks user input validity of this component and all child components, and updates the valid state. This implementation only updates the valid property if the property is already initialized or there is at least one listener to the Component.VALID_PROPERTY.

        This version also updates the status.

        updateValid in class AbstractComponent
        See Also:
      • setNotification

        public void setNotification​(Notification newNotification)
        Sets the component notification. This is a bound property. The notification is also fired as a NotificationEvent on this component if a new notification is given. Parents are expected to refire the notification event up the hierarchy.

        This version updates the component status if the notification changes.

        Specified by:
        setNotification in interface Component
        setNotification in class AbstractComponent
        newNotification - The notification for the component, or null if no notification is associated with this component.
        See Also:
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface Enableable
        Whether the object is enabled and can receive user input.
      • setEnabled

        public void setEnabled​(boolean newEnabled)
        Description copied from interface: Enableable
        Sets whether the object is enabled and can receive user input. This is a bound property of type Boolean.
        Specified by:
        setEnabled in interface Enableable
        newEnabled - true if the object should indicate and accept user input.
        See Also: