[Java-gnome-developer] Potential API issue with Table.attach() & AttachOptions?
Brought to you by:
afcowie
From: Jacek F. <ja...@gm...> - 2009-03-19 19:42:54
|
I was looking at the Table.attach() method. I need to pass in a combination of AttachOptions (e.g. FILL | EXPAND), just like you can in Glade. However, the Java signature seems to allow passing in only a single AttachOptions instance, not a bitwise combination of them, unlike let's say in PyGTK: *The xoptions and yoptions determine the expansion properties of the widget in the horizontal and vertical directions respectively (the default value is gtk.FILL|gtk.EXPAND). The value of the options is a combination of:* *gtk.EXPAND* *the table cell should expand to take up any extra space that has been allocated to the table.* *gtk.SHRINK* *the widget should shrink when the table cell shrinks.* *gtk.FILL* *the widget should fill the space allocated to it in the table cell.* *The xpadding and ypadding parameters determine the extra padding added around the widget. By default these are 0.* It seems we do not have the option of creating a combination of AttachOptions in the Java bindings...or am I missing something? I tried passing in AttachOptions.FILL | AttachOptions.EXPAND, but obviously does not compile. public void attach(Widget child, int leftAttach, int rightAttach, int topAttach, int bottomAttach, AttachOptions xoptions, AttachOptions yoptions, int xpadding, int ypadding) { GtkTable.attach(this, child, leftAttach, rightAttach, topAttach, bottomAttach, xoptions, yoptions, xpadding, ypadding); } I'm on the latest build 4.0.10. Thanks in advance for any help, Jacek |