Class BooleanValueControlSelectControl<V>

    • Field Detail

      • componentValueChangeListener

        protected final com.globalmentor.beans.GenericPropertyChangeListener<java.lang.Boolean> componentValueChangeListener
        The listener that detects changes to a child component's Boolean value and updates the control's selected values accordingly.
      • synchronizingValuesFlag

        protected final java.util.concurrent.atomic.AtomicBoolean synchronizingValuesFlag
        The atomic flag that allows us to know whether we're synchronizing values, either from the list to the child controls or vice versa.
    • Constructor Detail

      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass)
        Value class constructor with a default data model to represent a given type with multiple selection and a FlowLayout with Flow.PAGE flow.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        Throws:
        java.lang.NullPointerException - if the given value class is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
        Value class and value representation strategy constructor with a default data model to represent a given type with multiple selection and a FlowLayout with Flow.PAGE flow.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        valueRepresentationStrategy - The strategy to create label models to represent this model's values.
        Throws:
        java.lang.NullPointerException - if the given value class and/or value representation strategy is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                ListSelectionPolicy<V> selectionStrategy)
        Value class and selection strategy constructor with a default data model to represent a given type and a FlowLayout with Flow.PAGE flow.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        selectionStrategy - The strategy for selecting values in the model.
        Throws:
        java.lang.NullPointerException - if the given value class and/or selection strategy is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                ListSelectionPolicy<V> selectionStrategy,
                                                ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
        Value class, selection strategy, and value representation strategy constructor with a default data model to represent a given type and a FlowLayout with Flow.PAGE flow.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        selectionStrategy - The strategy for selecting values in the model.
        valueRepresentationStrategy - The strategy to create label models to represent this model's values.
        Throws:
        java.lang.NullPointerException - if the given value class, selection strategy, and/or value representation strategy is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(ListSelectModel<V> listSelectModel)
        List select model constructor with a FlowLayout with Flow.PAGE flow.
        Parameters:
        listSelectModel - The component list select model.
        Throws:
        java.lang.NullPointerException - if the given list select model is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(ListSelectModel<V> listSelectModel,
                                                ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
        List select model and value representation strategy constructor with a FlowLayout with Flow.PAGE flow.
        Parameters:
        listSelectModel - The component list select model.
        valueRepresentationStrategy - The strategy to create label models to represent this model's values.
        Throws:
        java.lang.NullPointerException - if the given list select model and/or value representation strategy is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                Layout<?> layout)
        Value class and layout constructor with a default data model to represent a given type with multiple selection.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        layout - The layout definition for the component.
        Throws:
        java.lang.NullPointerException - if the given value class and/or layout is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                Layout<?> layout,
                                                ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
        Value class, layout, and value representation strategy constructor with a default data model to represent a given type with multiple selection.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        valueRepresentationStrategy - The strategy to create label models to represent this model's values.
        layout - The layout definition for the component.
        Throws:
        java.lang.NullPointerException - if the given value class, layout, and/or value representation strategy is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                ListSelectionPolicy<V> selectionStrategy,
                                                Layout<?> layout)
        Value class, selection strategy, and layout constructor with a default data model to represent a given type.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        selectionStrategy - The strategy for selecting values in the model.
        layout - The layout definition for the component.
        Throws:
        java.lang.NullPointerException - if the given value class, selection strategy, and/or layout is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(java.lang.Class<V> valueClass,
                                                ListSelectionPolicy<V> selectionStrategy,
                                                Layout<?> layout,
                                                ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
        Value class, selection strategy, layout, and value representation strategy constructor with a default data model to represent a given type.
        Parameters:
        valueClass - The class indicating the type of value held in the model.
        selectionStrategy - The strategy for selecting values in the model.
        layout - The layout definition for the component.
        valueRepresentationStrategy - The strategy to create label models to represent this model's values.
        Throws:
        java.lang.NullPointerException - if the given value class, selection strategy, layout, and/or value representation strategy is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(ListSelectModel<V> listSelectModel,
                                                Layout<?> layout)
        List select model and layout constructor.
        Parameters:
        listSelectModel - The component list select model.
        layout - The layout definition for the component.
        Throws:
        java.lang.NullPointerException - if the given list select model and/or layout is null.
      • BooleanValueControlSelectControl

        public BooleanValueControlSelectControl​(ListSelectModel<V> listSelectModel,
                                                Layout<?> layout,
                                                ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
        List select model, layout, and value representation strategy constructor.
        Parameters:
        listSelectModel - The component list select model.
        layout - The layout definition for the component.
        valueRepresentationStrategy - The strategy to create label models to represent this model's values.
        Throws:
        java.lang.NullPointerException - if the given list select model, layout, and/or value representation strategy is null.
    • Method Detail

      • setLayout

        protected <T extends Constraints> void setLayout​(Layout<T> newLayout)
        Sets the layout definition for the component. This is a bound property. The layout is marked as not yet having a theme applied, as the specific theme rules applied to the layout may depend on the layout's owner.
        Type Parameters:
        T - The type of the constraint.
        Parameters:
        newLayout - The new layout definition for the container.
        Throws:
        java.lang.NullPointerException - if the given layout is null.
        See Also:
        LayoutComponent.LAYOUT_PROPERTY
      • isLayoutThemeApplied

        public boolean isLayoutThemeApplied()
        Specified by:
        isLayoutThemeApplied in interface LayoutComponent
        Returns:
        Whether a theme has been applied to this component's layout.
      • getValuePolicyModelGroup

        protected ValuePolicyModelGroup<java.lang.Boolean> getValuePolicyModelGroup()
        Returns:
        The value policy model group for boolean value models, or null if there is no value policy model group in use.
      • updateListSelectedValues

        protected void updateListSelectedValues()
        Updates the list selected values based upon the current values of the child controls.
      • updateChildControlValues

        protected void updateChildControlValues()
        Updates the values of child controls based upon the current state of the list selected values.
      • resetTheme

        public void resetTheme()
        Resets this object's theme. This method sets to false the state of whether a theme has been applied to this object. This method is called for any child components resetting its own theme. No new theme is actually loaded. There is normally no need to override this method or to call this method directly by applications.

        This version recursively calls the AbstractCompositeComponent.resetTheme() method of all child components before resetting the theme of this component.

        This version resets the theme of the given layout.

        Specified by:
        resetTheme in interface Component
        Overrides:
        resetTheme in class AbstractCompositeComponent
        See Also:
        Component.setThemeApplied(boolean)
      • updateTheme

        public void updateTheme()
                         throws java.io.IOException
        Updates this object's theme. This method checks whether a theme has been applied to this object. If a theme has not been applied to this object this method calls Component.applyTheme(). This method is called for any child components before applying the theme to the component itself, to assure that child theme updates have already occurred before theme updates occur for this component. There is normally no need to override this method or to call this method directly by applications.

        This version recursively calls the AbstractCompositeComponent.updateTheme() method of all child components before updating the theme of this component.

        This version checks to see if the theme needs to be applied to the given layout.

        Specified by:
        updateTheme in interface Component
        Overrides:
        updateTheme in class AbstractCompositeComponent
        Throws:
        java.io.IOException - if there was an error loading or applying a theme.
        See Also:
        Component.isThemeApplied(), Component.applyTheme()
      • applyTheme

        public void applyTheme()
                        throws java.io.IOException
        Applies the theme to this object. Themes are only applied of the application is themed. This method may be overridden to effectively override theme settings by ensuring the state of important properties after the theme has been set. If the theme is successfully applied, this method updates the theme applied status.

        This version applies the theme to the current layout and updates the layout theme applied status.

        Specified by:
        applyTheme in interface Component
        Overrides:
        applyTheme in class AbstractComponent
        Throws:
        java.io.IOException - if there was an error loading or applying a theme.
        See Also:
        GuiseApplication.isThemed(), Component.getTheme(), Component.applyTheme(Theme), Component.setThemeApplied(boolean)
      • applyTheme

        public void applyTheme​(Theme theme)
        Description copied from interface: Component
        Applies a theme and its parents to this object. The theme's rules will be applied to this object and any related objects. Theme application occurs unconditionally, regardless of whether themes have been applied to this component before. There is normally no need to call this method directly by applications.
        Specified by:
        applyTheme in interface Component
        Overrides:
        applyTheme in class AbstractComponent
        Parameters:
        theme - The theme to apply to the object.