home *** CD-ROM | disk | FTP | other *** search
- package sun.awt.windows;
-
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Font;
- import java.awt.Window;
- import java.awt.peer.WindowPeer;
- import java.util.Vector;
-
- class WWindowPeer extends WContainerPeer implements WindowPeer {
- static Vector allWindows = new Vector();
-
- native void create(WComponentPeer var1);
-
- public synchronized native void toFront();
-
- public native void toBack();
-
- WWindowPeer(Window var1) {
- super(var1);
- allWindows.addElement(this);
- if (super.applet != null) {
- super.applet.addTopLevelWindow(var1);
- }
-
- Font var2 = ((Component)var1).getFont();
- if (var2 == null) {
- var2 = new Font("Dialog", 0, 12);
- ((Component)var1).setFont(var2);
- ((WComponentPeer)this).setFont(var2);
- }
-
- Color var3 = ((Component)var1).getBackground();
- if (var3 == null) {
- ((Component)var1).setBackground(Color.lightGray);
- ((WComponentPeer)this).setBackground(Color.lightGray);
- }
-
- var3 = ((Component)var1).getForeground();
- if (var3 == null) {
- ((Component)var1).setForeground(Color.black);
- ((WComponentPeer)this).setForeground(Color.black);
- }
-
- }
-
- public void dispose() {
- allWindows.removeElement(this);
- if (super.applet != null) {
- super.applet.removeTopLevelWindow((Window)super.target);
- }
-
- super.dispose();
- }
- }
-