home *** CD-ROM | disk | FTP | other *** search
- package sun.awt.windows;
-
- import java.awt.Component;
- import java.awt.Cursor;
- import java.awt.Dimension;
- import java.awt.Frame;
- import java.awt.Image;
- import java.awt.MenuBar;
- import java.awt.peer.FramePeer;
- import sun.awt.image.ImageRepresentation;
-
- class WFramePeer extends WWindowPeer implements FramePeer {
- public Dimension minimumSize() {
- int var1 = ((Frame)super.target).getMenuBar() != null ? 45 : 30;
- return new Dimension(30, var1);
- }
-
- public void setIconImage(Image var1) {
- ImageRepresentation var2 = ((WImage)var1).getImageRep();
- var2.reconstruct(32);
- this._setIconImage(var2);
- }
-
- public void setMenuBar(MenuBar var1) {
- WMenuBarPeer var2 = (WMenuBarPeer)WToolkit.targetToPeer(var1);
- this.setMenuBar0(var2);
- ((WWindowPeer)this).updateInsets(super.insets_);
- }
-
- private native void setMenuBar0(WMenuBarPeer var1);
-
- WFramePeer(Frame var1) {
- super(var1);
- }
-
- native void create(WComponentPeer var1);
-
- void initialize() {
- super.initialize();
- Frame var1 = (Frame)super.target;
- if (var1.getTitle() != null) {
- ((WWindowPeer)this).setTitle(var1.getTitle());
- }
-
- ((WWindowPeer)this).setResizable(var1.isResizable());
- Image var2 = var1.getIconImage();
- if (var2 != null) {
- this.setIconImage(var2);
- }
-
- if (!((Component)var1).getCursor().equals(Cursor.getDefaultCursor())) {
- ((WComponentPeer)this).setCursor(((Component)var1).getCursor());
- }
-
- }
-
- native void _setIconImage(ImageRepresentation var1);
- }
-