Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. From-SVN: r107049
This commit is contained in:
parent
02e549bfaa
commit
8f523f3a10
1241 changed files with 97711 additions and 25284 deletions
|
@ -44,6 +44,10 @@ import java.awt.Rectangle;
|
|||
import java.awt.event.PaintEvent;
|
||||
import java.awt.peer.DialogPeer;
|
||||
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JToolTip;
|
||||
|
||||
public class GtkDialogPeer extends GtkWindowPeer
|
||||
implements DialogPeer
|
||||
{
|
||||
|
@ -82,10 +86,28 @@ public class GtkDialogPeer extends GtkWindowPeer
|
|||
|
||||
void create ()
|
||||
{
|
||||
// Create a decorated dialog window.
|
||||
create (GDK_WINDOW_TYPE_HINT_DIALOG, true);
|
||||
|
||||
Dialog dialog = (Dialog) awtComponent;
|
||||
int type = GDK_WINDOW_TYPE_HINT_DIALOG;
|
||||
|
||||
if (dialog instanceof JDialog)
|
||||
{
|
||||
Class heavyWeightClass;
|
||||
try
|
||||
{
|
||||
heavyWeightClass = Class.forName("javax.swing.Popup$JWindowPopup");
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
|
||||
if (dialog.getClass() == heavyWeightClass
|
||||
|| ((JDialog) dialog).getContentPane() instanceof JToolTip)
|
||||
type = GDK_WINDOW_TYPE_HINT_MENU;
|
||||
}
|
||||
|
||||
// Create a decorated dialog window.
|
||||
create (type, !((Dialog) awtComponent).isUndecorated ());
|
||||
|
||||
gtkWindowSetModal (dialog.isModal ());
|
||||
setTitle (dialog.getTitle ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue