|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liquidatom.derbyscore.theme.ThemeElement
com.liquidatom.derbyscore.theme.TextElement
@ThreadSafe @Immutable public class TextElement
Used to represent a snippet of text which will be conditionally rendered onto the scoreboard.
Constructor Summary | |
---|---|
TextElement(Theme theme,
java.lang.String visibleConditionScript,
java.awt.Rectangle position,
java.lang.String textScript,
java.lang.String fontRef)
Construct a new TextElement instance. |
|
TextElement(Theme theme,
java.lang.String visibleConditionScript,
java.awt.Rectangle position,
java.lang.String text,
java.lang.String fontRef,
java.awt.Color color)
Construct a new TextElement instance. |
Method Summary | |
---|---|
java.awt.Color |
getColor()
The color to use when rendering this text. |
java.awt.Font |
getFont()
Get the font which should be used to render this text. |
java.lang.String |
getFontRef()
The unique label used to identify the font used when rendering this text. |
java.awt.Rectangle |
getPosition()
Get a Rectangle describing the bounds which this text will be rendered into. |
java.lang.String |
getText(java.util.Map<java.lang.String,java.lang.Object> scope)
Evaluate the text javascript and return the result. |
Methods inherited from class com.liquidatom.derbyscore.theme.ThemeElement |
---|
getTheme, getVisibleConditionScript, isVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextElement(Theme theme, java.lang.String visibleConditionScript, java.awt.Rectangle position, java.lang.String textScript, java.lang.String fontRef)
theme
- The theme that this element is contained within.visibleConditionScript
- An optional snippet of javascript which will be evaluated to determine if this
text should be rendered.position
- The bounding rectangle where this text should be rendered.textScript
- A snippet of javascript text which will be evaluated, the result will be rendered as text.fontRef
- A reference to the font used to render the text.public TextElement(Theme theme, java.lang.String visibleConditionScript, java.awt.Rectangle position, java.lang.String text, java.lang.String fontRef, java.awt.Color color)
theme
- The theme that this element is contained within.visibleConditionScript
- An optional snippet of javascript which will be evaluated to determine if this
text should be rendered.position
- The bounding rectangle where this text should be rendered.textScript
- A snippet of javascript text which will be evaluated, the result will be rendered as text.fontRef
- A reference to the font used to render the text.color
- The color used to render this text.Method Detail |
---|
public java.awt.Font getFont()
public java.lang.String getText(java.util.Map<java.lang.String,java.lang.Object> scope)
scope
- A map containing any variables which should be exposed to the evaluated script.
public java.lang.String getFontRef()
public java.awt.Color getColor()
public java.awt.Rectangle getPosition()
Rectangle
describing the bounds which this text will be rendered into.
getPosition
in class ThemeElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |