public class SWT_AWT
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
EMBEDDED_FRAME_KEY
Key for looking up the embedded frame for a Composite using
getData().
|
static java.lang.String |
embeddedFrameClass
The name of the embedded Frame class.
|
(package private) static boolean |
loaded |
(package private) static boolean |
swingInitialized |
Constructor and Description |
---|
SWT_AWT() |
Modifier and Type | Method and Description |
---|---|
(package private) static int |
getAWTHandle(java.awt.Canvas canvas) |
static java.awt.Frame |
getFrame(Composite parent)
Returns a
java.awt.Frame which is the embedded frame
associated with the specified composite. |
(package private) static void |
initializeSwing() |
(package private) static void |
loadLibrary() |
static java.awt.Frame |
new_Frame(Composite parent)
Creates a new
java.awt.Frame . |
static Shell |
new_Shell(Display display,
java.awt.Canvas parent)
Creates a new
Shell . |
public static java.lang.String embeddedFrameClass
null
.static java.lang.String EMBEDDED_FRAME_KEY
static boolean loaded
static boolean swingInitialized
static final int getAWTHandle(java.awt.Canvas canvas)
static void loadLibrary()
static void initializeSwing()
public static java.awt.Frame getFrame(Composite parent)
java.awt.Frame
which is the embedded frame
associated with the specified composite.parent
- the parent Composite
of the java.awt.Frame
java.awt.Frame
the embedded frame or null
.java.lang.IllegalArgumentException
- public static java.awt.Frame new_Frame(Composite parent)
java.awt.Frame
. This frame is the root for
the AWT components that will be embedded within the composite. In order
for the embedding to succeed, the composite must have been created
with the SWT.EMBEDDED style.
IMPORTANT: As of JDK1.5, the embedded frame does not receive mouse events.
When a lightweight component is added as a child of the embedded frame,
the cursor does not change. In order to work around both these problems, it is
strongly recommended that a heavyweight component such as java.awt.Panel
be added to the frame as the root of all components.
parent
- the parent Composite
of the new java.awt.Frame
java.awt.Frame
to be the parent of the embedded AWT componentsjava.lang.IllegalArgumentException
- public static Shell new_Shell(Display display, java.awt.Canvas parent)
Shell
. This Shell is the root for
the SWT widgets that will be embedded within the AWT canvas.display
- the display for the new Shellparent
- the parent java.awt.Canvas
of the new ShellShell
to be the parent of the embedded SWT widgetsjava.lang.IllegalArgumentException
-