Class SettingBindings.LiveSetting
- java.lang.Object
-
- ca.cgjennings.apps.arkham.plugins.engine.SettingBindings.LiveSetting
-
- Enclosing class:
- SettingBindings
public final class SettingBindings.LiveSetting extends java.lang.Object
A live setting is returned when the script uses $$-notation—two dollar signs instead of one—when reading a setting value in a script. Live settings include getters for standard data types. A live setting can also be stored and reused; it will always reflect the current value of the encapsulated setting.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBoolean()
Returns the current value of the setting as a boolean value.Settings.Colour
getColor()
Returns the current value of the setting as aColour
.Settings.Colour
getColour()
Returns the current value of the setting as aColour
.PageShape.CupShape
getCupShape()
Returns the current value of the setting as aCupShape
.int
getInteger()
Returns the current value of the setting as an integer.java.lang.String
getKey()
Returns the key name of the setting.double
getNumber()
Returns the current value of the setting as a double value.java.awt.Rectangle
getRegion()
Returns the current value of the setting as an integer region.java.awt.geom.Rectangle2D.Double
getRegion2D()
Returns the current value of the setting as aRegion2D
, a region with floating point precision.Settings
getSettings()
Returns theSettings
instance that the live setting was created from.java.lang.String
getString()
Returns the current value of the setting as a string.int
getTextAlignment()
Returns the current value of the setting as a text alignment value.TextStyle
getTextStyle()
Returns the current value of the setting as a text style.float[]
getTint()
Returns the current value of the setting as an tint value stored as an array of three floating point values in hue, saturation, brightness order.java.lang.String
getValue()
Returns the current value of the setting.boolean
getYesNo()
Returns the current value of the setting as a boolean value.java.lang.String
toString()
Returns a string representation of this live setting.
-
-
-
Method Detail
-
getSettings
public Settings getSettings()
Returns theSettings
instance that the live setting was created from.- Returns:
- the settings instance that the setting value is looked up in
-
getKey
public java.lang.String getKey()
Returns the key name of the setting.- Returns:
- the key
-
getValue
public java.lang.String getValue()
Returns the current value of the setting.- Returns:
- the current setting value
- See Also:
Settings.get(java.lang.String)
-
getString
public java.lang.String getString()
Returns the current value of the setting as a string. This is equivalent togetValue()
.- Returns:
- the current setting value
- See Also:
Settings.get(java.lang.String)
-
getColour
public Settings.Colour getColour()
Returns the current value of the setting as aColour
. This is equivalent togetColor()
.- Returns:
- the current setting value as a colour
- See Also:
Settings.getColour(java.lang.String)
-
getColor
public Settings.Colour getColor()
Returns the current value of the setting as aColour
. This is equivalent togetColour()
.- Returns:
- the current setting value as a colour
- See Also:
Settings.getColour(java.lang.String)
-
getCupShape
public PageShape.CupShape getCupShape()
Returns the current value of the setting as aCupShape
.- Returns:
- the current setting value as a cup shape
- See Also:
Settings.getCupShape(java.lang.String)
-
getInteger
public int getInteger()
Returns the current value of the setting as an integer.- Returns:
- the current setting value as an integer
- See Also:
Settings.getInt(java.lang.String)
-
getNumber
public double getNumber()
Returns the current value of the setting as a double value.- Returns:
- the current setting value as a double
- See Also:
Settings.getDouble(java.lang.String)
-
getRegion
public java.awt.Rectangle getRegion()
Returns the current value of the setting as an integer region.- Returns:
- the current setting value as a region
- See Also:
Settings.getRegion(java.lang.String)
-
getRegion2D
public java.awt.geom.Rectangle2D.Double getRegion2D()
Returns the current value of the setting as aRegion2D
, a region with floating point precision.- Returns:
- the current setting value as a region
- See Also:
Settings.getRegion2D(java.lang.String)
-
getTint
public float[] getTint()
Returns the current value of the setting as an tint value stored as an array of three floating point values in hue, saturation, brightness order.- Returns:
- the current setting value as a tint value
- See Also:
Settings.getTint(java.lang.String)
-
getBoolean
public boolean getBoolean()
Returns the current value of the setting as a boolean value. This is equivalent togetYesNo()
.- Returns:
- the current setting value as a boolean
- See Also:
Settings.getBoolean(java.lang.String)
-
getYesNo
public boolean getYesNo()
Returns the current value of the setting as a boolean value. This is equivalent togetBoolean()
.- Returns:
- the current setting value as a boolean
- See Also:
Settings.getYesNo(java.lang.String)
-
getTextStyle
public TextStyle getTextStyle()
Returns the current value of the setting as a text style.- Returns:
- the current setting value as a text style
- See Also:
Settings.getTextStyle(java.lang.String, ca.cgjennings.layout.TextStyle)
-
getTextAlignment
public int getTextAlignment()
Returns the current value of the setting as a text alignment value.- Returns:
- the current setting value as a text alignment
- See Also:
Settings.getTextAlignment(java.lang.String)
-
toString
public java.lang.String toString()
Returns a string representation of this live setting.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string describing the setting and its current value
-
-