Package com.microej.layout.model.layers
Class ImageLayer
- java.lang.Object
-
- com.microej.layout.model.layers.Layer
-
- com.microej.layout.model.layers.ImageLayer
-
public class ImageLayer extends Layer
Represents a layer of typeLayerTypes.IMAGE.
-
-
Constructor Summary
Constructors Constructor Description ImageLayer(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 width, com.microej.script.ast.expressions.Expression height, boolean isTinted, int tintColor, java.lang.String hash, int alignment)Creates an image layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAlignment()Returns the alignment of this layer.java.lang.StringgetHash()Returns the resource ID of the image of this layer.com.microej.script.ast.expressions.ExpressiongetHeight()Returns the height of this layer.intgetTintColor()Returns the tint color of this layer.intgetType()Returns the type of this layer.com.microej.script.ast.expressions.ExpressiongetWidth()Returns the width of this layer.booleanisTinted()Returns whether this layer is tinted.-
Methods inherited from class com.microej.layout.model.layers.Layer
getExtraField, getOpacity, getR, getX, getY, isThemed
-
-
-
-
Constructor Detail
-
ImageLayer
public ImageLayer(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 width, com.microej.script.ast.expressions.Expression height, boolean isTinted, int tintColor, java.lang.String hash, int alignment)Creates an image 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.width- the width of the layer.height- the height of the layer.isTinted- whether the layer is tinted.tintColor- the tint color of the layer.hash- the resource ID of the image of the layer.alignment- the alignment of the layer (seeImageAlignments).
-
-
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).
-
getWidth
public com.microej.script.ast.expressions.Expression getWidth()
Returns the width of this layer.- Returns:
- the width of this layer.
-
getHeight
public com.microej.script.ast.expressions.Expression getHeight()
Returns the height of this layer.- Returns:
- the height of this layer.
-
isTinted
public boolean isTinted()
Returns whether this layer is tinted.- Returns:
trueif this layer is tinted,falseif it is not tinted.
-
getTintColor
public int getTintColor()
Returns the tint color of this layer.- Returns:
- the tint color of this layer.
-
getHash
public java.lang.String getHash()
Returns the resource ID of the image of this layer.- Returns:
- the resource ID of the image of this layer.
-
getAlignment
public int getAlignment()
Returns the alignment of this layer.- Returns:
- the alignment of this layer (see
ImageAlignments).
-
-