org.gnu.gtk
Class Misc

java.lang.Object
  |
  +--org.gnu.glib.GObject
        |
        +--org.gnu.gtk.GtkObject
              |
              +--org.gnu.gtk.Widget
                    |
                    +--org.gnu.gtk.Misc
Direct Known Subclasses:
Arrow, Image, Label

public class Misc
extends Widget

This is a base class providing allignment and padding to a number of displayable widgets.


Method Summary
static Type getType()
          Retrieve the runtime type used by the GLib library.
 double getXAlign()
          Returns the horizontal alignment of the widget.
 int getXPadding()
          Retrieve the amount of space added to the left and right of the widget.
 double getYAlign()
          Returns the vertical alignment of the widget.
 int getYPadding()
          Retrieve the amount of space added to the top and bottom of the widget.
 void setAlignment(double xAlign, double yAlign)
          Sets the alignment of a widget.
 void setPadding(int xPad, int yPad)
          Sets the amount of space to add around the widget.
 
Methods inherited from class org.gnu.gtk.Widget
activate, addListener, addListener, addListener, addListener, addListener, addListener, createContext, createLayout, destroy, draw, drawArea, drawArea, getAccessible, getColormap, getContext, getEventListenerClass, getEventType, getModifierStyle, getName, getParent, getParentWindow, getPointer, getSensitive, getStyle, getToplevel, grabDefault, grabFocus, hasFocus, hide, hideAll, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setAlignment

public void setAlignment(double xAlign,
                         double yAlign)
Sets the alignment of a widget.

Parameters:
xAlign - The horizontal alignment from 0 (left) to 1 (right).
yAlign - The vertical alignment from 0 (top) to 1 (bottom).

getXAlign

public double getXAlign()
Returns the horizontal alignment of the widget.


getYAlign

public double getYAlign()
Returns the vertical alignment of the widget.


setPadding

public void setPadding(int xPad,
                       int yPad)
Sets the amount of space to add around the widget.

Parameters:
xPad - The amount of space to add to the left and right of the widget.
yPad - The amount of space to add to the top and bottom of the widget.

getXPadding

public int getXPadding()
Retrieve the amount of space added to the left and right of the widget.


getYPadding

public int getYPadding()
Retrieve the amount of space added to the top and bottom of the widget.


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.


Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net