Package io.guise.framework.component
Class BooleanValueControlSelectControl<V>
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
io.guise.framework.event.GuiseBoundPropertyObject
io.guise.framework.model.ui.AbstractPresentationModel
io.guise.framework.component.AbstractComponent
io.guise.framework.component.AbstractCompositeComponent
io.guise.framework.component.AbstractMultipleCompositeComponent
io.guise.framework.component.AbstractCompositeStateComponent<T,S>
io.guise.framework.component.AbstractCompositeStateControl<V,AbstractListSelectControl.ValueComponentState>
io.guise.framework.component.AbstractListSelectControl<V>
io.guise.framework.component.BooleanValueControlSelectControl<V>
- Type Parameters:
V
- The type of values to select.
- All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
,com.globalmentor.model.MutableValued<V>
,com.globalmentor.model.Valued<V>
,io.clogr.Clogged
,Component
,CompositeComponent
,Control
,InputFocusableComponent
,LayoutComponent
,ListSelectControl<V>
,SelectControl<V>
,ValueControl<V>
,ValuedComponent<V>
,ListListenable<V>
,Displayable
,Enableable
,InfoModel
,LabelModel
,ListSelectModel<V>
,Model
,SelectModel<V>
,PresentationModel
,ValueModel<V>
,DepictedObject
,Iterable<V>
,Collection<V>
,List<V>
public class BooleanValueControlSelectControl<V>
extends AbstractListSelectControl<V>
implements LayoutComponent, ListSelectControl<V>
A list select control that uses child components to show the list items. Only
ValueControl
s of type Boolean
will be recognized as able to
receive user input to select items in the list. Only a Layout
that supports default constraints can be used.- Author:
- Garret Wilson
-
Nested Class Summary
Nested classes/interfaces inherited from class io.guise.framework.component.AbstractListSelectControl
AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy<VV>, AbstractListSelectControl.DefaultValueRepresentationStrategy<VV>, AbstractListSelectControl.ValueComponentState
Nested classes/interfaces inherited from class io.guise.framework.component.AbstractCompositeStateComponent
AbstractCompositeStateComponent.ComponentState
Nested classes/interfaces inherited from class io.guise.framework.component.AbstractComponent
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component>
Nested classes/interfaces inherited from interface io.guise.framework.component.Component
Component.FlyoverStrategy<S extends Component>
Nested classes/interfaces inherited from interface io.guise.framework.component.Control
Control.Status
Nested classes/interfaces inherited from interface io.guise.framework.component.ListSelectControl
ListSelectControl.ValueRepresentationStrategy<VV>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final com.globalmentor.beans.GenericPropertyChangeListener<Boolean>
The listener that detects changes to a child component'sBoolean
value and updates the control's selected values accordingly.protected final AtomicBoolean
The atomic flag that allows us to know whether we're synchronizing values, either from the list to the child controls or vice versa.Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
Fields inherited from interface io.guise.framework.component.Component
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY
Fields inherited from interface io.guise.framework.component.Control
STATUS_PROPERTY
Fields inherited from interface io.guise.framework.model.Displayable
DISPLAYED_PROPERTY
Fields inherited from interface io.guise.framework.model.Enableable
ENABLED_PROPERTY
Fields inherited from interface io.guise.framework.model.InfoModel
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY
Fields inherited from interface io.guise.framework.model.LabelModel
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY
Fields inherited from interface io.guise.framework.component.LayoutComponent
LAYOUT_PROPERTY, LAYOUT_THEME_APPLIED_PROPERTY
Fields inherited from interface io.guise.framework.model.ui.PresentationModel
BACKGROUND_COLOR_PROPERTY, BORDER_LINE_FAR_COLOR_PROPERTY, BORDER_LINE_FAR_EXTENT_PROPERTY, BORDER_LINE_FAR_STYLE_PROPERTY, BORDER_LINE_NEAR_COLOR_PROPERTY, BORDER_LINE_NEAR_EXTENT_PROPERTY, BORDER_LINE_NEAR_STYLE_PROPERTY, BORDER_PAGE_FAR_COLOR_PROPERTY, BORDER_PAGE_FAR_EXTENT_PROPERTY, BORDER_PAGE_FAR_STYLE_PROPERTY, BORDER_PAGE_NEAR_COLOR_PROPERTY, BORDER_PAGE_NEAR_EXTENT_PROPERTY, BORDER_PAGE_NEAR_STYLE_PROPERTY, CORNER_LINE_FAR_PAGE_FAR_ARC_SIZE_PROPERTY, CORNER_LINE_FAR_PAGE_NEAR_ARC_SIZE_PROPERTY, CORNER_LINE_NEAR_PAGE_FAR_ARC_SIZE_PROPERTY, CORNER_LINE_NEAR_PAGE_NEAR_ARC_SIZE_PROPERTY, CURSOR_PROPERTY, FONT_FAMILIES_PROPERTY, FONT_SIZE_PROPERTY, FONT_STYLE_PROPERTY, FONT_WEIGHT_BOLD, FONT_WEIGHT_NORMAL, FONT_WEIGHT_PROPERTY, LABEL_FONT_FAMILIES_PROPERTY, LABEL_FONT_SIZE_PROPERTY, LABEL_FONT_STYLE_PROPERTY, LABEL_FONT_WEIGHT_PROPERTY, LABEL_TEXT_COLOR_PROPERTY, LINE_EXTENT_PROPERTY, MARGIN_LINE_FAR_EXTENT_PROPERTY, MARGIN_LINE_NEAR_EXTENT_PROPERTY, MARGIN_PAGE_FAR_EXTENT_PROPERTY, MARGIN_PAGE_NEAR_EXTENT_PROPERTY, OPACITY_PROPERTY, PADDING_LINE_FAR_EXTENT_PROPERTY, PADDING_LINE_NEAR_EXTENT_PROPERTY, PADDING_PAGE_FAR_EXTENT_PROPERTY, PADDING_PAGE_NEAR_EXTENT_PROPERTY, PAGE_EXTENT_PROPERTY, ROUNDED_CORNER_ARC_SIZE, STYLE_ID_PROPERTY, TEXT_COLOR_PROPERTY, TOOLTIP_ENABLED_PROPERTY, VISIBLE_PROPERTY
Fields inherited from interface io.guise.framework.component.SelectControl
VALUE_REPRESENTATION_STRATEGY_PROPERTY
Fields inherited from interface io.guise.framework.component.ValueControl
CONVERTER_PROPERTY
Fields inherited from interface io.guise.framework.model.ValueModel
VALIDATOR_PROPERTY, VALUE_PROPERTY
-
Constructor Summary
ConstructorDescriptionBooleanValueControlSelectControl
(ListSelectModel<V> listSelectModel) List select model constructor with aFlowLayout
withFlow.PAGE
flow.BooleanValueControlSelectControl
(ListSelectModel<V> listSelectModel, Layout<?> layout) List select model and layout constructor.BooleanValueControlSelectControl
(ListSelectModel<V> listSelectModel, Layout<?> layout, ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy) List select model, layout, and value representation strategy constructor.BooleanValueControlSelectControl
(ListSelectModel<V> listSelectModel, ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy) List select model and value representation strategy constructor with aFlowLayout
withFlow.PAGE
flow.BooleanValueControlSelectControl
(Class<V> valueClass) Value class constructor with a default data model to represent a given type with multiple selection and aFlowLayout
withFlow.PAGE
flow.BooleanValueControlSelectControl
(Class<V> valueClass, Layout<?> layout) Value class and layout constructor with a default data model to represent a given type with multiple selection.BooleanValueControlSelectControl
(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.BooleanValueControlSelectControl
(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 aFlowLayout
withFlow.PAGE
flow.BooleanValueControlSelectControl
(Class<V> valueClass, ListSelectionPolicy<V> selectionStrategy) Value class and selection strategy constructor with a default data model to represent a given type and aFlowLayout
withFlow.PAGE
flow.BooleanValueControlSelectControl
(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.BooleanValueControlSelectControl
(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.BooleanValueControlSelectControl
(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 aFlowLayout
withFlow.PAGE
flow. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addComponent
(Component childComponent) Adds a child component.void
Applies the theme to this object.void
applyTheme
(Theme theme) Applies a theme and its parents to this object.Layout<? extends Constraints>
protected ValuePolicyModelGroup<Boolean>
boolean
protected void
removeComponent
(Component childComponent) Removes a child component.void
Resets this object's theme.protected <T extends Constraints>
voidSets the layout definition for the component.void
setLayoutThemeApplied
(boolean newLayoutThemeApplied) Sets whether a theme has been applied to this component's layout.protected void
Updates the values of child controls based upon the current state of the list selected values.protected void
Updates the list selected values based upon the current values of the child controls.void
Updates this object's theme.Methods inherited from class io.guise.framework.component.AbstractListSelectControl
add, add, addAll, addAll, addListListener, addListSelectionListener, addSelectedIndexes, clear, clearValue, contains, containsAll, createComponentState, determineValid, fireListModified, firePropertyChange, fireSelectionChanged, get, getComponent, getDefaultValue, getListSelectModel, getSelectedIndex, getSelectedIndexes, getSelectedValue, getSelectedValues, getSelectionPolicy, getValidator, getValue, getValueClass, getValueRepresentationStrategy, indexOf, isEmpty, isIndexDisplayed, isIndexEnabled, isValidValue, isValueDisplayed, isValueEnabled, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeListListener, removeListSelectionListener, removeSelectedIndexes, replace, reset, resetValue, retainAll, set, setIndexDisplayed, setIndexEnabled, setSelectedIndexes, setSelectedValues, setValidator, setValue, setValueDisplayed, setValueEnabled, setValueRepresentationStrategy, size, subList, toArray, toArray, validate, validateValue
Methods inherited from class io.guise.framework.component.AbstractCompositeStateControl
determineStatus, getEnableable, getStatus, isEnabled, setEnabled, setNotification, setStatus, updateStatus, updateValid
Methods inherited from class io.guise.framework.component.AbstractCompositeStateComponent
clearComponentStates, determineComponentState, getComponentState, getComponentStates, getObject, putComponentState, removeComponentState
Methods inherited from class io.guise.framework.component.AbstractMultipleCompositeComponent
hasChildComponents
Methods inherited from class io.guise.framework.component.AbstractCompositeComponent
addCompositeComponentListener, childComponentValidPropertyChanged, determineChildrenValid, dispatchInputEvent, dispatchInputEvent, fireChildComponentAdded, fireChildComponentAdded, fireChildComponentRemoved, fireChildComponentRemoved, initializeChildComponent, loadPreferences, removeCompositeComponentListener, savePreferences, uninitializeChildComponent, validateChildren
Methods inherited from class io.guise.framework.component.AbstractComponent
addCommandListener, addExportStrategy, addImportStrategy, addKeyListener, addMouseListener, addNotificationListener, addPreferenceProperty, depict, equals, exportTransfer, fireInputEvent, fireNotified, fireNotified, getAncestor, getCommandListeners, getComponentByID, getComponentByName, getComponentOrientation, getConstraints, getDepictID, getDepictor, getDescription, getDescriptionContentType, getDirtyComponents, getDirtyComponents, getEventListenerManager, getFlyoverStrategy, getGlyphURI, getInfo, getInfoContentType, getInfoModel, getInputStrategy, getKeyListeners, getLabel, getLabelContentType, getMouseListeners, getName, getNotification, getNotifications, getNotifications, getOrientation, getParent, getPreferenceProperties, getRootComponent, getTheme, hasAncestor, hasCommandListeners, hashCode, hasKeyListeners, hasMouseListeners, importTransfer, initialize, isDragEnabled, isDropEnabled, isFlyoverEnabled, isPreferenceProperty, isThemeApplied, isValid, notify, processEvent, removeCommandListener, removeExportStrategy, removeImportStrategy, removeKeyListener, removeMouseListener, removeNotificationListener, removePreferenceProperty, setConstraints, setDepicted, setDescription, setDescriptionContentType, setDragEnabled, setDropEnabled, setFlyoverEnabled, setFlyoverStrategy, setGlyphURI, setInfo, setInfoContentType, setInputStrategy, setLabel, setLabelContentType, setName, setOrientation, setParent, setThemeApplied, setValid, toString, update
Methods inherited from class io.guise.framework.model.ui.AbstractPresentationModel
BorderLineFarColor, BorderLineFarExtent, BorderLineFarStyle, BorderLineNearColor, BorderLineNearExtent, BorderLineNearStyle, BorderPageFarColor, BorderPageFarExtent, BorderPageFarStyle, BorderPageNearColor, BorderPageNearExtent, BorderPageNearStyle, getBackgroundColor, getBorderColor, getBorderExtent, getBorderStyle, getCornerArcSize, getCornerLineFarPageFarArcSize, getCornerLineFarPageNearArcSize, getCornerLineNearPageFarArcSize, getCornerLineNearPageNearArcSize, getCursor, getExtent, getFontFamilies, getFontSize, getFontStyle, getFontWeight, getLabelFontFamilies, getLabelFontSize, getLabelFontStyle, getLabelFontWeight, getLabelTextColor, getLineExtent, getMarginExtent, getMarginLineFarExtent, getMarginLineNearExtent, getMarginPageFarExtent, getMarginPageNearExtent, getOpacity, getPaddingExtent, getPaddingLineFarExtent, getPaddingLineNearExtent, getPaddingPageFarExtent, getPaddingPageNearExtent, getPageExtent, getStyleID, getTextColor, isDisplayed, isTooltipEnabled, isVisible, setBackgroundColor, setBorderColor, setBorderColor, setBorderExtent, setBorderExtent, setBorderLineFarColor, setBorderLineFarExtent, setBorderLineFarStyle, setBorderLineNearColor, setBorderLineNearExtent, setBorderLineNearStyle, setBorderPageFarColor, setBorderPageFarExtent, setBorderPageFarStyle, setBorderPageNearColor, setBorderPageNearExtent, setBorderPageNearStyle, setBorderStyle, setBorderStyle, setCornerArcSize, setCornerArcSize, setCornerLineFarPageFarArcSize, setCornerLineFarPageNearArcSize, setCornerLineNearPageFarArcSize, setCornerLineNearPageNearArcSize, setCursor, setDisplayed, setExtent, setFontFamilies, setFontSize, setFontStyle, setFontWeight, setLabelFontFamilies, setLabelFontSize, setLabelFontStyle, setLabelFontWeight, setLabelTextColor, setLineExtent, setMarginExtent, setMarginExtent, setMarginLineFarExtent, setMarginLineNearExtent, setMarginPageFarExtent, setMarginPageNearExtent, setOpacity, setPaddingExtent, setPaddingExtent, setPaddingLineFarExtent, setPaddingLineNearExtent, setPaddingPageFarExtent, setPaddingPageNearExtent, setPageExtent, setStyleID, setTextColor, setTooltipEnabled, setVisible
Methods inherited from class io.guise.framework.event.GuiseBoundPropertyObject
getSession
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.clogr.Clogged
getLogger
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface io.guise.framework.component.Component
addCommandListener, addExportStrategy, addImportStrategy, addKeyListener, addMouseListener, addNotificationListener, addPreferenceProperty, dispatchInputEvent, exportTransfer, fireInputEvent, getAncestor, getComponentOrientation, getConstraints, getDepictor, getFlyoverStrategy, getInputStrategy, getName, getNotification, getOrientation, getParent, getPreferenceProperties, getTheme, hasCommandListeners, hasKeyListeners, hasMouseListeners, importTransfer, initialize, isDragEnabled, isDropEnabled, isFlyoverEnabled, isPreferenceProperty, isThemeApplied, isValid, loadPreferences, notify, removeCommandListener, removeExportStrategy, removeImportStrategy, removeKeyListener, removeMouseListener, removeNotificationListener, removePreferenceProperty, savePreferences, setConstraints, setDragEnabled, setDropEnabled, setFlyoverEnabled, setFlyoverStrategy, setInputStrategy, setName, setNotification, setOrientation, setParent, setThemeApplied, validate
Methods inherited from interface io.guise.framework.component.CompositeComponent
addCompositeComponentListener, hasChildComponents, removeCompositeComponentListener
Methods inherited from interface io.guise.framework.platform.DepictedObject
depict, getDepictID, getSession, processEvent
Methods inherited from interface io.guise.framework.model.Enableable
isEnabled, setEnabled
Methods inherited from interface io.guise.framework.model.InfoModel
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType
Methods inherited from interface io.guise.framework.model.LabelModel
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
Methods inherited from interface io.guise.framework.component.ListSelectControl
getComponent, getValueRepresentationStrategy, setValueRepresentationStrategy
Methods inherited from interface io.guise.framework.model.ListSelectModel
addListListener, addListSelectionListener, addSelectedIndexes, getSelectedIndex, getSelectedIndexes, getSelectionPolicy, isIndexDisplayed, isIndexEnabled, isValueDisplayed, isValueEnabled, removeListListener, removeListSelectionListener, removeSelectedIndexes, setIndexDisplayed, setIndexEnabled, setSelectedIndexes, setValueDisplayed, setValueEnabled
Methods inherited from interface io.guise.framework.model.ui.PresentationModel
BorderLineFarColor, BorderLineFarExtent, BorderLineFarStyle, BorderLineNearColor, BorderLineNearExtent, BorderLineNearStyle, BorderPageFarColor, BorderPageFarExtent, BorderPageFarStyle, BorderPageNearColor, BorderPageNearExtent, BorderPageNearStyle, getBackgroundColor, getBorderColor, getBorderExtent, getBorderStyle, getCornerArcSize, getCornerLineFarPageFarArcSize, getCornerLineFarPageNearArcSize, getCornerLineNearPageFarArcSize, getCornerLineNearPageNearArcSize, getCursor, getExtent, getFontFamilies, getFontSize, getFontStyle, getFontWeight, getLabelFontFamilies, getLabelFontSize, getLabelFontStyle, getLabelFontWeight, getLabelTextColor, getLineExtent, getMarginExtent, getMarginLineFarExtent, getMarginLineNearExtent, getMarginPageFarExtent, getMarginPageNearExtent, getOpacity, getPaddingExtent, getPaddingLineFarExtent, getPaddingLineNearExtent, getPaddingPageFarExtent, getPaddingPageNearExtent, getPageExtent, getSession, getStyleID, getTextColor, isDisplayed, isTooltipEnabled, isVisible, setBackgroundColor, setBorderColor, setBorderColor, setBorderExtent, setBorderExtent, setBorderLineFarColor, setBorderLineFarExtent, setBorderLineFarStyle, setBorderLineNearColor, setBorderLineNearExtent, setBorderLineNearStyle, setBorderPageFarColor, setBorderPageFarExtent, setBorderPageFarStyle, setBorderPageNearColor, setBorderPageNearExtent, setBorderPageNearStyle, setBorderStyle, setBorderStyle, setCornerArcSize, setCornerArcSize, setCornerLineFarPageFarArcSize, setCornerLineFarPageNearArcSize, setCornerLineNearPageFarArcSize, setCornerLineNearPageNearArcSize, setCursor, setDisplayed, setExtent, setFontFamilies, setFontSize, setFontStyle, setFontWeight, setLabelFontFamilies, setLabelFontSize, setLabelFontStyle, setLabelFontWeight, setLabelTextColor, setLineExtent, setMarginExtent, setMarginExtent, setMarginLineFarExtent, setMarginLineNearExtent, setMarginPageFarExtent, setMarginPageNearExtent, setOpacity, setPaddingExtent, setPaddingExtent, setPaddingLineFarExtent, setPaddingLineNearExtent, setPaddingPageFarExtent, setPaddingPageNearExtent, setPageExtent, setStyleID, setTextColor, setTooltipEnabled, setVisible
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.globalmentor.beans.PropertyConstrainable
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
Methods inherited from interface io.guise.framework.model.SelectModel
getSelectedValue, getSelectedValues, replace, setSelectedValues
Methods inherited from interface io.guise.framework.component.ValuedComponent
getValue, getValueClass, setValue
Methods inherited from interface io.guise.framework.model.ValueModel
clearValue, getDefaultValue, getValidator, getValue, getValueClass, isValidValue, resetValue, setValidator, setValue, validateValue
-
Field Details
-
componentValueChangeListener
protected final com.globalmentor.beans.GenericPropertyChangeListener<Boolean> componentValueChangeListenerThe listener that detects changes to a child component'sBoolean
value and updates the control's selected values accordingly. -
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 Details
-
BooleanValueControlSelectControl
Value class constructor with a default data model to represent a given type with multiple selection and aFlowLayout
withFlow.PAGE
flow.- Parameters:
valueClass
- The class indicating the type of value held in the model.- Throws:
NullPointerException
- if the given value class isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(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 aFlowLayout
withFlow.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:
NullPointerException
- if the given value class and/or value representation strategy isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(Class<V> valueClass, ListSelectionPolicy<V> selectionStrategy) Value class and selection strategy constructor with a default data model to represent a given type and aFlowLayout
withFlow.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:
NullPointerException
- if the given value class and/or selection strategy isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(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 aFlowLayout
withFlow.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:
NullPointerException
- if the given value class, selection strategy, and/or value representation strategy isnull
.
-
BooleanValueControlSelectControl
List select model constructor with aFlowLayout
withFlow.PAGE
flow.- Parameters:
listSelectModel
- The component list select model.- Throws:
NullPointerException
- if the given list select model isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(ListSelectModel<V> listSelectModel, ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy) List select model and value representation strategy constructor with aFlowLayout
withFlow.PAGE
flow.- Parameters:
listSelectModel
- The component list select model.valueRepresentationStrategy
- The strategy to create label models to represent this model's values.- Throws:
NullPointerException
- if the given list select model and/or value representation strategy isnull
.
-
BooleanValueControlSelectControl
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:
NullPointerException
- if the given value class and/or layout isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(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:
NullPointerException
- if the given value class, layout, and/or value representation strategy isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(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:
NullPointerException
- if the given value class, selection strategy, and/or layout isnull
.
-
BooleanValueControlSelectControl
public BooleanValueControlSelectControl(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:
NullPointerException
- if the given value class, selection strategy, layout, and/or value representation strategy isnull
.
-
BooleanValueControlSelectControl
List select model and layout constructor.- Parameters:
listSelectModel
- The component list select model.layout
- The layout definition for the component.- Throws:
NullPointerException
- if the given list select model and/or layout isnull
.
-
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:
NullPointerException
- if the given list select model, layout, and/or value representation strategy isnull
.
-
-
Method Details
-
getLayout
- Specified by:
getLayout
in interfaceLayoutComponent
- Returns:
- The layout definition for the container.
-
setLayout
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:
NullPointerException
- if the given layout isnull
.- See Also:
-
isLayoutThemeApplied
public boolean isLayoutThemeApplied()- Specified by:
isLayoutThemeApplied
in interfaceLayoutComponent
- Returns:
- Whether a theme has been applied to this component's layout.
-
setLayoutThemeApplied
public void setLayoutThemeApplied(boolean newLayoutThemeApplied) Description copied from interface:LayoutComponent
Sets whether a theme has been applied to this component's layout. This is a bound property of typeBoolean
.- Specified by:
setLayoutThemeApplied
in interfaceLayoutComponent
- Parameters:
newLayoutThemeApplied
-true
if a theme has been applied to this component's layout, elsefalse
.- See Also:
-
getChildComponents
This version returns the children in the same order as the list values.
- Specified by:
getChildComponents
in interfaceCompositeComponent
- Overrides:
getChildComponents
in classAbstractMultipleCompositeComponent
- Returns:
- An iterable to child components.
-
getValuePolicyModelGroup
- Returns:
- The value policy model group for boolean value models, or
null
if there is no value policy model group in use.
-
addComponent
Description copied from class:AbstractMultipleCompositeComponent
Adds a child component. This version adds the component to the component set. Any class that overrides this method must call this version.- Overrides:
addComponent
in classAbstractMultipleCompositeComponent
- Parameters:
childComponent
- The component to add to this component.
-
removeComponent
Description copied from class:AbstractMultipleCompositeComponent
Removes a child component. This version removes the component from the component set. Any class that overrides this method must call this version.- Overrides:
removeComponent
in classAbstractMultipleCompositeComponent
- Parameters:
childComponent
- The component to remove from this component.
-
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 tofalse
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 interfaceComponent
- Overrides:
resetTheme
in classAbstractCompositeComponent
- See Also:
-
updateTheme
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 callsComponent.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 interfaceComponent
- Overrides:
updateTheme
in classAbstractCompositeComponent
- Throws:
IOException
- if there was an error loading or applying a theme.- See Also:
-
applyTheme
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 interfaceComponent
- Overrides:
applyTheme
in classAbstractComponent
- Throws:
IOException
- if there was an error loading or applying a theme.- See Also:
-
applyTheme
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 interfaceComponent
- Overrides:
applyTheme
in classAbstractComponent
- Parameters:
theme
- The theme to apply to the object.
-