/** * Returns the decoration area type of the specified component. The * component and its ancestor hierarchy are scanned for the registered * decoration area type. If * {@link #setDecorationType(JComponent, DecorationAreaType)} has been * called on the specified component, the matching decoration type is * returned. Otherwise, the component hierarchy is scanned to find the * closest ancestor that was passed to * {@link #setDecorationType(JComponent, DecorationAreaType)} - and its * decoration type is returned. If neither the component, nor any one of its * parent components has been passed to the setter method, * {@link DecorationAreaType#NONE} is returned. * * @param comp * Component. * @return Decoration area type of the component. */ public static DecorationAreaType getDecorationType(Component comp) { return DecorationPainterUtils.getDecorationType(comp); }
/** * Returns the decoration area type of the specified component. The * component and its ancestor hierarchy are scanned for the registered * decoration area type. If * {@link #setDecorationType(JComponent, DecorationAreaType)} has been * called on the specified component, the matching decoration type is * returned. Otherwise, the component hierarchy is scanned to find the * closest ancestor that was passed to * {@link #setDecorationType(JComponent, DecorationAreaType)} - and its * decoration type is returned. If neither the component, nor any one of its * parent components has been passed to the setter method, * {@link DecorationAreaType#NONE} is returned. * * @param comp * Component. * @return Decoration area type of the component. */ public static DecorationAreaType getDecorationType(Component comp) { return DecorationPainterUtils.getDecorationType(comp); }