diff options
author | Silenio Quarti | 2005-08-02 17:44:11 +0000 |
---|---|---|
committer | Silenio Quarti | 2005-08-02 17:44:11 +0000 |
commit | 964f59eb93aac781c2eac1ad63437d26303b0d27 (patch) | |
tree | 5c738b6703baf1d25144824dc2a7349c523edfe5 /bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse | |
parent | f92c8f667c089c683c12fe548693cb4621d6c940 (diff) | |
download | eclipse.platform.swt-964f59eb93aac781c2eac1ad63437d26303b0d27.tar.gz eclipse.platform.swt-964f59eb93aac781c2eac1ad63437d26303b0d27.tar.xz eclipse.platform.swt-964f59eb93aac781c2eac1ad63437d26303b0d27.zip |
104301
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse/swt/awt/SWT_AWT.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse/swt/awt/SWT_AWT.java index b205b8ef33..0acc96f66d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/emulated/org/eclipse/swt/awt/SWT_AWT.java @@ -32,6 +32,18 @@ public class SWT_AWT { */ public static String embeddedFrameClass; + /** + * Key for looking up the embedded frame for a Composite using + * getData(). + */ + static String EMBEDDED_FRAME_KEY = "org.eclipse.swt.awt.SWT_AWT.embeddedFrame"; + +public static Frame getFrame (Composite parent) { + if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); + if ((parent.getStyle () & SWT.EMBEDDED) == 0) return null; + return (Frame)parent.getData(EMBEDDED_FRAME_KEY); +} + /** * Creates a new <code>java.awt.Frame</code>. This frame is the root for * the AWT components that will be embedded within the composite. In order |