Sun 3270 Pathway Migration Guide
|

|
Due to the nature of the changes made to the API of 3270 Pathway, release 2.0, any Java code that was written to use a prior version of 3270 Pathway, will not work with the 2.0 or later release. This affects both Java source code as well as compiled code.
If you wish to modify code that uses a prior release of Pathway so that it works with this release, read the following guide and make the necessary changes to your Java source code.
If you are not migrating from a previous release of 3270 Pathway, you may disregard this guide.
Package Names
The packages and classes in the Pathway API have undergone name changes. The old package name for 3270 Pathway was: unikix.clientapis.emulator
The new package name is: com.sun.emp.pathway.bean. Change any code that references the old package so that it references the new package.
Class Names
All of the exposed classes in 3270 Pathway have changed names in the 2.0 release. The following table lists the old and new names.
Change any Java source code that uses the old class names so that it uses the new class names.
The Terminal class (formerly the KixEmulator class) has undergone significant
change in the 2.0. release of 3270 Pathway. The following sections detail
the changes.
Note: Removed methods no longer exist within the API. They have not been deprecated. Attempting to call a removed method will result in an error.
Terminal Subclasses JComponent
Terminal is a subclass of javax.swing.JComponent, whereas previously,
KixEmulator was a subclass of java.awt.Component. This change allows the user
to make use of various SWING facilities. We recommend that you use the Terminal
along with SWING components rather than AWT components.
Listeners
The following Listener methods have been removed:
- void addKixEmulatorListener(KixEmulatorListener l)
- void removeKixEmulatorListener(KixEmulatorListener l)
They have been replaced by the methods:
Key Handling
The following methods have been removed:
- boolean getKeyHandling()
- void setKeyHandling(boolean b)
If you wish to disable keyboard handling in the Terminal, you will need to
override the method:
protected void processKeyEvent(KeyEvent ke).
New Exceptions
The following methods now throw an IllegalArgumentException
if supplied with illegal parameters:
Buffers
The following methods have had their return type changed:
- public short[] getCharSetBuffer()
- public char[] getColorBuffer()
- public char[] getExtendedAttributeBuffer()
These methods now all return byte[]. The methods are:
Font Resizing
The Font of the Terminal is now automatically chosen by the Terminal when it is placed upon a Container. As the container is resized, the Font of the Terminal may increase or decrease as required, to ensure that the whole of the Terminal display fits within the space that it has available. This is the default behaviour of a new instance of a Terminal.
To supply control over this behaviour, the following methods are available:
Codepages
The host codepage CODEPAGE_DEFAULT
has been removed. The default host codepage is now CODEPAGE_IBM1047.
Print Styles
The print style PRINTSTYLE_REVERSE
has been removed. It has been replaced by PRINTSTYLE_COLOR_ON_WHITE.
Printing
The Terminal class has a new method getPrintable() which returns an object suitable for use with the JDK 1.4 printing APIs. It produces a representation of the current terminal centered on a printed page.
Copyright © 2003 by Sun Microsystems, Inc. All Rights Reserved.