org.gnome.gtk

## Class Scale

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

- All Implemented Interfaces:
    Orientable
  Direct Known Subclasses:
    HScale, VScale

      public class Scale
      extends Range

  A slider control which allows the user to manipulate a numeric value. As with many other Widget hierarchies in GTK, there is a horizontal (`HScale`) and vertical (`VScale`) implementation for you to choose from.

  The default position for the value to be displayed is `TOP` which may not be quite what you want. Use `setValuePosition()` to change it.

  Otherwise, most of the useful methods (notably those relating to the value) are inherited from the parent class, `Range`.

  Since:
    4.0.6
  Author:
    Andrew Cowie

- - ### Nested Class Summary

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

      `Range.ValueChanged`

    - ### 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.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Scale(Orientation orientation, Adjustment adjustment)` Construct a Scale of the given orientation and supplying an Adjustment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getDrawValue()` Is the Scale presently displaying text indicating its value?
    `void` | `setDigits(int places)` Specify the number of decimal places that will be shown in the value.
    `void` | `setDrawValue(boolean draw)` Specify if the text displaying the value will be shown.
    `void` | `setValuePosition(PositionType position)` Specify where the value will be drawn.

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

      `connect, getInverted, getOrientation, getValue, setInverted, setOrientation, setValue`

    - ### 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, 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`

- - ### Constructor Detail

    - #### Scale

          public Scale(Orientation orientation,
               Adjustment adjustment)

      Construct a Scale of the given orientation and supplying an Adjustment. See also `HScale` and `VScale`.
      Since:
        4.1.1

  - ### Method Detail

    - #### getDrawValue

          public boolean getDrawValue()

      Is the Scale presently displaying text indicating its value?
      Since:
        4.0.17

    - #### setDigits

          public void setDigits(int places)

      Specify the number of decimal places that will be shown in the value. This also rounds the value so that when it is retrieved it will match what is displayed.
      Since:
        4.0.6

    - #### setDrawValue

          public void setDrawValue(boolean draw)

      Specify if the text displaying the value will be shown. The default is `true`.
      Since:
        4.0.17

    - #### setValuePosition

          public void setValuePosition(PositionType position)

      Specify where the value will be drawn. `TOP` is the default.
      Since:
        4.0.6