public class StyleOptions extends Object implements Encodable
Note: this is not a mod. StyleOptions objects are used by the NoteMaker and TalkOptions mods.
| Constructor and Description |
|---|
StyleOptions(String[] colors,
String[] backgroundColors,
String[] borderColors,
String[] textStyles,
String[] icons,
OptInteger iconWidth,
OptInteger iconHeight)
JSON-driven constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowedStyle(StyleDesc style)
Test if a particular
StyleDesc is permissible according to this
object's settings. |
String[] |
backgroundColors()
Get the permissible background colors.
|
String[] |
borderColors()
Get the permissible border colors.
|
String[] |
colors()
Get the permissible foreground (text) colors.
|
JSONLiteral |
encode(EncodeControl control)
Encode this object for transmission or persistence.
|
int |
iconHeight()
Get the height of the icons.
|
String[] |
icons()
Get the permissible icon URLs.
|
int |
iconWidth()
Get the width of the icons.
|
StyleDesc |
mergeStyle(StyleDesc style)
|
String[] |
textStyles()
Get the permissible text styles.
|
@JSONMethod(value={"colors","backgroundColors","borderColors","textStyles","icons","iconWidth","iconHeight"}) public StyleOptions(String[] colors, String[] backgroundColors, String[] borderColors, String[] textStyles, String[] icons, OptInteger iconWidth, OptInteger iconHeight)
colors - Permissible foreground (text) colors.backgroundColors - Permissible background colors.borderColors - Permissible border colors.textStyles - Permissible text styles.icons - Permissible icon URLs.iconWidth - Common width of icons, or -1 if not relevant.iconHeight - Common height of icons, or -1 if not relevant.public boolean allowedStyle(StyleDesc style)
StyleDesc is permissible according to this
object's settings.style - The StyleDesc to test.public String[] backgroundColors()
public String[] borderColors()
public String[] colors()
public JSONLiteral encode(EncodeControl control)
public String[] icons()
public int iconHeight()
public int iconWidth()
public String[] textStyles()
Copyright © 2017. All rights reserved.