com.guiseframework.prototype
Class AbstractEnableablePrototype

java.lang.Object
  extended by com.globalmentor.beans.BoundPropertyObject
      extended by com.guiseframework.model.AbstractModel
          extended by com.guiseframework.model.DefaultLabelModel
              extended by com.guiseframework.model.DefaultInfoModel
                  extended by com.guiseframework.prototype.AbstractPrototype
                      extended by com.guiseframework.prototype.AbstractEnableablePrototype
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Enableable, InfoModel, LabelModel, Model, Prototype
Direct Known Subclasses:
AbstractActionPrototype

public abstract class AbstractEnableablePrototype
extends AbstractPrototype
implements Enableable

Contains enableable prototype information, appropriate for a control, for example.

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.Enableable
ENABLED_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.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
 
Constructor Summary
AbstractEnableablePrototype()
          Default constructor.
AbstractEnableablePrototype(java.lang.String label)
          Label constructor.
AbstractEnableablePrototype(java.lang.String label, java.net.URI icon)
          Label and icon constructor.
 
Method Summary
 boolean isEnabled()
           
 void setEnabled(boolean newEnabled)
          Sets whether the control is enabled and and can receive user input.
 
Methods inherited from class com.guiseframework.model.DefaultInfoModel
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType
 
Methods inherited from class com.guiseframework.model.DefaultLabelModel
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType, toString
 
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, 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
 
Methods inherited from interface com.guiseframework.model.LabelModel
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType
 

Constructor Detail

AbstractEnableablePrototype

public AbstractEnableablePrototype()
Default constructor.


AbstractEnableablePrototype

public AbstractEnableablePrototype(java.lang.String label)
Label constructor.

Parameters:
label - The text of the label, or null if there should be no label.

AbstractEnableablePrototype

public AbstractEnableablePrototype(java.lang.String label,
                                   java.net.URI icon)
Label and icon constructor.

Parameters:
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.
Method Detail

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Enableable
Returns:
Whether the control is enabled and can receive user input.

setEnabled

public void setEnabled(boolean newEnabled)
Sets whether the control is enabled and and can receive user input. This is a bound property of type Boolean.

Specified by:
setEnabled in interface Enableable
Parameters:
newEnabled - true if the control should indicate and accept user input.
See Also:
Enableable.ENABLED_PROPERTY


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