All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.vaccess.ProgramCallMenuItem

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

public class ProgramCallMenuItem
extends JMenuItem
implements Serializable
The ProgramCallMenuItem class represents a menu item that calls an AS/400 program when pressed. The results of the program are returned in a message list.

ProgramCallMenuItem objects generate the following events:

See Also:
ProgramCall, AS400Message

Constructor Index

 o ProgramCallMenuItem()
Constructs a ProgramCallMenuItem object.
 o ProgramCallMenuItem(String)
Constructs a ProgramCallMenuItem object.
 o ProgramCallMenuItem(String, Icon)
Constructs a ProgramCallMenuItem object.
 o ProgramCallMenuItem(String, Icon, AS400)
Constructs a ProgramCallMenuItem object.
 o ProgramCallMenuItem(String, Icon, AS400, String, ProgramParameter[])
Constructs a ProgramCallMenuItem object.

Method Index

 o addActionCompletedListener(ActionCompletedListener)
Adds a listener to be notified when an action is completed.
 o addErrorListener(ErrorListener)
Adds a listener to be notified when an error occurs.
 o addParameter(ProgramParameter)
Adds a parameter to the parameter list.
 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 getMessageList()
Returns the message list resulting from the last program call that was run.
 o getMessageText()
Returns the message text from the last program that was run.
 o getParameterList()
Returns the parameter list.
 o getProgram()
Returns the program which will be called when the button is pressed.
 o getSystem()
Returns the AS/400 on which programs 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 setParameterList(ProgramParameter[])
Sets the list of parameters to pass to the AS/400 program.
 o setProgram(String)
Sets the program.
 o setSystem(AS400)
Sets the AS/400 on which programs are run.

Constructors

 o ProgramCallMenuItem
 public ProgramCallMenuItem()
Constructs a ProgramCallMenuItem object.

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

Parameters:
text - The menu item text, or null if there is no text.
 o ProgramCallMenuItem
 public ProgramCallMenuItem(String text,
                            Icon icon)
Constructs a ProgramCallMenuItem 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 ProgramCallMenuItem
 public ProgramCallMenuItem(String text,
                            Icon icon,
                            AS400 system)
Constructs a ProgramCallMenuItem 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 the programs are run.
 o ProgramCallMenuItem
 public ProgramCallMenuItem(String text,
                            Icon icon,
                            AS400 system,
                            String program,
                            ProgramParameter parmlist[])
Constructs a ProgramCallMenuItem 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 the programs are run.
program - The program name as a fully qualified path name in the library file system. The library and program name must each be 10 characters or less.
parmlist - A list of up to 35 parameters with which to run the program.

Methods

 o addActionCompletedListener
 public void addActionCompletedListener(ActionCompletedListener listener)
Adds a listener to be notified when an action is completed.

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 addParameter
 public void addParameter(ProgramParameter parameter) throws PropertyVetoException
Adds a parameter to the parameter list.

Parameters:
parameter - The parameter.
Throws: PropertyVetoException
If the change is vetoed.
 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 getMessageList
 public AS400Message[] getMessageList()
Returns the message list resulting from the last program call that was run.

Returns:
The message list.
 o getMessageText
 public String getMessageText()
Returns the message text from the last program that was run. The message will be the first message received.

Returns:
The message text.
 o getParameterList
 public ProgramParameter[] getParameterList()
Returns the parameter list.

Returns:
The parameter list.
 o getProgram
 public String getProgram()
Returns the program which will be called when the button is pressed.

Returns:
The program which will be called when the button is pressed.
 o getSystem
 public AS400 getSystem()
Returns the AS/400 on which programs are run.

Returns:
The AS400 on which programs 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 setParameterList
 public void setParameterList(ProgramParameter parmlist[]) throws PropertyVetoException
Sets the list of parameters to pass to the AS/400 program.

Parameters:
parmlist - A list of up to 35 parameters with which to run the program. It will replace any parameters previously set.
Throws: PropertyVetoException
If the change is vetoed.
 o setProgram
 public void setProgram(String program) throws PropertyVetoException
Sets the program.

Parameters:
program - The program.
Throws: PropertyVetoException
If the change is vetoed.
 o setSystem
 public void setSystem(AS400 system) throws PropertyVetoException
Sets the AS/400 on which programs are run.

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

All Packages  Class Hierarchy  This Package  Previous  Next  Index