public final class
FieldColor
extends Field
Adds a color picker to an Input.
Constant Summary
int | DEFAULT_COLOR |
Inherited Constant Summary
Inherited Field Summary
Public Constructor Summary
FieldColor(String name)
|
|
FieldColor(String name, int color)
|
Public Method Summary
FieldColor |
clone()
|
static FieldColor |
fromJson(JSONObject json)
|
int |
getColor()
|
String | |
void |
setColor(int color)
Sets the color stored in this field.
|
boolean |
setFromString(String text)
Sets the values of the field from a string.
|
Inherited Method Summary
Constants
public static final int DEFAULT_COLOR
Constant Value:
16711680
Public Constructors
public FieldColor (String name)
Parameters
name |
---|
public FieldColor (String name, int color)
Parameters
name | |
---|---|
color |
Public Methods
public int getColor ()
Returns
- The current color in this field.
public String getSerializedValue ()
Returns
- The value serialized into a string.
public void setColor (int color)
Sets the color stored in this field.
Parameters
color | A color in the form 0xRRGGBB |
---|
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.