= dial
:author: 
:revnumber: 
:revdate: 2016/03/17 20:48
:relfileprefix: ../../../
:imagesdir: ../../..
ifdef::env-github,env-browser[:outfilesuffix: .adoc]



== Dial Class

The Dial class provides:

*  A rotating knob for selecting step values

The Dial class provides the standard 3 common constructors as sown in the <<jme3/contributions/tonegodgui/quickstart#,Quick Start Guide>>.

*Constructor 1:*

[source,java]
----

/** Parameters:
  * Screen screen,
  * String UID,
  * Vector2f position
  */
 
Dial dial = new Dial(screen, “dial”, new Vector2f(15, 15));

----

*Constructor 2:*

[source,java]
----

/** Additional Parameter:
  * Vector2f dimensions  */
 
Dial dial = new Dial(screen, “dial”, new Vector2f(15, 15),
    new Vector2f(35, 35)
);

----

*Constructor 3:*

[source,java]
----

/** Additional Parameters:
  * Vector4f resizeBorders,
  * String defaultImg
  */
 
Dial dial = new Dial(screen, “dial”, new Vector2f(15, 15), new Vector2f(35, 35),
    new Vector4f(0,0,0,0),
    “tonegod/gui/style/def/Dial/dial_x.png”
);

----



=== Abstract Event Methods:

[source,java]
----

public void onChange(int selectedIndex, String value);

----



=== Methods specific to the Dial class:

[source,java]
----

// Adding removing list info
dial.addStepValue(String value);
dial.removeStepValue(String value);
 
// Retrieval of current selected step
dial.getSelectedIndex();

----
