60 |
private boolean hasBeenShown = false; |
private boolean hasBeenShown = false; |
61 |
private int oldState = Frame.NORMAL; |
private int oldState = Frame.NORMAL; |
62 |
|
|
63 |
|
native void gtkWindowSetTitle (String title); |
64 |
|
native void gtkWindowSetResizable (boolean resizable); |
65 |
|
native void gtkWindowSetModal (boolean modal); |
66 |
|
|
67 |
native void create (int type, boolean decorated, |
native void create (int type, boolean decorated, |
68 |
int width, int height, |
int width, int height, |
69 |
GtkWindowPeer parent, |
GtkWindowPeer parent, |
96 |
create (GDK_WINDOW_TYPE_HINT_NORMAL, false); |
create (GDK_WINDOW_TYPE_HINT_NORMAL, false); |
97 |
} |
} |
98 |
|
|
99 |
|
void setParent () |
100 |
|
{ |
101 |
|
setVisible (awtComponent.isVisible ()); |
102 |
|
setEnabled (awtComponent.isEnabled ()); |
103 |
|
} |
104 |
|
|
105 |
|
void setVisibleAndEnabled () |
106 |
|
{ |
107 |
|
} |
108 |
|
|
109 |
native void connectJObject (); |
native void connectJObject (); |
110 |
native void connectSignals (); |
native void connectSignals (); |
111 |
|
|
114 |
super (window); |
super (window); |
115 |
} |
} |
116 |
|
|
|
public void getArgs (Component component, GtkArgList args) |
|
|
{ |
|
|
args.add ("visible", component.isVisible ()); |
|
|
args.add ("sensitive", component.isEnabled ()); |
|
|
} |
|
|
|
|
117 |
native public void toBack (); |
native public void toBack (); |
118 |
native public void toFront (); |
native public void toFront (); |
119 |
|
|
128 |
|
|
129 |
public void setTitle (String title) |
public void setTitle (String title) |
130 |
{ |
{ |
131 |
set ("title", title); |
gtkWindowSetTitle (title); |
132 |
} |
} |
133 |
|
|
134 |
native void setSize (int width, int height); |
native void setSize (int width, int height); |
140 |
// was resizable. |
// was resizable. |
141 |
setSize (awtComponent.getWidth() - insets.left - insets.right, |
setSize (awtComponent.getWidth() - insets.left - insets.right, |
142 |
awtComponent.getHeight() - insets.top - insets.bottom); |
awtComponent.getHeight() - insets.top - insets.bottom); |
143 |
set ("allow_shrink", resizable); |
gtkWindowSetResizable (resizable); |
|
set ("allow_grow", resizable); |
|
144 |
} |
} |
145 |
|
|
146 |
native void setBoundsCallback (Window window, |
native void setBoundsCallback (Window window, |