src/solaris/classes/sun/awt/X11/XBaseWindow.java
Print this page
@@ -158,11 +158,13 @@
/**
* Called after window creation, descendants should override to initialize Window
* with class-specific values and perform post-initialization actions.
*/
void postInit(XCreateWindowParams params) {
- if (log.isLoggable(PlatformLogger.FINE)) log.fine("WM name is " + getWMName());
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("WM name is " + getWMName());
+ }
updateWMName();
// Set WM_CLIENT_LEADER property
initClientLeader();
}
@@ -478,11 +480,13 @@
}
return hints;
}
public void setSizeHints(long flags, int x, int y, int width, int height) {
- if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
+ if (insLog.isLoggable(PlatformLogger.FINER)) {
+ insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
+ }
XToolkit.awtLock();
try {
XSizeHints hints = getHints();
// Note: if PPosition is not set in flags this means that
// we want to reset PPosition in hints. This is necessary
@@ -539,12 +543,14 @@
}
}
flags |= XUtilConstants.PWinGravity;
hints.set_flags(flags);
hints.set_win_gravity((int)XConstants.NorthWestGravity);
- if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
+ if (insLog.isLoggable(PlatformLogger.FINER)) {
+ insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
", values " + hints);
+ }
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData);
} finally {
XToolkit.awtUnlock();
}
}
@@ -591,20 +597,24 @@
}
}
public void xRequestFocus(long time) {
XToolkit.awtLock();
try {
- if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
+ focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
+ }
XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time);
} finally {
XToolkit.awtUnlock();
}
}
public void xRequestFocus() {
XToolkit.awtLock();
try {
- if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
+ focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
+ }
XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow());
} finally {
XToolkit.awtUnlock();
}
}
@@ -617,11 +627,13 @@
XToolkit.awtUnlock();
}
}
public void xSetVisible(boolean visible) {
- if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("Setting visible on " + this + " to " + visible);
+ }
XToolkit.awtLock();
try {
this.visible = visible;
if (visible) {
XlibWrapper.XMapWindow(XToolkit.getDisplay(), getWindow());
@@ -702,11 +714,13 @@
public void xSetBounds(int x, int y, int width, int height) {
if (getWindow() == 0) {
insLog.warning("Attempt to resize uncreated window");
throw new IllegalStateException("Attempt to resize uncreated window");
}
+ if (insLog.isLoggable(PlatformLogger.FINE)) {
insLog.fine("Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height);
+ }
width = Math.max(MIN_SIZE, width);
height = Math.max(MIN_SIZE, height);
XToolkit.awtLock();
try {
XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), getWindow(), x,y,width,height);
@@ -1070,11 +1084,13 @@
target.dispatchEvent(ev);
}
}
public void dispatchEvent(XEvent xev) {
- if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xev.toString());
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+ eventLog.finest(xev.toString());
+ }
int type = xev.get_type();
if (isDisposed()) {
return;
}