1 |
/* GtkFramePeer.java -- Implements FramePeer with GTK |
/* GtkFramePeer.java -- Implements FramePeer with GTK |
2 |
Copyright (C) 1999 Free Software Foundation, Inc. |
Copyright (C) 1999, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
|
|
39 |
package gnu.java.awt.peer.gtk; |
package gnu.java.awt.peer.gtk; |
40 |
import java.awt.*; |
import java.awt.*; |
41 |
import java.awt.peer.FramePeer; |
import java.awt.peer.*; |
42 |
import java.awt.event.*; |
import java.awt.event.*; |
43 |
|
|
44 |
public class GtkFramePeer extends GtkWindowPeer |
public class GtkFramePeer extends GtkWindowPeer |
47 |
int menuBarHeight = 0; |
int menuBarHeight = 0; |
48 |
native int getMenuBarHeight (); |
native int getMenuBarHeight (); |
49 |
|
|
50 |
|
native public void setMenuBarPeer (MenuBarPeer bar); |
51 |
|
|
52 |
|
public void setMenuBar (MenuBar bar) |
53 |
|
{ |
54 |
|
if (bar == null) |
55 |
|
setMenuBarPeer (null); |
56 |
|
else |
57 |
|
setMenuBarPeer ((MenuBarPeer) bar.getPeer ()); |
58 |
|
} |
59 |
|
|
60 |
public GtkFramePeer (Frame frame) |
public GtkFramePeer (Frame frame) |
61 |
{ |
{ |
62 |
super (frame); |
super (frame); |
92 |
public void setBounds (int x, int y, int width, int height) |
public void setBounds (int x, int y, int width, int height) |
93 |
{ |
{ |
94 |
super.setBounds (0, 0, width - insets.left - insets.right, |
super.setBounds (0, 0, width - insets.left - insets.right, |
95 |
height - insets.top - insets.bottom |
height - insets.top - insets.bottom + menuBarHeight); |
|
+ getMenuBarHeight ()); |
|
96 |
} |
} |
97 |
|
|
98 |
protected void postConfigureEvent (int x, int y, int width, int height, |
protected void postConfigureEvent (int x, int y, int width, int height, |