Adempiere 3.5.2a

org.adempiere.webui.component
Class WAppsAction

java.lang.Object
  extended by org.adempiere.webui.component.WAppsAction
All Implemented Interfaces:
EventListener

public class WAppsAction
extends Object
implements EventListener

Application Action. Creates Action with MenuItem and Button, delegate execution of action to an attached ActionListener instance The ActionCommand is translated for display If translated text contains &, the next character is the Mnemonic

Author:
Andrew Kimball

Field Summary
static Dimension BUTTON_SIZE
          Button Size
 
Constructor Summary
WAppsAction(String action, String accelerator)
          Application Action
WAppsAction(String action, String accelerator, String toolTipText)
          Application Action.
 
Method Summary
 Button getButton()
          Return Button
 String getCtrlKeys()
           
 String getName()
          Get Name/ActionCommand
 void onEvent(Event event)
           
 void setDelegate(EventListener listener)
          Set Delegate to receive the actionPerformed calls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUTTON_SIZE

public static final Dimension BUTTON_SIZE
Button Size

Constructor Detail

WAppsAction

public WAppsAction(String action,
                   String accelerator)
            throws IOException
Application Action

Parameters:
action - base action command - used as AD_Message for Text and Icon name
accelerator - optional keystroke for accelerator
toggle - is toggle action (maintains state)
Throws:
IOException

WAppsAction

public WAppsAction(String action,
                   String accelerator,
                   String toolTipText)
            throws IOException
Application Action.

Parameters:
action - base action command - used as AD_Message for Text and Icon name
accelerator - optional keystroke for accelerator
toolTipText - text, if null defered from action
toggle - is toggle action (maintains state)
Throws:
IOException
Method Detail

getName

public String getName()
Get Name/ActionCommand

Returns:
ActionName

getButton

public Button getButton()
Return Button

Returns:
Button

setDelegate

public void setDelegate(EventListener listener)
                 throws IllegalArgumentException
Set Delegate to receive the actionPerformed calls

Parameters:
listener - listener
Throws:
IllegalArgumentException - if the listener is not a window. This exception can be ignored as events will still be fired for button presses.

onEvent

public void onEvent(Event event)
             throws Exception
Specified by:
onEvent in interface EventListener
Throws:
Exception

getCtrlKeys

public String getCtrlKeys()

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.