FieldAngle

public final class FieldAngle extends Field

Adds an angle (0-360) picker to an Input.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

FieldAngle(String name, float angle)

Public Method Summary

FieldAngle
clone()
static FieldAngle
fromJson(JSONObject json)
float
String
void
setAngle(float angle)
Set the current angle in this field.
boolean
setFromString(String text)
Sets the values of the field from a string.

Inherited Method Summary

Public Constructors

public FieldAngle (String name, float angle)

Parameters
name
angle

Public Methods

public FieldAngle clone ()

public static FieldAngle fromJson (JSONObject json)

Parameters
json

public float getAngle ()

Returns
  • The angle set by the user.

public String getSerializedValue ()

Returns
  • The value serialized into a string.

public void setAngle (float angle)

Set the current angle in this field. The angle will be wrapped to be in the range 0-360.

Parameters
angle The angle to set this field to.

public boolean setFromString (String text)

Sets the values of the field from a string.

This is used for setting values of all types of fields when loading a workspace from XML. It is also used, however, as the primary means of setting text fields (e.g., inputs, labels, dates).

There should be a concrete implementation for each field type.

Parameters
text The text value for this field from the XML.
Returns
  • True if the value was set, false otherwise.