org.jminor.framework.client.model
Class DefaultPropertySummaryModel

java.lang.Object
  extended by org.jminor.framework.client.model.DefaultPropertySummaryModel
All Implemented Interfaces:
PropertySummaryModel

public class DefaultPropertySummaryModel
extends Object
implements PropertySummaryModel

A default PropertySummaryModel implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jminor.framework.client.model.PropertySummaryModel
PropertySummaryModel.PropertyValueProvider, PropertySummaryModel.SummaryType
 
Constructor Summary
DefaultPropertySummaryModel(Property property, PropertySummaryModel.PropertyValueProvider valueProvider)
          Instantiates a new DefaultPropertySummaryModel
 
Method Summary
 void addSummaryListener(ActionListener listener)
          
 void addSummaryTypeListener(ActionListener listener)
          
 Property getProperty()
           
 String getSummaryText()
          
 PropertySummaryModel.SummaryType getSummaryType()
          
 List<PropertySummaryModel.SummaryType> getSummaryTypes()
          
 void removeSummaryListener(ActionListener listener)
          
 void removeSummaryTypeListener(ActionListener listener)
          
 void setSummaryType(PropertySummaryModel.SummaryType summaryType)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertySummaryModel

public DefaultPropertySummaryModel(Property property,
                                   PropertySummaryModel.PropertyValueProvider valueProvider)
Instantiates a new DefaultPropertySummaryModel

Parameters:
property - the property to summarize
valueProvider - the property value provider
Method Detail

getProperty

public final Property getProperty()
Specified by:
getProperty in interface PropertySummaryModel
Returns:
the Property this summary model is based on

setSummaryType

public final void setSummaryType(PropertySummaryModel.SummaryType summaryType)

Specified by:
setSummaryType in interface PropertySummaryModel
Parameters:
summaryType - the type of summary to show

getSummaryType

public final PropertySummaryModel.SummaryType getSummaryType()

Specified by:
getSummaryType in interface PropertySummaryModel
Returns:
the current summary type

getSummaryTypes

public final List<PropertySummaryModel.SummaryType> getSummaryTypes()

Specified by:
getSummaryTypes in interface PropertySummaryModel
Returns:
a list containing the available summary types

getSummaryText

public final String getSummaryText()

Specified by:
getSummaryText in interface PropertySummaryModel
Returns:
a string represting the summary value

addSummaryListener

public final void addSummaryListener(ActionListener listener)

Specified by:
addSummaryListener in interface PropertySummaryModel
Parameters:
listener - a listener to be notified each time the summary changes

addSummaryTypeListener

public final void addSummaryTypeListener(ActionListener listener)

Specified by:
addSummaryTypeListener in interface PropertySummaryModel
Parameters:
listener - a listener to be notified each time the summary type changes

removeSummaryListener

public final void removeSummaryListener(ActionListener listener)

Specified by:
removeSummaryListener in interface PropertySummaryModel
Parameters:
listener - the listener to remove

removeSummaryTypeListener

public final void removeSummaryTypeListener(ActionListener listener)

Specified by:
removeSummaryTypeListener in interface PropertySummaryModel
Parameters:
listener - the listener to remove