paolomind.multitalk.component
Class ActionCommandTool

java.lang.Object
  extended by paolomind.multitalk.plugin.ToolManager
      extended by paolomind.multitalk.component.ActionCommandTool
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, NamedObject, ObjectContainer, NamedReceiver, Receiver, Sender, ToolInterface

public class ActionCommandTool
extends ToolManager
implements java.awt.event.ActionListener

Un toolManager che implementa l' AWT ActionListener. Associando l'oggetto ad un Button o AbstractButton, cattura l'evento d'azione per selezionare un tool in base al ActionCommand associato all'evento scatenato

Author:
paolo

Constructor Summary
ActionCommandTool(Sender s)
          costruttore.
ActionCommandTool(java.lang.String name, Sender s)
          costruttore.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Catturato l'evento, seleziona il tool.
 javax.swing.AbstractButton setupAction(ToolInterface t, javax.swing.AbstractButton b)
          Metodo che si occupa di assegnare l'ActionListener ad un javax.swing.AbstractButton e inizializzare l'ActionCommand.
 java.awt.Button setupAction(ToolInterface t, java.awt.Button b)
          Metodo che si occupa di assegnare l'ActionListner ad un java.awt.Button e inizializzare l'ActionCommand.
 
Methods inherited from class paolomind.multitalk.plugin.ToolManager
get, getAll, getPropertes, getSelfId, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, receive, register, register, register, select, select, send, setSelfId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionCommandTool

public ActionCommandTool(Sender s)
costruttore.

Parameters:
s - il sender associato a cui spedire i messaggi

ActionCommandTool

public ActionCommandTool(java.lang.String name,
                         Sender s)
costruttore.

Parameters:
name - il nome del toolmanager (la stringa verrà scritta nel messaggio come info)
s - il sender associato a cui spedire i messaggi
Method Detail

actionPerformed

public final void actionPerformed(java.awt.event.ActionEvent e)
Catturato l'evento, seleziona il tool.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - evento catturato, tale evento deve aver specificato l'ActionCommand con l' id del tool da selezionare
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

setupAction

public final java.awt.Button setupAction(ToolInterface t,
                                         java.awt.Button b)
Metodo che si occupa di assegnare l'ActionListner ad un java.awt.Button e inizializzare l'ActionCommand.

Parameters:
t - tool da associare al bottone
b - il bottone da inizializzare
Returns:
il bottone inizializzato (non è necessario reperirlo)

setupAction

public final javax.swing.AbstractButton setupAction(ToolInterface t,
                                                    javax.swing.AbstractButton b)
Metodo che si occupa di assegnare l'ActionListener ad un javax.swing.AbstractButton e inizializzare l'ActionCommand.

Parameters:
t - tool da associare al bottone
b - il bottone da inizializzare
Returns:
il bottone inizializzato (non è necessario reperirlo)


Copyright © 2007. All Rights Reserved.