com.guiseframework.prototype
Class TogglePrototype

java.lang.Object
  extended by com.globalmentor.beans.BoundPropertyObject
      extended by com.guiseframework.model.AbstractModel
          extended by com.guiseframework.model.AbstractValueModel<V>
              extended by com.guiseframework.model.DefaultValueModel<V>
                  extended by com.guiseframework.prototype.ValuePrototype<java.lang.Boolean>
                      extended by com.guiseframework.prototype.TogglePrototype
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Enableable, InfoModel, LabelModel, Model, Valued<java.lang.Boolean>, 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 of Boolean.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 com.guiseframework.model.InfoModel
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY
 
Fields inherited from interface com.guiseframework.model.LabelModel
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY
 
Fields inherited from interface com.guiseframework.model.Model
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE
 
Fields inherited from interface com.guiseframework.model.Enableable
ENABLED_PROPERTY
 
Fields inherited from interface com.guiseframework.model.ValueModel
VALIDATOR_PROPERTY, VALUE_PROPERTY
 
Constructor Summary
TogglePrototype()
          Default constructor with a Boolean.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 a Boolean.FALSE default value.
TogglePrototype(java.lang.String label, java.net.URI icon)
          Label and icon constructor with a Boolean.FALSE default value.
 
Method Summary
 
Methods inherited from class com.guiseframework.prototype.ValuePrototype
getDescription, getDescriptionContentType, getGlyphURI, getInfo, getInfoContentType, getLabel, getLabelContentType, isEnabled, setDescription, setDescriptionContentType, setEnabled, setGlyphURI, setInfo, setInfoContentType, setLabel, setLabelContentType
 
Methods inherited from class com.guiseframework.model.DefaultValueModel
clearValue, getDefaultValue, getValue, resetValue, setValue
 
Methods inherited from class com.guiseframework.model.AbstractValueModel
createPropertyVetoException, getValidator, getValueClass, isValidValue, setValidator, validateValue
 
Methods inherited from class com.guiseframework.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
 
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
 

Constructor Detail

TogglePrototype

public TogglePrototype()
Default constructor with a Boolean.FALSE default value.

Parameters:
valueClass - The class indicating the type of value held in the model.

TogglePrototype

public TogglePrototype(java.lang.Boolean defaultValue)
Default value constructor.

Parameters:
valueClass - The class indicating the type of value held in the model.
defaultValue - The default value, which will not be validated.

TogglePrototype

public TogglePrototype(java.lang.String label)
Label constructor with a Boolean.FALSE default value.

Parameters:
valueClass - The class indicating the type of value held in the model.
label - The text of the label, or null 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, or null if there should be no label.

TogglePrototype

public TogglePrototype(java.lang.String label,
                       java.net.URI icon)
Label and icon constructor with a Boolean.FALSE default value.

Parameters:
valueClass - The class indicating the type of value held in the model.
label - The text of the label, or null if there should be no label.
icon - The icon URI, which may be a resource URI, or null 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, or null if there should be no label.
icon - The icon URI, which may be a resource URI, or null if there is no icon URI.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.