LPEX
3.6.8

com.ibm.lpex.core
Class LpexBaseAction

java.lang.Object
  extended by com.ibm.lpex.core.LpexBaseAction
All Implemented Interfaces:
LpexAction
Direct Known Subclasses:
ZoomAction

public abstract class LpexBaseAction
extends Object
implements LpexAction

Base implementation of an LPEX action. This class is an LpexAction that can provide the application with additional information needed by the resource that this action is associated with, such as the context help id for an action bound to a pop-up menu item.

See Also:
LpexView.defineAction(java.lang.String, com.ibm.lpex.core.LpexAction)

Constructor Summary
LpexBaseAction()
           
 
Method Summary
 boolean available(LpexView lpexView)
          This method in the defined action will be called to query the availability of the action.
 boolean checkable()
          This method in the defined action will be called to query whether menu items associated with this actions may be checked.
 boolean checked(LpexView lpexView)
          This method in the defined action will be called to query the checked status of a checkable action.
 String getHelpId(LpexView lpexView)
          This method in the defined action will be called to query the context help id of the action.
 String getToolTipText(LpexView lpexView)
          This method in the defined action will be called to query the hover help text for the action.
 int screenShow(LpexView lpexView)
          This method in the defined action will be called to query the suggested screen refresh to be undertaken after running this action as a user action or through the LpexView#triggerAction() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.lpex.core.LpexAction
doAction
 

Constructor Detail

LpexBaseAction

public LpexBaseAction()
Method Detail

available

public boolean available(LpexView lpexView)
This method in the defined action will be called to query the availability of the action. When this method returns false, menu items associated with this user action will be disabled, the key or mouse event to which this action is assigned will not run it, and neither will the action command.

The default implementation of this method returns true.

Specified by:
available in interface LpexAction
Parameters:
lpexView - the document view for which the action availability is queried

checkable

public boolean checkable()
This method in the defined action will be called to query whether menu items associated with this actions may be checked. When this method returns true, menu items associated with this user action may be checked or unchecked, depending on the status returned by method checked().

The default implementation of this method returns false.


checked

public boolean checked(LpexView lpexView)
This method in the defined action will be called to query the checked status of a checkable action. This method only applies to actions that return true in method checkable(). When this method returns true, menu items associated with this user action will be checked, otherwise they will be unchecked.

The default implementation of this method returns false.

Parameters:
lpexView - the document view for which the action's checked status is queried

getHelpId

public String getHelpId(LpexView lpexView)
This method in the defined action will be called to query the context help id of the action.

The default implementation of this method returns null.

Parameters:
lpexView - the document view for which the action help id is queried

getToolTipText

public String getToolTipText(LpexView lpexView)
This method in the defined action will be called to query the hover help text for the action.

The default implementation of this method returns null.

Parameters:
lpexView - the document view for which this action's hover help text is queried

screenShow

public int screenShow(LpexView lpexView)
This method in the defined action will be called to query the suggested screen refresh to be undertaken after running this action as a user action or through the LpexView#triggerAction() method.

The extent of the screens to be refreshed is indicated by one of these codes: LpexConstants.SHOW_NONE, LpexConstants.SHOW_VIEW, LpexConstants.SHOW_DOCUMENT, LpexConstants.SHOW_ALL.

The default implementation of this method returns SHOW_DOCUMENT.

Parameters:
lpexView - the document view for which this action's needed screen refresh is queried
Returns:
the extent of document views to be refreshed

LPEX
3.6.8

Copyright © 2013 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.