All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.vaccess.ProgramCallButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.AbstractButton
|
+----com.sun.java.swing.JButton
|
+----com.ibm.as400.vaccess.ProgramCallButton
- public class ProgramCallButton
- extends JButton
- implements Serializable
The ProgramCallButton class represents a button
that calls an AS/400 program when pressed.
Results of the program are returned in a message list.
ProgramCallButton objects generate the following events:
- ActionCompletedEvent
- ErrorEvent
- PropertyChangeEvent
- See Also:
- ProgramCall, AS400Message
-
ProgramCallButton()
- Constructs a ProgramCallButton object.
-
ProgramCallButton(String)
- Constructs a ProgramCallButton object.
-
ProgramCallButton(String, Icon)
- Constructs a ProgramCallButton object.
-
ProgramCallButton(String, Icon, AS400)
- Constructs a ProgramCallButton object.
-
ProgramCallButton(String, Icon, AS400, String, ProgramParameter[])
- Constructs a ProgramCallButton object.
-
addActionCompletedListener(ActionCompletedListener)
- Adds a listener to be notified when a program has been called.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addParameter(ProgramParameter)
- Adds a parameter to the end of the parameter list.
-
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.
-
getMessageList()
- Returns the message list resulting from the last program call
that was run.
-
getMessageText()
- Returns the message text from the last program that was run.
-
getParameterList()
- Returns the parameter list.
-
getProgram()
- Returns the program which will be called when the button is pressed.
-
getSystem()
- Returns the AS/400 on which programs are run.
-
removeActionCompletedListener(ActionCompletedListener)
- Removes an action completed listener.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener.
-
setParameterList(ProgramParameter[])
- Sets the list of parameters to pass to the AS/400 program.
-
setProgram(String)
- Sets the program.
-
setSystem(AS400)
- Sets the AS/400 on which programs are run.
ProgramCallButton
public ProgramCallButton()
- Constructs a ProgramCallButton object.
ProgramCallButton
public ProgramCallButton(String text)
- Constructs a ProgramCallButton object.
- Parameters:
- text - The button text, or null if there is no text.
ProgramCallButton
public ProgramCallButton(String text,
Icon icon)
- Constructs a ProgramCallButton object.
- Parameters:
- text - The button text, or null if there is no text.
- icon - The button icon, or null if there is no icon.
ProgramCallButton
public ProgramCallButton(String text,
Icon icon,
AS400 system)
- Constructs a ProgramCallButton object.
- Parameters:
- text - The button text, or null if there is no text.
- icon - The button icon, or null if there is no icon.
- system - The AS/400 on which the programs are run.
ProgramCallButton
public ProgramCallButton(String text,
Icon icon,
AS400 system,
String program,
ProgramParameter parmlist[])
- Constructs a ProgramCallButton object.
- Parameters:
- text - The button text, or null if there is no text.
- icon - The button 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.
addActionCompletedListener
public void addActionCompletedListener(ActionCompletedListener listener)
- Adds a listener to be notified when a program has been called.
- Parameters:
- listener - The listener.
addErrorListener
public void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
addParameter
public void addParameter(ProgramParameter parameter) throws PropertyVetoException
- Adds a parameter to the end of the parameter list.
- Parameters:
- parameter - The parameter.
- Throws: PropertyVetoException
- If the change is vetoed.
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
getMessageList
public AS400Message[] getMessageList()
- Returns the message list resulting from the last program call
that was run.
- Returns:
- The message list.
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.
getParameterList
public ProgramParameter[] getParameterList()
- Returns the parameter list.
- Returns:
- The parameter list.
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.
getSystem
public AS400 getSystem()
- Returns the AS/400 on which programs are run.
- Returns:
- The AS400 on which programs are run.
removeActionCompletedListener
public void removeActionCompletedListener(ActionCompletedListener listener)
- Removes an 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
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.
setProgram
public void setProgram(String program) throws PropertyVetoException
- Sets the program.
- Parameters:
- program - The program.
- Throws: PropertyVetoException
- If the change is veoted.
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