com.lightdev.app.filemanager.ui
Class ActionDelegator

java.lang.Object
  extended by com.lightdev.app.filemanager.ui.ActionDelegator
All Implemented Interfaces:
ActionListener, PropertyChangeListener, EventListener

public class ActionDelegator
extends Object
implements ActionListener, PropertyChangeListener

A class that tracks the focused component. This is necessary to delegate the menu cut/copy/paste commands to the right component. An instance of this class is listening and when the user fires one of these commands, it calls the appropriate action on the currently focused component.

Version:
1, 12.01.2008
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Constructor Summary
ActionDelegator()
          create a new instance of class ActionDelegator
 
Method Summary
 void actionPerformed(ActionEvent e)
          delegate an action to the current focus owner, given that this focus owner has this action in its action map, i.e.
 void propertyChange(PropertyChangeEvent e)
          use the propertyChange event here to record the new focus owner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDelegator

public ActionDelegator()
create a new instance of class ActionDelegator

Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent e)
use the propertyChange event here to record the new focus owner

Specified by:
propertyChange in interface PropertyChangeListener

actionPerformed

public void actionPerformed(ActionEvent e)
delegate an action to the current focus owner, given that this focus owner has this action in its action map, i.e. has an own way of handling this action

Specified by:
actionPerformed in interface ActionListener