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:
- ActionCompletedEvent
- ErrorEvent
- PropertyChangeEvent
- See Also:
- CommandCall, AS400Message
-
CommandCallMenuItem()
- Constructs a CommandCallMenuItem object.
-
CommandCallMenuItem(String)
- Constructs a CommandCallMenuItem object.
-
CommandCallMenuItem(String, Icon)
- Constructs a CommandCallMenuItem object.
-
CommandCallMenuItem(String, Icon, AS400)
- Constructs a CommandCallMenuItem object.
-
CommandCallMenuItem(String, Icon, AS400, String)
- Constructs a CommandCallMenuItem object.
-
addActionCompletedListener(ActionCompletedListener)
- Adds a listener to be notified when a command has been run on the AS/400.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any
bound property changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any
constrained property changes.
-
getCommand()
- Returns the command.
-
getMessageList()
- Returns the message list resulting from the last command
that was run.
-
getMessageText()
- Returns the text from the first message resulting from the
last command that was run.
-
getSystem()
- Returns the AS/400 on which commands are run.
-
removeActionCompletedListener(ActionCompletedListener)
- Removes a action completed listener.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener.
-
setCommand(String)
- Sets the command that is run when the button is pressed.
-
setSystem(AS400)
- Sets the AS/400 on which commands are run.
CommandCallMenuItem
public CommandCallMenuItem()
- Constructs a CommandCallMenuItem object.
CommandCallMenuItem
public CommandCallMenuItem(String text)
- Constructs a CommandCallMenuItem object.
- Parameters:
- text - The menu item text, or null if there is no text.
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.
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.
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.
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.
addErrorListener
public void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
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
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
getCommand
public String getCommand()
- Returns the command.
- Returns:
- The command.
getMessageList
public AS400Message[] getMessageList()
- Returns the message list resulting from the last command
that was run.
- Returns:
- The message list.
getMessageText
public String getMessageText()
- Returns the text from the first message resulting from the
last command that was run.
- Returns:
- The message text.
getSystem
public AS400 getSystem()
- Returns the AS/400 on which commands are run.
- Returns:
- The AS400 on which commands are run.
removeActionCompletedListener
public void removeActionCompletedListener(ActionCompletedListener listener)
- Removes a action completed listener.
- Parameters:
- listener - The listener.
removeErrorListener
public void removeErrorListener(ErrorListener listener)
- Removes an error listener.
- Parameters:
- listener - The listener.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener.
- Parameters:
- listener - The listener.
- Overrides:
- removePropertyChangeListener in class JComponent
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener.
- Parameters:
- listener - The listener.
- Overrides:
- removeVetoableChangeListener in class JComponent
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.
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