Package io.guise.framework.prototype
Class TogglePrototype
- java.lang.Object
-
- com.globalmentor.beans.BoundPropertyObject
-
- io.guise.framework.model.AbstractModel
-
- io.guise.framework.model.AbstractValueModel<V>
-
- io.guise.framework.model.DefaultValueModel<V>
-
- io.guise.framework.prototype.ValuePrototype<java.lang.Boolean>
-
- io.guise.framework.prototype.TogglePrototype
-
- All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
,com.globalmentor.model.MutableValued<java.lang.Boolean>
,com.globalmentor.model.Valued<java.lang.Boolean>
,Enableable
,InfoModel
,LabelModel
,Model
,ValueModel<java.lang.Boolean>
,Prototype
public class TogglePrototype extends ValuePrototype<java.lang.Boolean>
A boolean value prototype which allows toggling between two boolean states. By default this prototype uses a default value ofBoolean.FALSE
.- Author:
- Garret Wilson
-
-
Field Summary
-
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
-
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.model.ValueModel
VALIDATOR_PROPERTY, VALUE_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description TogglePrototype()
Default constructor with aBoolean.FALSE
default value.TogglePrototype(java.lang.Boolean defaultValue)
Default value constructor.TogglePrototype(java.lang.Boolean defaultValue, java.lang.String label)
Default value and label constructor.TogglePrototype(java.lang.Boolean defaultValue, java.lang.String label, java.net.URI icon)
Default value, label, and icon constructor.TogglePrototype(java.lang.String label)
Label constructor with aBoolean.FALSE
default value.TogglePrototype(java.lang.String label, java.net.URI icon)
Label and icon constructor with aBoolean.FALSE
default value.
-
Method Summary
-
Methods inherited from class io.guise.framework.prototype.ValuePrototype
getDescription, getDescriptionContentType, getGlyphURI, getInfo, getInfoContentType, getLabel, getLabelContentType, isEnabled, setDescription, setDescriptionContentType, setEnabled, setGlyphURI, setInfo, setInfoContentType, setLabel, setLabelContentType
-
Methods inherited from class io.guise.framework.model.DefaultValueModel
clearValue, getDefaultValue, getValue, resetValue, setValue
-
Methods inherited from class io.guise.framework.model.AbstractValueModel
createPropertyVetoException, getValidator, getValueClass, isValidValue, setValidator, validateValue
-
Methods inherited from class io.guise.framework.model.AbstractModel
getEventListenerManager, getPlainText
-
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
TogglePrototype
public TogglePrototype()
Default constructor with aBoolean.FALSE
default value.
-
TogglePrototype
public TogglePrototype(java.lang.Boolean defaultValue)
Default value constructor.- Parameters:
defaultValue
- The default value, which will not be validated.
-
TogglePrototype
public TogglePrototype(java.lang.String label)
Label constructor with aBoolean.FALSE
default value.- Parameters:
label
- The text of the label, ornull
if there should be no label.
-
TogglePrototype
public TogglePrototype(java.lang.Boolean defaultValue, java.lang.String label)
Default value and label constructor.- Parameters:
defaultValue
- The default value, which will not be validated.label
- The text of the label, ornull
if there should be no label.
-
TogglePrototype
public TogglePrototype(java.lang.String label, java.net.URI icon)
Label and icon constructor with aBoolean.FALSE
default value.- Parameters:
label
- The text of the label, ornull
if there should be no label.icon
- The icon URI, which may be a resource URI, ornull
if there is no icon URI.
-
TogglePrototype
public TogglePrototype(java.lang.Boolean defaultValue, java.lang.String label, java.net.URI icon)
Default value, label, and icon constructor.- Parameters:
defaultValue
- The default value, which will not be validated.label
- The text of the label, ornull
if there should be no label.icon
- The icon URI, which may be a resource URI, ornull
if there is no icon URI.
-
-