org.gnome.gtk

## Class Misc

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Misc

- Direct Known Subclasses:
    Arrow, Image, Label

      public abstract class Misc
      extends Widget

  Base class for Widgets that have notions of alignment and padding.
  Since:
    4.0.0
  Author:
    Andrew Cowie, Nat Pryce

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `getAlignmentX()` Gets the horizontal alignment of the Widget within its allocation.
    `float` | `getAlignmentY()` Gets the vertical alignment of the Widget within its allocation.
    `int` | `getPaddingX()` Returns the horizontal padding of the Widget, in pixels.
    `int` | `getPaddingY()` Returns the vertical padding of the Widget, in pixels.
    `void` | `setAlignment(float xalign, float yalign)` Set the horizontal and vertical alignment attributes, enabling the Widget to be positioned within its allocated area.
    `void` | `setPadding(int xpad, int ypad)` Set the amount of extra horizontal and vertical padding space to added around the Widget.

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getAlignmentX

          public float getAlignmentX()

      Gets the horizontal alignment of the Widget within its allocation. See `setAlignment()`.
      Since:
        4.0.4

    - #### getAlignmentY

          public float getAlignmentY()

      Gets the vertical alignment of the Widget within its allocation. See `setAlignment()`.
      Since:
        4.0.4

    - #### getPaddingX

          public int getPaddingX()

      Returns the horizontal padding of the Widget, in pixels.
      Since:
        4.0.4

    - #### getPaddingY

          public int getPaddingY()

      Returns the vertical padding of the Widget, in pixels.
      Since:
        4.0.4

    - #### setAlignment

          public void setAlignment(float xalign,
                          float yalign)

      Set the horizontal and vertical alignment attributes, enabling the Widget to be positioned within its allocated area. Note that if the Widget is added to a Container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the Widget's position.
      Parameters:
        `xalign` - the horizontal alignment, from `0.0f` (full left) to `1.0f` (full right).
        `yalign` - the vertical alignment, from `0.0f` (top) to `1.0f` (bottom).
      Since:
        4.0.4

    - #### setPadding

          public void setPadding(int xpad,
                        int ypad)

      Set the amount of extra horizontal and vertical padding space to added around the Widget.
      Parameters:
        `xpad` - the amount of space to add on the left and right of the Widget, in pixels.
        `ypad` - the amount of space to add on the top and bottom of the Widget, in pixels.
      Since:
        4.0.4