Package it.tidalwave.role.ui.spi
Class MutableIconProviderSupport
java.lang.Object
it.tidalwave.role.ui.spi.MutableIconProviderSupport
- All Implemented Interfaces:
IconProvider,MutableIconProvider
A convenient support for implementing a
MutableIconProvider.- Author:
- Fabrizio Giudici
- Status: draft API
-
Field Summary
Fields inherited from interface it.tidalwave.role.ui.IconProvider
_IconProvider_, DEFAULTFields inherited from interface it.tidalwave.role.ui.MutableIconProvider
_MutableIconProvider_, PROP_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters aPropertyChangeListener.protected voidfireIconChange(Icon oldIcon, Icon newIcon) Fires the event notifying thatMutableIconProvider.PROP_ICONhas been changed.voidUnregisters aPropertyChangeListener.voidSets the icon.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.tidalwave.role.ui.IconProvider
getIcon
-
Constructor Details
-
MutableIconProviderSupport
public MutableIconProviderSupport()
-
-
Method Details
-
addPropertyChangeListener
Registers aPropertyChangeListener.- Specified by:
addPropertyChangeListenerin interfaceMutableIconProvider- Parameters:
listener- the listener
-
removePropertyChangeListener
Unregisters aPropertyChangeListener.- Specified by:
removePropertyChangeListenerin interfaceMutableIconProvider- Parameters:
listener- the listener
-
setIcon
Sets the icon. Note that implementations don't actually need to do something in this method: for instance, a validMutableIconProvidercan autonomously change icon in function of time (e.g. a blinking icon) or reacting to a change in the context. FIXME: this method does nothing. Probably this is inconsistent with DefaultMutableDisplayable? But that is a Default*, we're just a *Support...- Specified by:
setIconin interfaceMutableIconProvider- Parameters:
icon- the icon
-
fireIconChange
Fires the event notifying thatMutableIconProvider.PROP_ICONhas been changed.- Parameters:
oldIcon- the old value of the propertynewIcon- the new value of the property
-