public class StyleDesc extends Object implements Encodable
Note: this is not a mod. StyleDesc objects are used by the Note
,
NoteMaker
, TalkPrefs
and TalkOptions
mods and by the
StyleOptions
object.
Constructor and Description |
---|
StyleDesc(OptString color,
OptString backgroundColor,
OptString borderColor,
OptString textStyle,
OptString icon)
JSON-driven constructor.
|
StyleDesc(String color,
String backgroundColor,
String borderColor,
String textStyle,
String icon)
Direct constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
backgroundColor()
Get the background color.
|
String |
borderColor()
Get the border color.
|
String |
color()
Get the foreground (text) color.
|
JSONLiteral |
encode(EncodeControl control)
Encode this object for transmission or persistence.
|
String |
icon()
Get the icon URL.
|
StyleDesc |
mergeStyle(StyleDesc partial)
Merge this StyleDesc with another, partially specified StyleDesc,
creating a new StyleDesc.
|
String |
textStyle()
Get the text style for this StyleDesc.
|
@JSONMethod(value={"color","backgroundColor","borderColor","textStyle","icon"}) public StyleDesc(OptString color, OptString backgroundColor, OptString borderColor, OptString textStyle, OptString icon)
color
- Optional foreground (text) color.backgroundColor
- Optional background color.borderColor
- Optional border color.textStyle
- Optional style string (e.g., "bold", "italic", etc.)
for text.icon
- Optional URL of an icon to go with text.public StyleDesc(String color, String backgroundColor, String borderColor, String textStyle, String icon)
color
- Foreground (text) color, or null if none.backgroundColor
- Background color, or null if none.borderColor
- Border color, or null if none.textStyle
- Style string for text (e.g, "bold", "italic", etc.), or
null if none.icon
- URL of an icon to go with the text, or null if none.public String backgroundColor()
public String borderColor()
public String color()
public JSONLiteral encode(EncodeControl control)
public String icon()
public StyleDesc mergeStyle(StyleDesc partial)
partial
- The (partial) StyleDesc to merge withpublic String textStyle()
Copyright © 2017. All rights reserved.