org.openpermis.editor.policy.gui
Class DoubleClickForwarder

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by org.openpermis.editor.policy.gui.DoubleClickForwarder
All Implemented Interfaces:
MouseListener, EventListener

public class DoubleClickForwarder
extends MouseAdapter

Mouse listener that triggers an action on a double click.

Since:
0.1.0

Field Summary
static String COMMAND
          Default command used to trigger the action.
 
Constructor Summary
DoubleClickForwarder(Action action)
          Creates a new double click listener.
DoubleClickForwarder(Action action, String command)
          Creates a new double click listener.
 
Method Summary
 void mouseClicked(MouseEvent e)
           
static DoubleClickForwarder register(JComponent component, Action action)
          Convenience method to add a double click action to a component.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND

public static final String COMMAND
Default command used to trigger the action.

Constant Field Value:
"doubleclick"
Since:
0.1.0
Constructor Detail

DoubleClickForwarder

public DoubleClickForwarder(Action action)
Creates a new double click listener.

Notes:
Uses COMMAND as command.
Parameters:
action - the action to execute.
Since:
0.1.0

DoubleClickForwarder

public DoubleClickForwarder(Action action,
                            String command)
Creates a new double click listener.

Parameters:
action - the action to execute.
command - the command to issue.
Since:
0.1.0
Method Detail

register

public static DoubleClickForwarder register(JComponent component,
                                            Action action)
Convenience method to add a double click action to a component.

Parameters:
component - the component to register the action at.
action - the action to register.
Returns:
the action created.
Since:
0.1.0

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class MouseAdapter
Since:
0.1.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:33
Copyright (c) 2002-2007 Ergon Informatik AG