/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
long handle;
}
void initDispatching() {
try {
}
finally {
}
}
public boolean isObscured() { return false; }
public boolean canDetermineObscurity() { return false; }
public void setVisible(boolean b) {
if (!b) {
try {
}
finally {
}
} else {
try {
}
finally {
}
}
}
public void setEnabled(boolean b) {}
try {
}
finally {
}
}
switch (e.getID()) {
case FocusEvent.FOCUS_GAINED:
break;
case FocusEvent.FOCUS_LOST:
break;
case KeyEvent.KEY_PRESSED:
case KeyEvent.KEY_RELEASED:
if (!((InputEvent)e).isConsumed()) {
}
break;
}
}
try{
} finally {
}
}
try {
return res;
} finally {
}
}
try {
return res;
} finally {
}
}
public void dispose() {
}
public void updateCursorImmediately() {}
}
boolean focusedWindowChangeAllowed, long time)
{
if (lightweightChild == null) {
}
currentOwner = null;
}
if (currentOwner != null) {
}
// TODO: do we need to wrap in sequenced?
}
// End of Motif compatibility code
return true;
}
boolean temporary,
boolean focusedWindowChangeAllowed,
long time,
{
switch (result) {
return false;
// Currently we just generate focus events like we deal with lightweight instead of calling
// XSetInputFocus on native window
/**
* The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight
* checks that native window is focused while appropriate WINDOW_GAINED_FOCUS has not yet
* been processed - it is in EventQueue. Thus, SNFH allows native request and stores request record
* in requests list - and it breaks our requests sequence as first record on WGF should be the last focus
* owner which had focus before WLF. So, we should not add request record for such requests
* but store this component in mostRecent - and return true as before for compatibility.
*/
// Search for parent window
}
// and check that it is focused
if (!parentWindow.isFocused() &&
// if it is not - skip requesting focus on Solaris
// but return true for compatibility.
return true;
}
}
// NOTE: We simulate heavyweight behavior of Motif - component receives focus right
// after request, not after event. Normally, we should better listen for event
// by listeners.
// TODO: consider replacing with XKeyboardFocusManagerPeer.deliverFocus
// Motif compatibility code
// Either lightweight or excessive requiest - all events are generated.
return true;
}
return false;
}
public boolean isFocusable() {
return true;
}
public boolean handlesWheelScrolling() { return true; }
throws AWTException { }
public void destroyBuffers() { }
/**
* Used by lightweight implementations to tell a ComponentPeer to layout
* its sub-elements. For instance, a lightweight Checkbox needs to layout
* the box, as well as the text label.
*/
public void layout() {}
/**
* DEPRECATED: Replaced by getPreferredSize().
*/
return getPreferredSize();
}
/**
* DEPRECATED: Replaced by getMinimumSize().
*/
return getMinimumSize();
}
/**
* DEPRECATED: Replaced by setVisible(boolean).
*/
public void show() {
setVisible(true);
}
/**
* DEPRECATED: Replaced by setVisible(boolean).
*/
public void hide() {
setVisible(false);
}
/**
* DEPRECATED: Replaced by setEnabled(boolean).
*/
public void enable() {}
/**
* DEPRECATED: Replaced by setEnabled(boolean).
*/
public void disable() {}
/**
* DEPRECATED: Replaced by setBounds(int, int, int, int).
*/
}
}
}
void childResized() {
XToolkit.postEvent(XToolkit.targetToAppContext(proxy), new ComponentEvent(proxy, ComponentEvent.COMPONENT_RESIZED));
// XToolkit.postEvent(XToolkit.targetToAppContext(proxy), new InvocationEvent(proxy, new Runnable() {
// public void run() {
// getTopLevel(proxy).invalidate();
// getTopLevel(proxy).pack();
// }
// }));
}
childResized();
}
}
childResized();
}
switch (type) {
case XConstants.PropertyNotify:
break;
case XConstants.ConfigureNotify:
break;
}
}
void requestXEmbedFocus() {
public void run() {
}
}));
}
}
public boolean isReparentSupported() {
return false;
}
try {
} finally {
}
}
}
}
}
return false;
}
}