Class HELLOSWING

java.lang.Object
  |
  +--HELLOSWING

public class HELLOSWING
extends java.lang.Object

UD5 Example Class.

This class is provided for example purposes only.

Version:
$Revision: 1.6 $
Author:
Copyright (c) 2001 by March Hare Pty Ltd, Inc. All Rights Reserved.

Constructor Summary
HELLOSWING()
           
 
Method Summary
static double DDIALOG(java.lang.String parm1, java.lang.String parm2)
          Entry point for creating a Swing Dialog from Uniface.
static java.lang.String DIALOG(java.lang.String parm1, java.lang.String parm2)
          Entry point for creating a Swing Dialog from Uniface.
static void EXEC()
          Main entry point for calling from Uniface.
static int IDIALOG(java.lang.String parm1, java.lang.String parm2)
          Entry point for creating a Swing Dialog from Uniface.
static void main(java.lang.String[] args)
          Test the class.
static int QUIT()
          Notify calling Uniface application and quit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HELLOSWING

public HELLOSWING()
Method Detail

main

public static void main(java.lang.String[] args)
Test the class. Typically called from the command line to test the installation
    java HELLOSWING
    
 
Returns:
if successful, the window will display. To terminate close the window, and press Ctrl-C.
Throws:
Any -  

QUIT

public static int QUIT()
Notify calling Uniface application and quit. Calls the Uniface operation CLOSING_SWING int he component instance TEST_JAVA, with a string parameter "Bye". This class then "closes" the swing window.
Returns:
if successful, returns 0.

EXEC

public static void EXEC()
Main entry point for calling from Uniface. Loads the UD5 Uniface call-in library, and opens a swing "window". This method also registers a listener for the windowClosnig event so that the QUIT method can be called.
Returns:
if successful, returns 0.
See Also:
QUIT()

DIALOG

public static java.lang.String DIALOG(java.lang.String parm1,
                                      java.lang.String parm2)
Entry point for creating a Swing Dialog from Uniface. Creates a dialog box with 2 options. The chosen option is returned to the Uniface caller. The Swing sub-system must already be initialised by a call to HELLOSWING.EXEC.
Parameters:
parm1 - first dialog button text.
parm2 - second dialog button text.
Returns:
the string "res: 0" or "res: 1".
See Also:
EXEC()

IDIALOG

public static int IDIALOG(java.lang.String parm1,
                          java.lang.String parm2)
Entry point for creating a Swing Dialog from Uniface. Creates a dialog box with 2 options. The chosen option is returned to the Uniface caller. The Swing sub-system must already be initialised by a call to HELLOSWING.EXEC.
Parameters:
parm1 - first dialog button text.
parm2 - second dialog button text.
Returns:
the numeric (int) value 0 or 1.
See Also:
EXEC()

DDIALOG

public static double DDIALOG(java.lang.String parm1,
                             java.lang.String parm2)
Entry point for creating a Swing Dialog from Uniface. Creates a dialog box with 2 options. The chosen option is returned to the Uniface caller. The Swing sub-system must already be initialised by a call to HELLOSWING.EXEC.
Parameters:
parm1 - first dialog button text.
parm2 - second dialog button text.
Returns:
the numeric (double) value 0 or 1.
See Also:
EXEC()