java.lang.Iterable<Layer>RootLayerpublic class GroupLayer extends ClippedLayer implements java.lang.Iterable<Layer>
react.Closeable.Set, react.Closeable.UtilLayer.HitTester, Layer.Origin, Layer.State, Layer.VisitorDEBUG_RECTS, state| Constructor | Description |
|---|---|
GroupLayer() |
Creates an unclipped group layer.
|
GroupLayer(float width,
float height) |
Creates a clipped group layer with the specified size.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(Layer child) |
Adds a layer to the bottom of the group.
|
void |
add(Layer child0,
Layer child1,
Layer... childN) |
Adds all supplied children to this layer, in order.
|
void |
addAt(Layer child,
float tx,
float ty) |
Adds the supplied layer to this group layer, adjusting its translation (relative to this group
layer) to the supplied values.
|
void |
addCenterAt(Layer child,
float tx,
float ty) |
Adds
child to this group layer, positioning it such that its center is at (tx,
tx). |
void |
addFloorAt(Layer child,
float tx,
float ty) |
Adds
child to this group layer, adjusting its translation (relative to this group
layer) to floor(tx), floor(ty). |
Layer |
childAt(int index) |
Returns the layer at the specified index.
|
int |
children() |
Returns the number of child layers in this group.
|
void |
close() |
Disposes this layer, removing it from its parent layer.
|
void |
disposeAll() |
Removes and disposes all child layers from this group.
|
Layer |
hitTestDefault(pythagoras.f.Point point) |
Like
Layer.hitTest(pythagoras.f.Point) except that it ignores a configured Layer.HitTester. |
boolean |
isEmpty() |
Returns whether this group has any child layers.
|
java.util.Iterator<Layer> |
iterator() |
|
void |
remove(Layer child) |
Removes a layer from the group.
|
void |
remove(Layer child0,
Layer child1,
Layer... childN) |
Removes all supplied children from this layer, in order.
|
void |
removeAll() |
Removes all child layers from this group.
|
height, setHeight, setSize, setSize, setWidth, widthabsorbHits, alpha, debugPrint, depth, disposed, events, hasEventListeners, hitTest, interactive, name, onAdded, onDisposed, onRemoved, origin, origin, originX, originY, paint, parent, rotation, scale, scaledHeight, scaledWidth, scaleX, scaleY, setAlpha, setBatch, setDepth, setHitTester, setInteractive, setName, setOrigin, setOrigin, setRotation, setScale, setScale, setScaleX, setScaleY, setTint, setTranslation, setTranslation, setTx, setTy, setVisible, tint, toString, transform, translation, translation, tx, ty, visible, visitpublic GroupLayer()
public GroupLayer(float width,
float height)
public boolean isEmpty()
public int children()
public Layer childAt(int index)
public void add(Layer child)
Layer hierarchy is a tree, if
child is already a child of another GroupLayer, it will be removed before
being added to this GroupLayer.public void add(Layer child0, Layer child1, Layer... childN)
add(Layer).public void addAt(Layer child, float tx, float ty)
This is equivalent to: add(child.setTranslation(tx, ty)).
public void addCenterAt(Layer child, float tx, float ty)
child to this group layer, positioning it such that its center is at (tx,
tx). The layer must report a non-zero size, thus this will not work on an unclipped
group layer.
This is equivalent to: add(child.setTranslation(tx - child.width()/2,
ty - child.height()/2)).
public void addFloorAt(Layer child, float tx, float ty)
child to this group layer, adjusting its translation (relative to this group
layer) to floor(tx), floor(ty). This is useful for adding layers which display text a
text can become blurry if it is positioned on sub-pixel boundaries.public void remove(Layer child)
public void remove(Layer child0, Layer child1, Layer... childN)
remove(Layer).public void removeAll()
public void disposeAll()
public java.util.Iterator<Layer> iterator()
iterator in interface java.lang.Iterable<Layer>public void close()
Layerpublic Layer hitTestDefault(pythagoras.f.Point point)
LayerLayer.hitTest(pythagoras.f.Point) except that it ignores a configured Layer.HitTester. This allows one
to configure a hit tester which checks custom properties and then falls back on the default
hit testing implementation.hitTestDefault in class LayerCopyright © 2018. All Rights Reserved.