eXchaNGeR

org.xngr
Interface XAction


public interface XAction

The action specifies different ways of using an element. The normal way of associating an element by adding a service for the element-type can be used for opening, changing and moving the element. The action however makes it possible to make use of the element in other ways. If the element is an 'address' for example, the action could be: - 'send an email (to the address)' or - 'create an account (for the address)'.

Version:
$Revision: 1.1.1.1 $, $Date: 2002/02/16 16:12:44 $
Author:
Edwin Dankert

Method Summary
 void execute(XElement element)
          Executes the action.
 String getDescription()
          Returns the description for the action as can be displayed to the user.
 ImageIcon getIcon()
          Returns the icon for the action as could be used to display to the user.
 String getName()
          Returns the name for the action as displayed to the user.
 boolean isEnabled(XElement element)
          Returns wether the action is enabled and can be executed for this element.
 

Method Detail

execute

public void execute(XElement element)
Executes the action.
Parameters:
element - the element to execute this action for.

isEnabled

public boolean isEnabled(XElement element)
Returns wether the action is enabled and can be executed for this element.
Parameters:
element - the specific element to check.
Returns:
true, when the action can be executed for the element.

getName

public String getName()
Returns the name for the action as displayed to the user. - This can for example be used as text for a button.
Returns:
the name for this action.

getDescription

public String getDescription()
Returns the description for the action as can be displayed to the user. - This can for example be used as tool-tip text.
Returns:
the description for this action.

getIcon

public ImageIcon getIcon()
Returns the icon for the action as could be used to display to the user. - This can for example be used as an icon for a button.
Returns:
the icon for this action.

eXchaNGeR

Copyright © 2002, Cladonia Ltd., All Rights Reserved