Decoration
What a Decoratable component paints through, and how far it paints past its layout bounds: the steps its modifier declares and the paint outsets its parent gives it. The library creates each value for one component and writes it to Decoratable.decoration; a value never changes, and a change is a new value.
Each step is a Decorator, the first outermost: it paints at the layout bounds, or, when a layout modifier is declared after it, at the box of the first such modifier. The layout bounds are the box measurement, placement, alignment, onPlaced, onSizeChanged and hit testing see. The component's bounds, Swing's rectangle, are the layout bounds plus the paint outsets, how far the component paints past them on each side. A Foundation container gives a component all its paint outsets: the steps' outsets, the box of a layout modifier a step paints at, what a rotating or scaling placement layer adds and, for a Foundation container, what its children paint past it. Any other parent gives only the part of the steps' outsets the component's PaintOutsets value leaves in layout.
Functions
Whether (x, y), in component's coordinates, hits it: inside the layout bounds, as its placement layers rotate, scale and clip them, or, inside its bounds, where a visible child's own contains takes the point, as for a child placed or painting past the layout bounds. A step that cuts its children to its box, such as a clip or a fade, cuts the point too. Other paint outsets, such as a shadow's, are not hit.
Whether component, painted through this decoration, still covers every pixel of its bounds: false where it has paint outsets, or where a step paints translucently, cuts the content (Decorator.isOpaque) or paints at a box smaller than the layout bounds. The steps' own opacity is the one the library last gathered; the boxes are read at each call.
Hands paint the area at (x, y) of width by height, in component's coordinates, grown as repaint grows it; paint is super.paintImmediately. In a Foundation container, the area is grown first by the whole of each visible component it touches whose steps spread or move what it paints, as found among the children and inside the Foundation containers among them. Swing calls paintImmediately on a decorated component as the painting origin of its descendants' repaints and to paint a repaint it recorded itself, and application code may call it. What paintImmediately(int, int, int, int) of a Decoratable answers.
How far the component paints past its layout bounds on each side; a new Insets the caller owns. Under a parent that is not a Foundation container, the part of its decoration its paintOutsets value leaves in layout, none by default.
Records a repaint of the area at (x, y) of width by height, in component's coordinates, grown to all a change in it repaints: by how far the steps spread a change, such as a blur's or a shadow's reach, held inside the bounds, or to the whole bounds while the steps move what component paints, as a rotating layer does. The grown area is recorded on component with the RepaintManager, as JComponent.repaint records it, without calling component's repaint again. Where Swing paints component as the dirty component, its paintImmediately grows the area again, which paints more pixels and changes none; where Swing merges the area into the repaint of a dirty ancestor, the ancestor paints it as recorded. tm is ignored, as JComponent.repaint ignores it. What repaint(long, int, int, int, int) of a Decoratable answers.