46 |
import java.awt.event.MouseEvent; |
import java.awt.event.MouseEvent; |
47 |
import java.awt.peer.ButtonPeer; |
import java.awt.peer.ButtonPeer; |
48 |
|
|
49 |
|
// A composite widget. GtkButtons have transparent backgrounds. An |
50 |
|
// AWT Button is opaque. To compensate, a GtkButtonPeer is a |
51 |
|
// GtkButton packed in a GtkEventBox. |
52 |
public class GtkButtonPeer extends GtkComponentPeer |
public class GtkButtonPeer extends GtkComponentPeer |
53 |
implements ButtonPeer |
implements ButtonPeer |
54 |
{ |
{ |
64 |
native void gtkWidgetRequestFocus (); |
native void gtkWidgetRequestFocus (); |
65 |
native void setNativeBounds (int x, int y, int width, int height); |
native void setNativeBounds (int x, int y, int width, int height); |
66 |
|
|
67 |
|
// Because this is a composite widget, we need to retrieve the |
68 |
|
// GtkButton's preferred dimensions, not the enclosing |
69 |
|
// GtkEventBox's. |
70 |
|
native void gtkWidgetGetPreferredDimensions (int[] dim); |
71 |
|
|
72 |
public GtkButtonPeer (Button b) |
public GtkButtonPeer (Button b) |
73 |
{ |
{ |
74 |
super (b); |
super (b); |