Package io.guise.framework.model
Class DefaultLabelModel
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
io.guise.framework.model.AbstractModel
io.guise.framework.model.DefaultLabelModel
- All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable
,com.globalmentor.beans.PropertyConstrainable
,LabelModel
,Model
- Direct Known Subclasses:
DefaultInfoModel
,Notification
A default implementation of a model for an identifier such as text and/or an icon.
- 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.LabelModel
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY
-
Constructor Summary
ConstructorDescriptionDefault constructor.DefaultLabelModel
(String label) Label constructor.DefaultLabelModel
(String label, URI glyphURI) Label and glyph URI constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
com.globalmentor.net.MediaType
void
setGlyphURI
(URI newGlyphURI) Sets the URI of the icon.void
Sets the text of the label.void
setLabelContentType
(com.globalmentor.net.MediaType newLabelTextContentType) Sets the content type of the label text.toString()
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, 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 Details
-
DefaultLabelModel
public DefaultLabelModel()Default constructor. -
DefaultLabelModel
Label constructor.- Parameters:
label
- The text of the label, ornull
if there should be no label.
-
DefaultLabelModel
Label and glyph URI constructor.- Parameters:
label
- The text of the label, ornull
if there should be no label.glyphURI
- The glyph URI, which may be a resource URI, ornull
if there is no glyph URI.
-
-
Method Details
-
getGlyphURI
- Specified by:
getGlyphURI
in interfaceLabelModel
- Returns:
- The glyph URI, which may be a resource URI, or
null
if there is no glyph URI.
-
setGlyphURI
Description copied from interface:LabelModel
Sets the URI of the icon. This is a bound property.- Specified by:
setGlyphURI
in interfaceLabelModel
- Parameters:
newGlyphURI
- The new URI of the icon, which may be a resource URI.- See Also:
-
getLabel
- Specified by:
getLabel
in interfaceLabelModel
- Returns:
- The label text, which may include a resource reference, or
null
if there is no label text.
-
setLabel
Description copied from interface:LabelModel
Sets the text of the label. This is a bound property.- Specified by:
setLabel
in interfaceLabelModel
- Parameters:
newLabelText
- The new text of the label, which may include a resource reference.- See Also:
-
getLabelContentType
public com.globalmentor.net.MediaType getLabelContentType()- Specified by:
getLabelContentType
in interfaceLabelModel
- Returns:
- The content type of the label text.
-
setLabelContentType
public void setLabelContentType(com.globalmentor.net.MediaType newLabelTextContentType) Description copied from interface:LabelModel
Sets the content type of the label text. This is a bound property.- Specified by:
setLabelContentType
in interfaceLabelModel
- Parameters:
newLabelTextContentType
- The new label text content type.- See Also:
-
toString
-