/*
* 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.
*/
public class TSFrame {
static volatile boolean done = false;
if (useNonOpaque) {
GradientPaint p =
w, h,
true);
} else {
}
}
}
}
}
NonOpaqueJFrame() {
super("NonOpaque Swing JFrame");
public void paintComponent(Graphics g) {
super.paintComponent(g);
}
};
p.setDoubleBuffered(false);
p.setOpaque(false);
add(p);
setUndecorated(true);
}
}
JPanel p;
super("NonOpaque Swing JAppletFrame");
super.paint(g);
}
};
p = new JPanel() {
public void paintComponent(Graphics g) {
super.paintComponent(g);
}
};
p.setDoubleBuffered(false);
p.setOpaque(false);
setUndecorated(true);
}
}
NonOpaqueFrame() {
super("NonOpaque AWT Frame");
// uncomment to test with hw child
// setLayout(null);
// Component c = new Panel() {
// public void paint(Graphics g) {
// g.setColor(new Color(1.0f, 1.0f, 1.0f, 0.5f));
// g.fillRect(0, 0, getWidth(), getHeight());
// }
// };
// c.setSize(100, 100);
// c.setBackground(Color.red);
// c.setForeground(Color.red);
// add(c);
// c.setLocation(130, 130);
}
}
}
}
}
final boolean useSwing,
final boolean useShape,
final boolean useTransl,
final boolean useNonOpaque,
final float factor)
{
done = false;
if (useNonOpaque) {
if (useSwing) {
frame = new NonOpaqueJFrame();
// frame = new NonOpaqueJAppletFrame(gc);
} else {
frame = new NonOpaqueFrame();
}
} else if (useSwing) {
p = new MyJPanel();
animateComponent(p);
} else {
}
};
animateComponent(c);
c = new MyCanvas();
animateComponent(c);
c = new MyCanvas();
animateComponent(c);
}
public void windowClosing(WindowEvent e) {
done = true;
}
});
public void mouseClicked(MouseEvent e) {
done = true;
}
});
if (useShape) {
frame.setUndecorated(true);
}
if (useShape) {
} else {
}
}
if (useTransl) {
} else {
}
}
if (useNonOpaque) {
} else {
}
}
frame.setVisible(true);
return frame;
}
public static void stopThreads() {
done = true;
}
public void run() {
do {
try {
} catch (InterruptedException ex) {}
} while (!done);
}
});
t.start();
}
public void run() {
0.7f);
}
});
}
}