/*
* 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.
*/
extends LWComponentPeer<T, D>
implements ContainerPeer
{
// List of child peers sorted by z-order from bottom-most
// to top-most
new LinkedList<LWComponentPeer>();
super(target, platformComponent);
}
synchronized (getPeerTreeLock()) {
}
}
synchronized (getPeerTreeLock()) {
}
// TODO: repaint
}
synchronized (getPeerTreeLock()) {
}
// TODO: repaint
}
// Used by LWComponentPeer.setZOrder()
synchronized (getPeerTreeLock()) {
if (index >= 0) {
} else {
// TODO: log
}
}
// TODO: repaint
}
// ---- PEER METHODS ---- //
/*
* Overridden in LWWindowPeer.
*/
}
public void beginValidate() {
// TODO: it seems that begin/endValidate() is only useful
// for heavyweight windows, when a batch movement for
// child windows occurs. That's why no-op
}
public void endValidate() {
// TODO: it seems that begin/endValidate() is only useful
// for heavyweight windows, when a batch movement for
// child windows occurs. That's why no-op
}
public void beginLayout() {
// Skip all painting till endLayout()
setLayouting(true);
}
public void endLayout() {
setLayouting(false);
// Post an empty event to flush all the pending target paints
}
// ---- PEER NOTIFICATIONS ---- //
/*
* Returns a copy of the childPeer collection.
*/
synchronized (getPeerTreeLock()) {
}
}
}
/**
* Removes bounds of children above specific child from the region. If above
* is null removes all bounds of children.
*/
aboveFound = true;
continue;
}
if (aboveFound) {
}
}
}
return r;
}
// ---- UTILITY METHODS ---- //
/**
* Finds a top-most visible component for the given point. The location is
* specified relative to the peer's parent.
*/
// Translate to this container's coordinates to pass to children
x -= r.x;
y -= r.y;
synchronized (getPeerTreeLock()) {
if (p != null) {
peer = p;
break;
}
}
}
}
return peer;
}
/*
* Called by the container when any part of this peer or child
* peers should be repainted
*/
return;
}
// First, post the PaintEvent for this peer
super.repaintPeer(toPaint);
// Second, handle all the children
// Use the straight order of children, so the bottom
// ones are painted first
}
/*
* Paints all the child peers in the straight z-order, so the
* bottom-most ones are painted first.
*/
}
}
return getSize();
}
public void setEnabled(final boolean e) {
super.setEnabled(e);
}
}
child.setBackground(c);
}
}
super.setBackground(c);
}
child.setForeground(c);
}
}
super.setForeground(c);
}
}
}
super.setFont(f);
}
super.paint(g);
}
super.print(g);
}
}