src/solaris/classes/sun/awt/X11/XDecoratedPeer.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -316,11 +316,11 @@
if (isEmbedded()) {
setReparented(true);
insets_corrected = true;
return;
}
- Component t = (Component)target;
+ Component t = target;
if (getDecorations() == XWindowAttributesData.AWT_DECOR_NONE) {
setReparented(true);
insets_corrected = true;
reshape(dimensions, SET_SIZE, false);
} else if (xe.get_parent() == root) {
@@ -426,11 +426,11 @@
}
}
public void handleMoved(WindowDimensions dims) {
Point loc = dims.getLocation();
- AWTAccessor.getComponentAccessor().setLocation((Component)target, loc.x, loc.y);
+ AWTAccessor.getComponentAccessor().setLocation(target, loc.x, loc.y);
postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED));
}
protected Insets guessInsets() {
@@ -534,12 +534,12 @@
// This actually is needed to preserve compatibility with previous releases -
// some of licensees are expecting componentMoved event on invisible one while
// its location changes.
Point oldLocation = getLocation();
- Point newLocation = new Point(AWTAccessor.getComponentAccessor().getX((Component)target),
- AWTAccessor.getComponentAccessor().getY((Component)target));
+ Point newLocation = new Point(AWTAccessor.getComponentAccessor().getX(target),
+ AWTAccessor.getComponentAccessor().getY(target));
if (!newLocation.equals(oldLocation)) {
handleMoved(newDimensions);
}
@@ -736,11 +736,11 @@
}
updateChildrenSizes();
// Bounds of the window
- Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds((Component)target);
+ Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds(target);
Point newLocation = getNewLocation(xe, currentInsets.left, currentInsets.top);
WindowDimensions newDimensions =
new WindowDimensions(newLocation,
@@ -1050,14 +1050,14 @@
System.err.println(">>> Peer: " + x + ", " + y + ", " + width + ", " + height);
}
final void dumpTarget() {
AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
- int getWidth = compAccessor.getWidth((Component)target);
- int getHeight = compAccessor.getHeight((Component)target);
- int getTargetX = compAccessor.getX((Component)target);
- int getTargetY = compAccessor.getY((Component)target);
+ int getWidth = compAccessor.getWidth(target);
+ int getHeight = compAccessor.getHeight(target);
+ int getTargetX = compAccessor.getX(target);
+ int getTargetY = compAccessor.getY(target);
System.err.println(">>> Target: " + getTargetX + ", " + getTargetY + ", " + getWidth + ", " + getHeight);
}
final void dumpShell() {
dumpWindow("Shell", getShell());