com.guiseframework.model
Class LocaleInfoModel

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.model.LocaleInfoModel
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, InfoModel, LabelModel, Model

public class LocaleInfoModel
extends DefaultInfoModel

An info model that provides a localized version of a locale name.

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
 
Constructor Summary
LocaleInfoModel(java.util.Locale locale)
          Constructs an info model indicating the locale to represent.
 
Method Summary
 java.lang.String getLabel()
          Determines the text of the label.
 java.util.Locale getLocale()
           
 GuiseSession getSession()
           
 
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, 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.guiseframework.model.LabelModel
getGlyphURI, getLabelContentType, setGlyphURI, setLabel, setLabelContentType
 
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

LocaleInfoModel

public LocaleInfoModel(java.util.Locale locale)
Constructs an info model indicating the locale to represent.

Throws:
java.lang.NullPointerException - if the given locale is null.
Method Detail

getSession

public GuiseSession getSession()
Returns:
The Guise session that owns this object.

getLocale

public java.util.Locale getLocale()
Returns:
The locale the label should represent.

getLabel

public java.lang.String getLabel()
Determines the text of the label. This version returns the localized version of the locale if the value has not been explicitly set.

Specified by:
getLabel in interface LabelModel
Overrides:
getLabel in class DefaultLabelModel
Returns:
The label text, or null if there is no label text.


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