Package pulse.util
Class DiscreteSelector<T extends Descriptive>
- java.lang.Object
-
- pulse.util.DiscreteSelector<T>
-
- All Implemented Interfaces:
Serializable,Property
public class DiscreteSelector<T extends Descriptive> extends Object implements Property
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DiscreteSelector(AbstractReader<T> reader, String directory, String listLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(DescriptorChangeListener l)booleanattemptUpdate(Object value)Tfind(String name)voidfireDescriptorChange()Set<T>getAllOptions()TgetDefaultSelection()StringgetDescriptor(boolean addHtmlTags)Creates aStringto describe this property (often used in GUI applications).List<DescriptorChangeListener>getListeners()ObjectgetValue()Retrieves the value of thisProperty.voidsetDefaultSelection(String name)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pulse.properties.Property
formattedOutput, identifier
-
-
-
-
Constructor Detail
-
DiscreteSelector
public DiscreteSelector(AbstractReader<T> reader, String directory, String listLocation)
-
-
Method Detail
-
addListener
public void addListener(DescriptorChangeListener l)
-
getListeners
public List<DescriptorChangeListener> getListeners()
-
fireDescriptorChange
public void fireDescriptorChange()
-
getValue
public Object getValue()
Description copied from interface:PropertyRetrieves the value of thisProperty.
-
getDescriptor
public String getDescriptor(boolean addHtmlTags)
Description copied from interface:PropertyCreates aStringto describe this property (often used in GUI applications).- Specified by:
getDescriptorin interfaceProperty- Parameters:
addHtmlTags- iftrue, adds the 'html' tags at both ends of the descriptorString.- Returns:
- a
String, with or without 'html' tags, describing thisProperty
-
attemptUpdate
public boolean attemptUpdate(Object value)
- Specified by:
attemptUpdatein interfaceProperty
-
getDefaultSelection
public T getDefaultSelection()
-
setDefaultSelection
public void setDefaultSelection(String name)
-
-