public interface

ShapeParent

sofia.graphics.ShapeParent

Class Overview

An interface implemented by classes that can contain a list of shapes, such as a ShapeView.

Summary

Public Methods
abstract void add(Shape shape)
abstract void conditionallyRelayout()
Notifies the receiver that the shapes it owns need to be laid out again (if the bounds of one of the shapes have changed).
abstract void conditionallyRepaint()
Notifies the receiver that the shapes it owns need to be repainted.
abstract RectF getBounds()
Gets the bounds of receiver where shapes can be contained.
abstract ShapeParent getShapeParent()
Gets the parent of this ShapeParent.
abstract Collection<Shape> getShapes()
Gets the collection of shapes owned by the receiver.
abstract boolean isInFrontOf(Shape left, Shape right)
Returns true if the left shape is drawn in front of (later than) the shape on the right.
abstract void onPositionChanged(Shape shape)
Called by a shape inside the receiver when its position has changed, so that the receiver can rearrange its shape collection accordingly.
abstract void onShapesAdded(Iterable<? extends Shape> shapes)
abstract void onShapesRemoved(Iterable<? extends Shape> shapes)
abstract void relayout()
Notifies the receiver that the shapes it owns need to be laid out again (if the bounds of one of the shapes have changed).
abstract void remove(Shape shape)
abstract void repaint()
Notifies the receiver that the shapes it owns need to be repainted.
abstract void updateZIndex(Shape shape, int newZIndex)
Called by a shape inside the receiver when its z-index has changed, so that the receiver can rearrange its shape collection accordingly.

Public Methods

public abstract void add (Shape shape)

public abstract void conditionallyRelayout ()

Notifies the receiver that the shapes it owns need to be laid out again (if the bounds of one of the shapes have changed).

public abstract void conditionallyRepaint ()

Notifies the receiver that the shapes it owns need to be repainted.

public abstract RectF getBounds ()

Gets the bounds of receiver where shapes can be contained.

Returns
  • the bounds of the receiver

public abstract ShapeParent getShapeParent ()

Gets the parent of this ShapeParent.

Returns
  • the ShapeParent that contains the receiver

public abstract Collection<Shape> getShapes ()

Gets the collection of shapes owned by the receiver.

Returns
  • a Collection of Shape objects owned by the receiver

public abstract boolean isInFrontOf (Shape left, Shape right)

Returns true if the left shape is drawn in front of (later than) the shape on the right.

Parameters
left The shape to check.
right The shape to check against.
Returns
  • True if left is drawn in front of (later than) right.

public abstract void onPositionChanged (Shape shape)

Called by a shape inside the receiver when its position has changed, so that the receiver can rearrange its shape collection accordingly.

Parameters
shape the shape whose position was changed

public abstract void onShapesAdded (Iterable<? extends Shape> shapes)

public abstract void onShapesRemoved (Iterable<? extends Shape> shapes)

public abstract void relayout ()

Notifies the receiver that the shapes it owns need to be laid out again (if the bounds of one of the shapes have changed).

public abstract void remove (Shape shape)

public abstract void repaint ()

Notifies the receiver that the shapes it owns need to be repainted.

public abstract void updateZIndex (Shape shape, int newZIndex)

Called by a shape inside the receiver when its z-index has changed, so that the receiver can rearrange its shape collection accordingly.

Parameters
shape the shape whose z-index was changed