org.PingOO.DLAI.lib.PWidget
Class PActionPropertyChangeListener

java.lang.Object
  |
  +--org.PingOO.DLAI.lib.PWidget.PActionPropertyChangeListener

public class PActionPropertyChangeListener
extends java.lang.Object
implements java.beans.PropertyChangeListener

A property change listener to use when linking action with component.
Used this class because ActionChangedListener defined in JPopupMenu, JToolBar and JMenu are private and can't be accessed from the outside.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
PropertyChangeListener

Field Summary
private  PComponent target
          The current target.
 
Constructor Summary
PActionPropertyChangeListener(PButton button)
          Creates a new action changed listener.
PActionPropertyChangeListener(PMenuItem item)
          Creates a new action changed listener.
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when a bound property is changed.
 void setTarget(PButton button)
          Sets the target of this listener.
 void setTarget(PMenuItem item)
          Sets the target of this listener.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

target

private PComponent target
The current target.
Constructor Detail

PActionPropertyChangeListener

public PActionPropertyChangeListener(PButton button)
Creates a new action changed listener.
Parameters:
button - The component to which apply the property change.

PActionPropertyChangeListener

public PActionPropertyChangeListener(PMenuItem item)
Creates a new action changed listener.
Parameters:
button - The component to which apply the property change.
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - The property change event.

setTarget

public void setTarget(PButton button)
Sets the target of this listener.
Parameters:
button - The new target.

setTarget

public void setTarget(PMenuItem item)
Sets the target of this listener.
Parameters:
button - The new target.