net.ajaest.lib.swing.util.action
Class MultiComponentAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.ajaest.lib.swing.util.action.MultiComponentAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public abstract class MultiComponentAction
extends javax.swing.AbstractAction

Action class that triggers actions from multiple Component instances when it's triggered, concatenating the result stored in the clipboard for every instance and sending it as text to a the specified action.

Author:
Luis Alfonso Arce González
See Also:
Serialized Form

Field Summary
private  java.util.List<javax.swing.Action> actions
           
private  java.util.List<java.awt.Component> components
           
private  javax.swing.Action sendTo
           
private static long serialVersionUID
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
MultiComponentAction(javax.swing.Action sendTo, java.util.List<javax.swing.Action> actions, java.util.List<java.awt.Component> components)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected abstract  void appendAction(java.awt.Component component)
           
protected abstract  java.awt.event.ActionEvent prepareActionEventForFinalAction(java.awt.event.ActionEvent e)
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

sendTo

private javax.swing.Action sendTo

actions

private java.util.List<javax.swing.Action> actions

components

private java.util.List<java.awt.Component> components
Constructor Detail

MultiComponentAction

public MultiComponentAction(javax.swing.Action sendTo,
                            java.util.List<javax.swing.Action> actions,
                            java.util.List<java.awt.Component> components)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

appendAction

protected abstract void appendAction(java.awt.Component component)

prepareActionEventForFinalAction

protected abstract java.awt.event.ActionEvent prepareActionEventForFinalAction(java.awt.event.ActionEvent e)