|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.data.util.AbstractProperty
public abstract class AbstractProperty
Abstract base class for Property implementations.
Handles listener management for ValueChangeListeners and
ReadOnlyStatusChangeListeners.
| Nested Class Summary | |
|---|---|
protected class |
AbstractProperty.ReadOnlyStatusChangeEvent
An Event object specifying the Property whose read-only
status has been changed. |
| Nested classes/interfaces inherited from interface com.vaadin.data.Property |
|---|
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Constructor Summary | |
|---|---|
AbstractProperty()
|
|
| Method Summary | |
|---|---|
void |
addListener(Property.ReadOnlyStatusChangeListener listener)
Registers a new read-only status change listener for this Property. |
void |
addListener(Property.ValueChangeListener listener)
Registers a new value change listener for this Property. |
protected void |
fireReadOnlyStatusChange()
Sends a read only status change event to all registered listeners. |
protected void |
fireValueChange()
Sends a value change event to all registered listeners. |
Collection<?> |
getListeners(Class<?> eventType)
|
boolean |
isReadOnly()
Tests if the Property is in read-only mode. Override for additional restrictions on what is considered a read-only property. |
void |
removeListener(Property.ReadOnlyStatusChangeListener listener)
Removes a previously registered read-only status change listener. |
void |
removeListener(Property.ValueChangeListener listener)
Removes a previously registered value change listener. |
void |
setReadOnly(boolean newStatus)
Sets the Property's read-only mode to the specified status. |
String |
toString()
Returns the value of the Property in human readable textual
format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.vaadin.data.Property |
|---|
getType, getValue, setValue |
| Constructor Detail |
|---|
public AbstractProperty()
| Method Detail |
|---|
public boolean isReadOnly()
setValue will throw
ReadOnlyException and will not modify the value of the
Property.
Override for additional restrictions on what is considered a read-only
property.
isReadOnly in interface Propertytrue if the Property is in read-only mode,
false if it's notpublic void setReadOnly(boolean newStatus)
PropertyisReadOnly mode query correctly.
setReadOnly in interface PropertynewStatus - new read-only status of the Propertypublic String toString()
Property in human readable textual
format. The return value should be assignable to the
setValue method if the Property is not in read-only mode.
toString in interface PropertytoString in class Objectpublic void addListener(Property.ReadOnlyStatusChangeListener listener)
addListener in interface Property.ReadOnlyStatusChangeNotifierlistener - the new Listener to be registered.public void removeListener(Property.ReadOnlyStatusChangeListener listener)
removeListener in interface Property.ReadOnlyStatusChangeNotifierlistener - the listener to be removed.protected void fireReadOnlyStatusChange()
public void addListener(Property.ValueChangeListener listener)
Property.ValueChangeNotifier
addListener in interface Property.ValueChangeNotifierlistener - the new Listener to be registeredpublic void removeListener(Property.ValueChangeListener listener)
Property.ValueChangeNotifier
removeListener in interface Property.ValueChangeNotifierlistener - listener to be removedprotected void fireValueChange()
public Collection<?> getListeners(Class<?> eventType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||