public abstract class TiledLayer extends Object implements TiledCustomizable
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.
|
Color |
getAbsTintColor()
Returns this layer's absolute tint color, or #FFFFFFFF (white) if none
was specified.
|
boolean |
getAbsVisible()
Returns whether this layer is visible.
|
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.
|
Map<String,Object> |
getProperties()
Returns an unmodifiable Map view of this entity's custom properties.
|
Object |
getProperty(String name)
Returns the value of this entity'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.
|
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 String getName()
public final TiledGroupLayer getParent()
public final float getRelOpacity()
public final float getAbsOpacity()
public final boolean getRelVisible()
public final boolean getAbsVisible()
public final Color getRelTintColor()
public final Color getAbsTintColor()
public final float getRelOffsetX()
public final float getAbsOffsetX()
public final float getRelOffsetY()
public final float getAbsOffsetY()
public final Map<String,Object> getProperties()
TiledCustomizable
java.awt.Color
for a color, TiledFile for a file, and TiledObject for an object (unless
the object property is unset, in which case the value is null).getProperties
in interface TiledCustomizable
public final Object getProperty(String name)
TiledCustomizable
java.awt.Color
for a color, TiledFile for a file, and
TiledObject for an object (unless the object property is unset, in which
case the value is null).getProperty
in interface TiledCustomizable
name
- The name of the property whose value is to be returnedCopyright © 2020. All rights reserved.