com.sdm.quasar.client.swing.common.util
Class ActionListenerSupportHelper

java.lang.Object
  extended bycom.sdm.quasar.client.swing.common.util.ActionListenerSupportHelper

public abstract class ActionListenerSupportHelper
extends java.lang.Object

A helper class that adds or removes ActionListener's from objects, that support ActionListeners.

Version:
1.0
Author:
Thomas Wolf

Method Summary
static void addActionListener(java.lang.Object target, java.awt.event.ActionListener actionListener)
          Adds an ActionListener to the given target object.
static boolean isSupportingActionListener(java.lang.Class targetClass)
          Returns true, if the given target class supports adding and removing of ActionListeners.
static void removeActionListener(java.lang.Object target, java.awt.event.ActionListener actionListener)
          Removes an ActionListener from the given target object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSupportingActionListener

public static boolean isSupportingActionListener(java.lang.Class targetClass)
Returns true, if the given target class supports adding and removing of ActionListeners.

Parameters:
targetClass - the target class to check

addActionListener

public static void addActionListener(java.lang.Object target,
                                     java.awt.event.ActionListener actionListener)
Adds an ActionListener to the given target object. The target object's class must have a public addActionListener(ActionListener)-method.

Parameters:
target - the target object to add an ActionListener to (not null)
actionListener - the ActionListener to add (not null)

removeActionListener

public static void removeActionListener(java.lang.Object target,
                                        java.awt.event.ActionListener actionListener)
Removes an ActionListener from the given target object. The target object's class must have a public removeActionListener(ActionListener)-method.

Parameters:
target - the target object to remove an ActionListener of (not null)
actionListener - the ActionListener to remove (not null)