Package com.microej.layout.model.layers
Class TextLayer
- java.lang.Object
-
- com.microej.layout.model.layers.Layer
-
- com.microej.layout.model.layers.TextLayer
-
public class TextLayer extends Layer
Represents a layer of typeLayerTypes.TEXT.
-
-
Constructor Summary
Constructors Constructor Description TextLayer(com.microej.script.ast.expressions.Expression x, com.microej.script.ast.expressions.Expression y, com.microej.script.ast.expressions.Expression r, com.microej.script.ast.expressions.Expression opacity, boolean isThemed, java.lang.Object extraField, com.microej.script.ast.expressions.Expression text, com.microej.script.ast.expressions.Expression size, com.microej.script.ast.expressions.Expression width, int color, int transform, int textEffect, int strokeColor, com.microej.script.ast.expressions.Expression strokeSize, com.microej.script.ast.expressions.Expression glowSize, int glowColor, boolean isBounded, java.lang.String newFontName, int alignment)Creates a text layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAlignment()Returns the alignment of this layer.intgetColor()Returns the color of this layer in Active mode.intgetGlowColor()Returns the glow color of this layer.com.microej.script.ast.expressions.ExpressiongetGlowSize()Returns the glow size of this layer.java.lang.StringgetNewFontName()Returns the resource ID of the font of this layer.com.microej.script.ast.expressions.ExpressiongetSize()Returns the size of this layer.intgetStrokeColor()Returns the stroke color of this layer.com.microej.script.ast.expressions.ExpressiongetStrokeSize()Returns the stroke size of this layer.com.microej.script.ast.expressions.ExpressiongetText()Returns the text of this layer.intgetTextEffect()Returns the effect of this layer.intgetTransform()Returns the transform of this layer.intgetType()Returns the type of this layer.com.microej.script.ast.expressions.ExpressiongetWidth()Returns the fixed width to which this layer is bounded.booleanisBounded()Returns whether this layer is bounded to a fixed width.-
Methods inherited from class com.microej.layout.model.layers.Layer
getExtraField, getOpacity, getR, getX, getY, isThemed
-
-
-
-
Constructor Detail
-
TextLayer
public TextLayer(com.microej.script.ast.expressions.Expression x, com.microej.script.ast.expressions.Expression y, com.microej.script.ast.expressions.Expression r, com.microej.script.ast.expressions.Expression opacity, boolean isThemed, java.lang.Object extraField, com.microej.script.ast.expressions.Expression text, com.microej.script.ast.expressions.Expression size, com.microej.script.ast.expressions.Expression width, int color, int transform, int textEffect, int strokeColor, com.microej.script.ast.expressions.Expression strokeSize, com.microej.script.ast.expressions.Expression glowSize, int glowColor, boolean isBounded, java.lang.String newFontName, int alignment)Creates a text layer.- Parameters:
x- the x coordinate of the layer.y- the y coordinate of the layer.r- the rotation angle of the layer.opacity- the opacity of the layer.isThemed- whether the layer is themed.extraField- the extra field of the layer.text- the text of the layer.size- the size of the layer.width- the fixed width to which the layer is bounded.color- the color of the layer.transform- the transform of the layer (seeTextTransforms).textEffect- the effect of the layer (seeTextEffects).strokeColor- the stroke color of the layer.strokeSize- the stroke size of the layer.glowSize- the glow size of the layer.glowColor- the glow color of the layer.isBounded- whether the layer is bounded to a fixed width.newFontName- the resource ID of the font of the layer.alignment- the alignment of the layer (seeTextAlignments).
-
-
Method Detail
-
getType
public int getType()
Description copied from class:LayerReturns the type of this layer.- Specified by:
getTypein classLayer- Returns:
- the type of this layer (see
LayerTypes).
-
getText
public com.microej.script.ast.expressions.Expression getText()
Returns the text of this layer.- Returns:
- the text of this layer.
-
getSize
public com.microej.script.ast.expressions.Expression getSize()
Returns the size of this layer.- Returns:
- the size of this layer.
-
getWidth
public com.microej.script.ast.expressions.Expression getWidth()
Returns the fixed width to which this layer is bounded.- Returns:
- the fixed width to which this layer is bounded.
-
getColor
public int getColor()
Returns the color of this layer in Active mode.- Returns:
- the color of this layer in Active mode.
-
getTransform
public int getTransform()
Returns the transform of this layer.- Returns:
- the transform of this layer (see
TextTransforms).
-
getTextEffect
public int getTextEffect()
Returns the effect of this layer.- Returns:
- the effect of this layer (see
TextEffects).
-
getStrokeColor
public int getStrokeColor()
Returns the stroke color of this layer.- Returns:
- the stroke color of this layer.
-
getStrokeSize
public com.microej.script.ast.expressions.Expression getStrokeSize()
Returns the stroke size of this layer.- Returns:
- the stroke size of this layer.
-
getGlowSize
public com.microej.script.ast.expressions.Expression getGlowSize()
Returns the glow size of this layer.- Returns:
- the glow size of this layer.
-
getGlowColor
public int getGlowColor()
Returns the glow color of this layer.- Returns:
- the glow color of this layer.
-
isBounded
public boolean isBounded()
Returns whether this layer is bounded to a fixed width.- Returns:
trueif this layer is bounded to a fixed width,falseif it is not bounded.
-
getNewFontName
public java.lang.String getNewFontName()
Returns the resource ID of the font of this layer.- Returns:
- the resource ID of the font of this layer.
-
getAlignment
public int getAlignment()
Returns the alignment of this layer.- Returns:
- the alignment of this layer (see
TextAlignments).
-
-