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 void toFront() {
- ((WComponentPeer)this).show();
- }
-
- public native void toBack();
-
- WWindowPeer(Window target) {
- super(target);
- allWindows.addElement(this);
- Font f = ((Component)target).getFont();
- if (f == null) {
- f = new Font("Dialog", 0, 12);
- ((Component)target).setFont(f);
- ((WComponentPeer)this).setFont(f);
- }
-
- Color c = ((Component)target).getBackground();
- if (c == null) {
- ((Component)target).setBackground(Color.lightGray);
- ((WComponentPeer)this).setBackground(Color.lightGray);
- }
-
- c = ((Component)target).getForeground();
- if (c == null) {
- ((Component)target).setForeground(Color.black);
- ((WComponentPeer)this).setForeground(Color.black);
- }
-
- }
-
- public void dispose() {
- allWindows.removeElement(this);
- super.dispose();
- }
- }
-