|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.ibm.as400.vaccess.VJavaApplicationCall
The VJavaApplicationCall class provides a visual interface to com.ibm.as400.access.JavaApplicationCall. The visual interface consists of two components: an input field where the program to run is specified and input is sent to the program, and an output text area where the output from the program is displayed.
GUI output generated by the Java program running on the AS/400 is not handled by this class. As in JavaApplicationCall, the Java program running on the AS/400 receives input via standard. The output text area displays output the AS/400 java program writes to standard out and standard error. GUI input/output must be handled via another mechanism such as Remote AWT.
There are two ways to set up the AS/400 Java environment:
You start the Java application using the java command. The syntax for this command is much like the syntax when running the command on the client. It is
AS400 system = new AS400("myAS400"); JavaApplicationCall javaCall = new JavaApplicationCall(system); VJavaApplicationCall vJavaCall = new VJavaApplicationCall(javaCall); JFrame f = new JFrame ("JavaApplicationCallExample"); f.getContentPane().setLayout(new BorderLayout ()); f.getContentPane().add("Center", vJavaCall); f.pack(); f.show();
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
VJavaApplicationCall()
Constructs a VJavaApplicationCall object. |
|
VJavaApplicationCall(JavaApplicationCall javaApplicationCall)
Constructs a VJavaApplicationCall object. |
Method Summary | |
void |
addErrorListener(ErrorListener listener)
Adds a listener to be notified when an error occurs. |
void |
addNotify()
Notification to VJavaApplicationCall that it now has a parent component. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property changes. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property changes. |
void |
addWorkingListener(WorkingListener listener)
Adds a listener to be notified when work starts and stops on potentially long running operations. |
protected void |
finalize()
Stops all threads. |
JavaApplicationCall |
getJavaApplicationCall()
Returns the access class which defines the Java application to run. |
javax.swing.JTextArea |
getOutputText()
Returns a reference to the JTextArea object. |
void |
keyPressed(java.awt.event.KeyEvent keyEvent)
A key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent keyEvent)
The key is released. |
void |
keyTyped(java.awt.event.KeyEvent keyEvent)
The key is typed. |
void |
removeErrorListener(ErrorListener listener)
Removes an error listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a vetoable change listener. |
void |
removeWorkingListener(WorkingListener listener)
Removes a working listener. |
void |
setJavaApplicationCall(JavaApplicationCall javaApplicationCall)
Sets the JavaApplicationCall object. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public VJavaApplicationCall()
public VJavaApplicationCall(JavaApplicationCall javaApplicationCall)
javaApplicationCall
- The access class which defines the
Java application to run.Method Detail |
public void addErrorListener(ErrorListener listener)
listener
- The listener.removeErrorListener(com.ibm.as400.vaccess.ErrorListener)
public void addNotify()
Since this method is called by Swing at the appropriate time, application code should not call this method.
addNotify
in class javax.swing.JComponent
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in class javax.swing.JComponent
listener
- The listener.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
addVetoableChangeListener
in class javax.swing.JComponent
listener
- The listener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void addWorkingListener(WorkingListener listener)
listener
- The listener.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- If an error occurs during cleanup.public JavaApplicationCall getJavaApplicationCall()
public javax.swing.JTextArea getOutputText()
public void keyPressed(java.awt.event.KeyEvent keyEvent)
keyPressed
in interface java.awt.event.KeyListener
keyEvent
- The key event.public void keyReleased(java.awt.event.KeyEvent keyEvent)
keyReleased
in interface java.awt.event.KeyListener
keyEvent
- The key event.public void keyTyped(java.awt.event.KeyEvent keyEvent)
keyTyped
in interface java.awt.event.KeyListener
keyEvent
- The key event.public void removeErrorListener(ErrorListener listener)
listener
- The listener.addErrorListener(com.ibm.as400.vaccess.ErrorListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in class javax.swing.JComponent
listener
- The listener.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
removeVetoableChangeListener
in class javax.swing.JComponent
listener
- The listener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void removeWorkingListener(WorkingListener listener)
listener
- The listener.public void setJavaApplicationCall(JavaApplicationCall javaApplicationCall) throws java.beans.PropertyVetoException
javaApplicationCall
- A com.ibm.as400.access.JavaApplicationCall
object which defines the Java application to call.java.beans.PropertyVetoException
- If the change is voted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |