Class CompositePaintable<T extends Paintable>

  • Type Parameters:
    T - the type of Paintables used to create this composite.
    All Implemented Interfaces:
    Paintable
    Direct Known Subclasses:
    TextClusterPaintable


    public class CompositePaintable<T extends Paintable>
    extends Object
    implements Paintable
    A Paintable composed of several smaller Paintables that are rendering through an AffineTransform.
    • Constructor Detail

      • CompositePaintable

        public CompositePaintable()
    • Method Detail

      • addPaintable

        public void addPaintable(T paintable,
                                 Rectangle2D bounds)
      • getCount

        public int getCount()
      • getPaintable

        public T getPaintable(int i)
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getTransformedBounds

        public Rectangle2D getTransformedBounds(int a)
        Return the transformed bounds of a child paintable.

        (The untransformed bounds of a paintable are assumed to be anchored at (0,0), and span to (width, height).)

        Parameters:
        a - the index of the paintable to get the transformed bounds of.
        Returns:
        the transformed bounds of a specific paintable.