public abstract class TiledLayer
extends java.lang.Object
A TiledLayer represents a tile layer, object layer, image layer, or group layer, depending on which subclass of TiledLayer it is. The TiledLayer class is responsible for the attributes that all layer types have in common. Since a group layer's opacity, visibility, tint color, and rendering x and y offsets recursively affect its child layers, a TiledLayer object's methods specify those four attributes as relative (to the layer's group layer, if it has one) or as absolute. If the layer is not contained in a group layer, its relative opacity, visibility, etc. are equal to its absolute opacity, visibility, etc.
Modifier and Type | Method and Description |
---|---|
float |
getAbsOffsetX()
Returns this layer's absolute rendering x offset.
|
float |
getAbsOffsetY()
Returns this layer's absolute rendering y offset.
|
float |
getAbsOpacity()
Returns this layer's absolute opacity.
|
java.awt.Color |
getAbsTintColor()
Returns this layer's absolute tint color, or #FFFFFFFF (white) if none
was specified.
|
boolean |
getAbsVisible()
Returns whether this layer is visible.
|
java.lang.String |
getName()
Returns this layer's name.
|
TiledGroupLayer |
getParent()
Returns the group layer that this layer is a child of, or null if this
layer is not contained in a group layer.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns an unmodifiable Map view of this layer's custom properties.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the value of this layer's custom property with the specified
name, or null if no such property was specified.
|
float |
getRelOffsetX()
Returns this layer's rendering x offset, relative to its group layer if
it has one.
|
float |
getRelOffsetY()
Returns this layer's rendering y offset, relative to its group layer if
it has one.
|
float |
getRelOpacity()
Returns this layer's opacity, relative to its group layer if it has one.
|
java.awt.Color |
getRelTintColor()
Returns this layer's tint color, relative to its group layer if it has
one, or #FFFFFFFF (white) if none was specified.
|
boolean |
getRelVisible()
Returns whether this layer is visible, relative to its group layer if it
has one.
|
public final java.lang.String getName()
public final TiledGroupLayer getParent()
public final float getRelOpacity()
public final float getAbsOpacity()
public final boolean getRelVisible()
public final boolean getAbsVisible()
public final java.awt.Color getRelTintColor()
public final java.awt.Color getAbsTintColor()
public final float getRelOffsetX()
public final float getAbsOffsetX()
public final float getRelOffsetY()
public final float getAbsOffsetY()
public final java.util.Map<java.lang.String,java.lang.Object> getProperties()
java.awt.Color
for a color, java.io.File
for a file, and TiledObject for an
object (unless the object property is unset, in which case the value is
null).public final java.lang.Object getProperty(java.lang.String name)
java.awt.Color
for a color, java.io.File
for a
file, and TiledObject for an object (unless the object property is unset,
in which case the value is null).name
- The name of the property whose value is to be returned