private Integer getDecoratedComponentLayerInLayeredPane ( JLayeredPane layeredPane ) { Container ancestorInLayer = decoratedComponent ; while ( ! layeredPane . equals ( ancestorInLayer . getParent ( ) ) ) { ancestorInLayer = ancestorInLayer . getParent ( ) ; } return ( layeredPane . getLayer ( ancestorInLayer ) + DECORATION_LAYER_OFFSET ) ; }
Retrieves the layer index of the decorated component in the layered pane of the window .