it.tidalwave.role
Class MutableIconProviderSupport
java.lang.Object
it.tidalwave.role.MutableIconProviderSupport
- All Implemented Interfaces:
- IconProvider, MutableIconProvider
public abstract class MutableIconProviderSupport
- extends java.lang.Object
- implements MutableIconProvider
A convenient support for implementing a MutableIconProvider
.
- Version:
- $Id$
- Author:
- Fabrizio Giudici
- Status: draft API
Method Summary |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers a PropertyChangeListener . |
protected void |
fireIconChange(javax.swing.Icon oldIcon,
javax.swing.Icon newIcon)
Fires the event notifying that PROP_ICON has been changed. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Unregisters a PropertyChangeListener . |
void |
setIcon(javax.swing.Icon icon)
Sets the icon. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MutableIconProviderSupport
public MutableIconProviderSupport()
addPropertyChangeListener
public void addPropertyChangeListener(@Nonnull
java.beans.PropertyChangeListener listener)
- Registers a
PropertyChangeListener
.
- Specified by:
addPropertyChangeListener
in interface MutableIconProvider
- Parameters:
listener
- the listener
removePropertyChangeListener
public void removePropertyChangeListener(@Nonnull
java.beans.PropertyChangeListener listener)
- Unregisters a
PropertyChangeListener
.
- Specified by:
removePropertyChangeListener
in interface MutableIconProvider
- Parameters:
listener
- the listener
setIcon
public void setIcon(@Nonnull
javax.swing.Icon icon)
- Sets the icon. Note that implementations don't actually need to do something in this method: for instance,
a valid
MutableIconProvider
can 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:
setIcon
in interface MutableIconProvider
- Parameters:
icon
- the icon
fireIconChange
protected void fireIconChange(@Nonnull
javax.swing.Icon oldIcon,
@Nonnull
javax.swing.Icon newIcon)
- Fires the event notifying that
PROP_ICON
has been changed.
- Parameters:
oldIcon
- the old value of the propertynewIcon
- the new value of the property
Copyright © 2009-2011 Tidalwave s.a.s.. All Rights Reserved.