95 SunToolkit stk = (SunToolkit)Toolkit.getDefaultToolkit();
96 try {
97 setPeer(stk.createLightweightFrame(this));
98 } catch (Exception e) {
99 throw new RuntimeException(e);
100 }
101 }
102 super.addNotify();
103 }
104 }
105
106 private void setPeer(final FramePeer p) {
107 AWTAccessor.getComponentAccessor().setPeer(this, p);
108 }
109
110 /**
111 * Requests the peer to emulate activation or deactivation of the
112 * frame. Peers should override this method if they are to implement
113 * this functionality.
114 *
115 * @param activate if <code>true</code>, activates the frame;
116 * otherwise, deactivates the frame
117 */
118 public void emulateActivation(boolean activate) {
119 final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
120 peer.emulateActivation(activate);
121 }
122
123 /**
124 * Delegates the focus grab action to the client (embedding) application.
125 * The method is called by the AWT grab machinery.
126 *
127 * @see SunToolkit#grab(java.awt.Window)
128 */
129 public abstract void grabFocus();
130
131 /**
132 * Delegates the focus ungrab action to the client (embedding) application.
133 * The method is called by the AWT grab machinery.
134 *
135 * @see SunToolkit#ungrab(java.awt.Window)
|
95 SunToolkit stk = (SunToolkit)Toolkit.getDefaultToolkit();
96 try {
97 setPeer(stk.createLightweightFrame(this));
98 } catch (Exception e) {
99 throw new RuntimeException(e);
100 }
101 }
102 super.addNotify();
103 }
104 }
105
106 private void setPeer(final FramePeer p) {
107 AWTAccessor.getComponentAccessor().setPeer(this, p);
108 }
109
110 /**
111 * Requests the peer to emulate activation or deactivation of the
112 * frame. Peers should override this method if they are to implement
113 * this functionality.
114 *
115 * @param activate if {@code true}, activates the frame;
116 * otherwise, deactivates the frame
117 */
118 public void emulateActivation(boolean activate) {
119 final FramePeer peer = AWTAccessor.getComponentAccessor().getPeer(this);
120 peer.emulateActivation(activate);
121 }
122
123 /**
124 * Delegates the focus grab action to the client (embedding) application.
125 * The method is called by the AWT grab machinery.
126 *
127 * @see SunToolkit#grab(java.awt.Window)
128 */
129 public abstract void grabFocus();
130
131 /**
132 * Delegates the focus ungrab action to the client (embedding) application.
133 * The method is called by the AWT grab machinery.
134 *
135 * @see SunToolkit#ungrab(java.awt.Window)
|