61 public long getEmbedderHandle() {
62 return nsViewPtr;
63 }
64
65 @Override
66 public void registerAccelerator(AWTKeyStroke awtks) {
67 }
68
69 @Override
70 public void unregisterAccelerator(AWTKeyStroke awtks) {
71 }
72
73 public boolean isParentWindowActive() {
74 return isActive;
75 }
76
77 /*
78 * Synthetic event delivery for focus management
79 */
80 @Override
81 public void synthesizeWindowActivation(boolean activated) {
82 if (isActive != activated) {
83 isActive = activated;
84 ((LWWindowPeer)getPeer()).notifyActivation(activated, null);
85 }
86 }
87
88 /*
89 * Initializes the embedded frame bounds and validates a component.
90 * Designed to be called from the main thread
91 * This method should be called once from the initialization of the SWT_AWT Bridge
92 */
93 @SuppressWarnings("deprecation")
94 public void validateWithBounds(final int x, final int y, final int width, final int height) {
95 try {
96 LWCToolkit.invokeAndWait(new Runnable() {
97 @Override
98 public void run() {
99 ((LWWindowPeer) getPeer()).setBoundsPrivate(0, 0, width, height);
100 validate();
|
61 public long getEmbedderHandle() {
62 return nsViewPtr;
63 }
64
65 @Override
66 public void registerAccelerator(AWTKeyStroke awtks) {
67 }
68
69 @Override
70 public void unregisterAccelerator(AWTKeyStroke awtks) {
71 }
72
73 public boolean isParentWindowActive() {
74 return isActive;
75 }
76
77 /*
78 * Synthetic event delivery for focus management
79 */
80 @Override
81 @SuppressWarnings("deprecation")
82 public void synthesizeWindowActivation(boolean activated) {
83 if (isActive != activated) {
84 isActive = activated;
85 ((LWWindowPeer)getPeer()).notifyActivation(activated, null);
86 }
87 }
88
89 /*
90 * Initializes the embedded frame bounds and validates a component.
91 * Designed to be called from the main thread
92 * This method should be called once from the initialization of the SWT_AWT Bridge
93 */
94 @SuppressWarnings("deprecation")
95 public void validateWithBounds(final int x, final int y, final int width, final int height) {
96 try {
97 LWCToolkit.invokeAndWait(new Runnable() {
98 @Override
99 public void run() {
100 ((LWWindowPeer) getPeer()).setBoundsPrivate(0, 0, width, height);
101 validate();
|