Class AbstractLayoutControl

    • Constructor Detail

      • AbstractLayoutControl

        public AbstractLayoutControl​(Layout<?> layout)
        Layout constructor with a default info model and enableable.
        Parameters:
        layout - The layout definition for the layout component.
        Throws:
        java.lang.NullPointerException - if the given layout is null.
      • AbstractLayoutControl

        public AbstractLayoutControl​(InfoModel infoModel,
                                     Enableable enableable,
                                     Layout<?> layout)
        Info model, enableable, and layout constructor.
        Parameters:
        infoModel - The component info model.
        enableable - The enableable object in which to store enabled status.
        layout - The layout definition for the layout component.
        Throws:
        java.lang.NullPointerException - if the given info model, enableable, and/or layout is null.
    • Method Detail

      • getEnableable

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

        public Control.Status getStatus()
        Specified by:
        getStatus in interface Control
        Returns:
        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.
        Parameters:
        newStatus - The new status of the current user input, or null if there is no status to report.
        See Also:
        Control.STATUS_PROPERTY
      • updateStatus

        protected void updateStatus()
        Rechecks user input status of this component, and updates the status.
        See Also:
        setStatus(Control.Status)
      • 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.

        Overrides:
        updateValid in class AbstractComponent
        See Also:
        updateStatus()
      • setNotification

        public void setNotification​(Notification newNotification)
        Description copied from interface: Component
        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.
        Specified by:
        setNotification in interface Component
        Overrides:
        setNotification in class AbstractComponent
        Parameters:
        newNotification - The notification for the component, or null if no notification is associated with this component.
        See Also:
        Component.NOTIFICATION_PROPERTY
      • enabledPropertyChange

        protected void enabledPropertyChange​(boolean oldValue,
                                             boolean newValue)
        Called when the enabled property changes. Child versions should call this version. This version clears any notifications and updates the valid status.
        Parameters:
        oldValue - The old value of the property.
        newValue - The new value of the property.
        See Also:
        setNotification(Notification), updateValid()
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface Enableable
        Returns:
        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
        Parameters:
        newEnabled - true if the object should indicate and accept user input.
        See Also:
        Enableable.ENABLED_PROPERTY