All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.vaccess.CommandCallMenuItem

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.AbstractButton
                                   |
                                   +----com.sun.java.swing.JMenuItem
                                           |
                                           +----com.ibm.as400.vaccess.CommandCallMenuItem

public class CommandCallMenuItem
extends JMenuItem
implements Serializable
The CommandCallMenuItem class represents a menu item that calls an AS/400 CL command when selected. Results of the command are returned in a message list.

CommandCallMenuItem objects generate the following events:

See Also:
CommandCall, AS400Message

Constructor Index

 o CommandCallMenuItem()
Constructs a CommandCallMenuItem object.
 o CommandCallMenuItem(String)
Constructs a CommandCallMenuItem object.
 o CommandCallMenuItem(String, Icon)
Constructs a CommandCallMenuItem object.
 o CommandCallMenuItem(String, Icon, AS400)
Constructs a CommandCallMenuItem object.
 o CommandCallMenuItem(String, Icon, AS400, String)
Constructs a CommandCallMenuItem object.

Method Index

 o addActionCompletedListener(ActionCompletedListener)
Adds a listener to be notified when a command has been run on the AS/400.
 o addErrorListener(ErrorListener)
Adds a listener to be notified when an error occurs.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to be notified when the value of any bound property changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener to be notified when the value of any constrained property changes.
 o getCommand()
Returns the command.
 o getMessageList()
Returns the message list resulting from the last command that was run.
 o getMessageText()
Returns the text from the first message resulting from the last command that was run.
 o getSystem()
Returns the AS/400 on which commands are run.
 o removeActionCompletedListener(ActionCompletedListener)
Removes a action completed listener.
 o removeErrorListener(ErrorListener)
Removes an error listener.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a property change listener.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable change listener.
 o setCommand(String)
Sets the command that is run when the button is pressed.
 o setSystem(AS400)
Sets the AS/400 on which commands are run.

Constructors

 o CommandCallMenuItem
 public CommandCallMenuItem()
Constructs a CommandCallMenuItem object.

 o CommandCallMenuItem
 public CommandCallMenuItem(String text)
Constructs a CommandCallMenuItem object.

Parameters:
text - The menu item text, or null if there is no text.
 o CommandCallMenuItem
 public CommandCallMenuItem(String text,
                            Icon icon)
Constructs a CommandCallMenuItem object.

Parameters:
text - The menu item text, or null if there is no text.
icon - The menu item icon, or null if there is no icon.
 o CommandCallMenuItem
 public CommandCallMenuItem(String text,
                            Icon icon,
                            AS400 system)
Constructs a CommandCallMenuItem object.

Parameters:
text - The menu item text, or null if there is no text.
icon - The menu item icon, or null if there is no icon.
system - The AS/400 on which commands are run.
 o CommandCallMenuItem
 public CommandCallMenuItem(String text,
                            Icon icon,
                            AS400 system,
                            String command)
Constructs a CommandCallMenuItem object.

Parameters:
text - The menu item text, or null if there is no text.
icon - The menu item icon, or null if there is no icon.
system - The AS/400 on which commands are run.
command - The command.

Methods

 o addActionCompletedListener
 public void addActionCompletedListener(ActionCompletedListener listener)
Adds a listener to be notified when a command has been run on the AS/400.

Parameters:
listener - The listener.
 o addErrorListener
 public void addErrorListener(ErrorListener listener)
Adds a listener to be notified when an error occurs.

Parameters:
listener - The listener.
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property changes.

Parameters:
listener - The listener.
Overrides:
addPropertyChangeListener in class JComponent
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property changes.

Parameters:
listener - The listener.
Overrides:
addVetoableChangeListener in class JComponent
 o getCommand
 public String getCommand()
Returns the command.

Returns:
The command.
 o getMessageList
 public AS400Message[] getMessageList()
Returns the message list resulting from the last command that was run.

Returns:
The message list.
 o getMessageText
 public String getMessageText()
Returns the text from the first message resulting from the last command that was run.

Returns:
The message text.
 o getSystem
 public AS400 getSystem()
Returns the AS/400 on which commands are run.

Returns:
The AS400 on which commands are run.
 o removeActionCompletedListener
 public void removeActionCompletedListener(ActionCompletedListener listener)
Removes a action completed listener.

Parameters:
listener - The listener.
 o removeErrorListener
 public void removeErrorListener(ErrorListener listener)
Removes an error listener.

Parameters:
listener - The listener.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.

Parameters:
listener - The listener.
Overrides:
removePropertyChangeListener in class JComponent
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable change listener.

Parameters:
listener - The listener.
Overrides:
removeVetoableChangeListener in class JComponent
 o setCommand
 public void setCommand(String command) throws PropertyVetoException
Sets the command that is run when the button is pressed.

Parameters:
command - The command that is run when the button is pressed.
Throws: PropertyVetoException
If the change is vetoed.
 o setSystem
 public void setSystem(AS400 system) throws PropertyVetoException
Sets the AS/400 on which commands are run.

Parameters:
system - The AS/400 on which commands are run.
Throws: PropertyVetoException
If the change is vetoed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index