< prev index next >

src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java

Print this page




  39  * An EmbeddedFrame has two related uses:
  40  *
  41  * . Within a Java-based application, an EmbeddedFrame serves as a sort of
  42  *   firewall, preventing the contained components or applets from using
  43  *   getParent() to find parent components, such as menubars.
  44  *
  45  * . Within a C-based application, an EmbeddedFrame contains a window handle
  46  *   which was created by the application, which serves as the top-level
  47  *   Java window.  EmbeddedFrames created for this purpose are passed-in a
  48  *   handle of an existing window created by the application.  The window
  49  *   handle should be of the appropriate native type for a specific
  50  *   platform, as stored in the pData field of the ComponentPeer.
  51  *
  52  * @author      Thomas Ball
  53  */
  54 public abstract class EmbeddedFrame extends Frame
  55                           implements KeyEventDispatcher, PropertyChangeListener {
  56 
  57     private boolean isCursorAllowed = true;
  58     private boolean supportsXEmbed = false;

  59     private KeyboardFocusManager appletKFM;
  60     // JDK 1.1 compatibility
  61     private static final long serialVersionUID = 2967042741780317130L;
  62 
  63     /*
  64      * The constants define focus traversal directions.
  65      * Use them in {@code traverseIn}, {@code traverseOut} methods.
  66      */
  67     protected static final boolean FORWARD = true;
  68     protected static final boolean BACKWARD = false;
  69 
  70     public boolean supportsXEmbed() {
  71         return supportsXEmbed && SunToolkit.needsXEmbed();
  72     }
  73 
  74     protected EmbeddedFrame(boolean supportsXEmbed) {
  75         this((long)0, supportsXEmbed);
  76     }
  77 
  78 




  39  * An EmbeddedFrame has two related uses:
  40  *
  41  * . Within a Java-based application, an EmbeddedFrame serves as a sort of
  42  *   firewall, preventing the contained components or applets from using
  43  *   getParent() to find parent components, such as menubars.
  44  *
  45  * . Within a C-based application, an EmbeddedFrame contains a window handle
  46  *   which was created by the application, which serves as the top-level
  47  *   Java window.  EmbeddedFrames created for this purpose are passed-in a
  48  *   handle of an existing window created by the application.  The window
  49  *   handle should be of the appropriate native type for a specific
  50  *   platform, as stored in the pData field of the ComponentPeer.
  51  *
  52  * @author      Thomas Ball
  53  */
  54 public abstract class EmbeddedFrame extends Frame
  55                           implements KeyEventDispatcher, PropertyChangeListener {
  56 
  57     private boolean isCursorAllowed = true;
  58     private boolean supportsXEmbed = false;
  59     @SuppressWarnings("serial") // Not statically typed as Serializable
  60     private KeyboardFocusManager appletKFM;
  61     // JDK 1.1 compatibility
  62     private static final long serialVersionUID = 2967042741780317130L;
  63 
  64     /*
  65      * The constants define focus traversal directions.
  66      * Use them in {@code traverseIn}, {@code traverseOut} methods.
  67      */
  68     protected static final boolean FORWARD = true;
  69     protected static final boolean BACKWARD = false;
  70 
  71     public boolean supportsXEmbed() {
  72         return supportsXEmbed && SunToolkit.needsXEmbed();
  73     }
  74 
  75     protected EmbeddedFrame(boolean supportsXEmbed) {
  76         this((long)0, supportsXEmbed);
  77     }
  78 
  79 


< prev index next >