home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / 1&1 / java.z / java_301 / sun / awt / windows / WFramePeer.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-10-20  |  2.2 KB  |  62 lines

  1. package sun.awt.windows;
  2.  
  3. import java.awt.Event;
  4. import java.awt.Frame;
  5. import java.awt.Image;
  6. import java.awt.MenuBar;
  7. import java.awt.peer.FramePeer;
  8. import sun.awt.image.ImageRepresentation;
  9.  
  10. class WFramePeer extends WWindowPeer implements FramePeer {
  11.    native void create(WComponentPeer var1);
  12.  
  13.    public native void setTitle(String var1);
  14.  
  15.    public void setIconImage(Image im) {
  16.    }
  17.  
  18.    public native void setMenuBar(MenuBar var1);
  19.  
  20.    public native void setResizable(boolean var1);
  21.  
  22.    public native void setCursor(int var1);
  23.  
  24.    native void widget_setIconImage(ImageRepresentation var1);
  25.  
  26.    WFramePeer(Frame target) {
  27.       super(target);
  28.       if (target.getTitle() != null) {
  29.          this.setTitle(target.getTitle());
  30.       }
  31.  
  32.       Image icon = target.getIconImage();
  33.       if (icon != null) {
  34.          this.setIconImage(icon);
  35.       }
  36.  
  37.       if (target.getCursorType() != 0) {
  38.          this.setCursor(target.getCursorType());
  39.       }
  40.  
  41.       this.setResizable(target.isResizable());
  42.    }
  43.  
  44.    public void handleIconify(long when) {
  45.       super.target.postEvent(new Event(super.target, 203, (Object)null));
  46.    }
  47.  
  48.    public void handleDeiconify(long when) {
  49.       super.target.postEvent(new Event(super.target, 204, (Object)null));
  50.    }
  51.  
  52.    protected void handleMoved(long when, int data, int x, int y) {
  53.       super.target.postEvent(new Event(super.target, 0L, 205, x, y, 0, 0));
  54.    }
  55.  
  56.    protected void handleResize(long when, int u1, int width, int height, int u4, int u5) {
  57.       super.target.invalidate();
  58.       super.target.validate();
  59.       super.target.repaint();
  60.    }
  61. }
  62.