[Ejtools-cvs] libraries/adwt/src/main/org/ejtools/adwt/action CommandAction.java,1.7,1.8
Brought to you by:
letiemble
|
From: <let...@us...> - 2003-12-14 10:50:04
|
Update of /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action
In directory sc8-pr-cvs1:/tmp/cvs-serv19233/adwt/src/main/org/ejtools/adwt/action
Modified Files:
CommandAction.java
Log Message:
Add more javadocs.
Add package.html files.
Index: CommandAction.java
===================================================================
RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/CommandAction.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CommandAction.java 15 Sep 2003 22:37:12 -0000 1.7
--- CommandAction.java 13 Dec 2003 21:29:34 -0000 1.8
***************
*** 27,57 ****
/**
! * Description of the Class
*
* @author Laurent Etiemble
* @version $Revision$
! * @todo Javadoc to complete
*/
public class CommandAction extends CustomBeanContextServicesSupport implements Action
{
! /** Description of the Field */
protected AbstractAction action = null;
! /** Description of the Field */
protected Command command;
! /** Description of the Field */
protected ResourceBundle resource;
! /** Description of the Field */
private static Logger logger = Logger.getLogger(CommandAction.class);
! /** Description of the Field */
public final static String ICON = "Icon";
! /** Description of the Field */
public final static String MENU = "Menu";
! /** Description of the Field */
public final static String MENU_ITEM = "MenuItem";
! /** Description of the Field */
public final static String MENU_LAYOUT = "MenuLayout";
! /** Description of the Field */
public final static String TOOLBAR = "Toolbar";
! /** Description of the Field */
public final static String TOOLTIP = "ToolTip";
--- 27,77 ----
/**
! * BeanContext that wraps an Action and delegates to a Command object.
! * <p>
! * It supports the Command pattern by delegating the <code>ActionEvent</code> event to the <code>execute</code> method of the Command object.
! * </p>
! * <p>
! * It automatically handles the negotiation in ToolBar and MenuBar if these services are present.
! * </p>
! * <p>
! * It supports the following properties :<ul>
! * <li>Custom Icon</li>
! * <li>Tooltip</li>
! * <li>Mnemonic key</li>
! * <li>Accelerator key</li>
! * <li>MenuBar presence</li>
! * <li>Toolbar presence</li>
! * <li>Menu name</li>
! * <li>Menu item</li>
! * <li>Menu position</li>
! * </ul>
! * </p>
*
* @author Laurent Etiemble
* @version $Revision$
! * @see org.ejtools.adwt.action.Command
*/
public class CommandAction extends CustomBeanContextServicesSupport implements Action
{
! /** The wrapped action */
protected AbstractAction action = null;
! /** The command to execute */
protected Command command;
! /** Resource Bundle */
protected ResourceBundle resource;
! /** Default logger */
private static Logger logger = Logger.getLogger(CommandAction.class);
!
! /** Constant for ICON property */
public final static String ICON = "Icon";
! /** Constant for MENU property */
public final static String MENU = "Menu";
! /** Constant for MENU_ITEM property */
public final static String MENU_ITEM = "MenuItem";
! /** Constant for MENU_LAYOUT property */
public final static String MENU_LAYOUT = "MenuLayout";
! /** Constant for TOOLBAR property */
public final static String TOOLBAR = "Toolbar";
! /** Constant for TOOLTIP property */
public final static String TOOLTIP = "ToolTip";
***************
*** 59,69 ****
/**
! * Constructor for the CommandAction object
*
! * @param command Description of Parameter
! * @param name Description of Parameter
! * @param res Description of Parameter
*/
! public CommandAction(Command command, ResourceBundle res, String name)
{
this.setCommand(command);
--- 79,89 ----
/**
! * Constructor used to fully define the CommandAction.
*
! * @param command The command object to delegate the ActionEvent to
! * @param res The Resource Bundle used for resolving the name and other properties
! * @param name The name of the CommandAction. Must be a key found in the Resource Bundle
*/
! protected CommandAction(Command command, ResourceBundle res, String name)
{
this.setCommand(command);
***************
*** 110,116 ****
/**
! * actionPerformed is what executed the command. actionPerformed is called whenever the action is acted upon.
*
! * @param e the action event
*/
public void actionPerformed(ActionEvent e)
--- 130,136 ----
/**
! * This method is called whenever the action is acted upon. The call will be delegated to the wrapped action.
*
! * @param e The action event
*/
public void actionPerformed(ActionEvent e)
***************
*** 121,127 ****
/**
! * Adds a feature to the PropertyChangeListener attribute of the CommandAction object
*
! * @param listener The feature to be added to the PropertyChangeListener attribute
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
--- 141,147 ----
/**
! * Adds a PropertyChangeListener. The call will be delegated to the wrapped action.
*
! * @param listener The listener to be added
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
***************
*** 196,202 ****
/**
! * Description of the Method
*
! * @param listener Description of Parameter
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
--- 216,222 ----
/**
! * Removes a PropertyChangeListener. The call will be delegated to the wrapped action.
*
! * @param listener The listener to remove
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
***************
*** 207,213 ****
/**
! * Description of the Method
*
! * @param bcsae Description of Parameter
*/
public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) { }
--- 227,233 ----
/**
! * Triggered when a service is made available.
*
! * @param bcsae The availability event
*/
public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) { }
***************
*** 215,221 ****
/**
! * Description of the Method
*
! * @param bcsre Description of Parameter
*/
public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) { }
--- 235,241 ----
/**
! * Triggered when a service is revoked.
*
! * @param bcsre The revocation event
*/
public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) { }
***************
*** 223,229 ****
/**
! * Sets the enabled attribute of the CommandAction object
*
! * @param b The new enabled value
*/
public void setEnabled(boolean b)
--- 243,249 ----
/**
! * Enables the Action. The call will be delegated to the wrapped action.
*
! * @param b If true, the action will be enable
*/
public void setEnabled(boolean b)
***************
*** 233,237 ****
! /** Description of the Method */
protected void initializeBeanContextResources()
{
--- 253,257 ----
! /** Called when the CommandAction is put in a BeanContext */
protected void initializeBeanContextResources()
{
***************
*** 283,287 ****
! /** Description of the Method */
protected void releaseBeanContextResources()
{
--- 303,307 ----
! /** Called when the CommandAction is removed from a BeanContext */
protected void releaseBeanContextResources()
{
***************
*** 334,340 ****
/**
! * Gets the menu attribute of the CommandAction object
*
! * @return The menu value
*/
public final String getMenu()
--- 354,360 ----
/**
! * Returns the menu property
*
! * @return The menu property
*/
public final String getMenu()
***************
*** 345,351 ****
/**
! * Gets the menuLayout attribute of the CommandAction object
*
! * @return The menuLayout value
*/
public final int getMenuLayout()
--- 365,371 ----
/**
! * Returns the menu layout property
*
! * @return The menu layout property
*/
public final int getMenuLayout()
***************
*** 356,362 ****
/**
! * Getter for the resourceBundle attribute
*
! * @return The value of resourceBundle attribute
*/
public final ResourceBundle getResourceBundle()
--- 376,382 ----
/**
! * Returns the Resource Bundle used by this object
*
! * @return The Resource Bundle
*/
public final ResourceBundle getResourceBundle()
***************
*** 367,373 ****
/**
! * Gets the toolbar attribute of the CommandAction object
*
! * @return The toolbar value
*/
public final boolean getToolBar()
--- 387,393 ----
/**
! * Returns the toolbar presence property
*
! * @return The toolbar presence property
*/
public final boolean getToolBar()
***************
*** 456,462 ****
/**
! * This method retrieves the encapsulated command.
*
! * @return Command
*/
protected final Command getCommand()
--- 476,482 ----
/**
! * Returns the wrapped command object
*
! * @return The command object
*/
protected final Command getCommand()
|