GtkDialogPeer.java (create()): Create a top-level GTK window.

2003-09-19  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkDialogPeer.java (create()): Create a
	top-level GTK window.
	(getArgs): Add "title" property.
	* gnu/java/awt/peer/gtk/GtkWindowPeer.java (setResizable): Use
	"allow_shrink" and "allow_grow" properties.
	* java/awt/Dialog.java: Initialize resizable to true and change
	comments accordingly.  Initialize visible to false in
	constructors.
	* java/awt/Frame.java (dispose): Remove method.
	* java/awt/Window.java (ownedWindows): New field.
	(Window(Window,GraphicsConfiguration)): Add a weak reference to
	owner's ownedWindows vector.
	(finalize): Remove method.
	(hide): Hide owned windows.
	(dispose): Dispose of owned windows.
	(getOwnedWindows): Implement.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Remove
	unused GtkArg code.
	(set(String,boolean)): Clamp gboolean parameter to g_object_set
	to TRUE or FALSE.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(create): Set window's size requisition.
	(connectHooks): Fix indentation.
	(setResizable): Remove function.
	(static setBounds): Likewise.
	(setBounds): Replace call to setBounds with GTK size requisition
	and resize calls.

From-SVN: r71585
This commit is contained in:
Thomas Fitzsimmons 2003-09-19 19:27:59 +00:00 committed by Thomas Fitzsimmons
parent 9e3bfa9b75
commit 5ec47f6049
9 changed files with 158 additions and 129 deletions

View file

@ -53,7 +53,7 @@ public class GtkDialogPeer extends GtkWindowPeer
void create ()
{
create (GTK_WINDOW_POPUP,
create (GTK_WINDOW_TOPLEVEL,
awtComponent.getWidth(),
awtComponent.getHeight());
}
@ -64,6 +64,7 @@ public class GtkDialogPeer extends GtkWindowPeer
Dialog dialog = (Dialog) component;
args.add ("title", dialog.getTitle ());
args.add ("modal", dialog.isModal ());
args.add ("allow_shrink", dialog.isResizable ());
args.add ("allow_grow", dialog.isResizable ());

View file

@ -84,6 +84,7 @@ public class GtkFramePeer extends GtkWindowPeer
args.add ("allow_shrink", frame.isResizable ());
args.add ("allow_grow", frame.isResizable ());
}
public void setIconImage (Image image)
{
/* TODO: Waiting on Toolkit Image routines */

View file

@ -53,7 +53,9 @@ public class GtkWindowPeer extends GtkContainerPeer
void create (int type)
{
create (type, awtComponent.getWidth(), awtComponent.getHeight());
create (type,
awtComponent.getWidth(),
awtComponent.getHeight());
}
void create ()
@ -75,7 +77,7 @@ public class GtkWindowPeer extends GtkContainerPeer
args.add ("visible", component.isVisible ());
args.add ("sensitive", component.isEnabled ());
}
native public void toBack ();
native public void toFront ();
@ -86,7 +88,11 @@ public class GtkWindowPeer extends GtkContainerPeer
set ("title", title);
}
native public void setResizable (boolean r);
public void setResizable (boolean resizable)
{
set ("allow_shrink", resizable);
set ("allow_grow", resizable);
}
protected void postConfigureEvent (int x, int y, int width, int height,
int top, int left, int bottom, int right)