|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.server.context.mods.StyleOptions
public class StyleOptions
Representation of permissible text style information in a context that can contain text.
Note: this is not a mod. StyleOptions objects are used by the NoteMaker and TalkOptions mods.
| Constructor Summary | |
|---|---|
StyleOptions(String[] colors,
String[] backgroundColors,
String[] borderColors,
String[] textStyles,
String[] icons,
OptInteger iconWidth,
OptInteger iconHeight)
JSON-driven constructor. |
|
| Method Summary | |
|---|---|
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)
Produce a new StyleDesc object given another, partially
specified, StyleDesc object. |
String[] |
textStyles()
Get the permissible text styles. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@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.| Method Detail |
|---|
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)
encode in interface Encodablecontrol - Encode control determining what flavor of encoding
should be done.
public String[] icons()
public int iconHeight()
public int iconWidth()
public StyleDesc mergeStyle(StyleDesc style)
StyleDesc object given another, partially
specified, StyleDesc object.
style - The StyleDesc to start from.
StyleDesc object that is a copy of 'style' with
additional attributes according to the defaults contained in this
object, or null if one of the attributes specified by 'style' is not
permitted by this object's settings.public String[] textStyles()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||