430 * heavyweight components.
431 * </ul>
432 * <p>
433 * The most common example when the 'mixing-cutout' shape is needed is a
434 * glass pane component. The {@link JRootPane#setGlassPane()} method
435 * automatically sets the <i>empty-shape</i> as the 'mixing-cutout' shape
436 * for the given glass pane component. If a developer needs some other
437 * 'mixing-cutout' shape for the glass pane (which is rare), this must be
438 * changed manually after installing the glass pane to the root pane.
439 * <p>
440 * Note that the 'mixing-cutout' shape neither affects painting, nor the
441 * mouse events handling for the given component. It is used exclusively
442 * for the purposes of the Heavyweight/Lightweight Components Mixing
443 * feature.
444 *
445 * @param component the component that needs non-default
446 * 'mixing-cutout' shape
447 * @param shape the new 'mixing-cutout' shape
448 * @throws NullPointerException if the component argument is {@code null}
449 */
450 public static void setComponentMixingCutoutShape(Component component,
451 Shape shape)
452 {
453 if (component == null) {
454 throw new NullPointerException(
455 "The component argument should not be null.");
456 }
457
458 AWTAccessor.getComponentAccessor().setMixingCutoutShape(component,
459 shape);
460 }
461 }
462
|
430 * heavyweight components.
431 * </ul>
432 * <p>
433 * The most common example when the 'mixing-cutout' shape is needed is a
434 * glass pane component. The {@link JRootPane#setGlassPane()} method
435 * automatically sets the <i>empty-shape</i> as the 'mixing-cutout' shape
436 * for the given glass pane component. If a developer needs some other
437 * 'mixing-cutout' shape for the glass pane (which is rare), this must be
438 * changed manually after installing the glass pane to the root pane.
439 * <p>
440 * Note that the 'mixing-cutout' shape neither affects painting, nor the
441 * mouse events handling for the given component. It is used exclusively
442 * for the purposes of the Heavyweight/Lightweight Components Mixing
443 * feature.
444 *
445 * @param component the component that needs non-default
446 * 'mixing-cutout' shape
447 * @param shape the new 'mixing-cutout' shape
448 * @throws NullPointerException if the component argument is {@code null}
449 */
450 @Deprecated(since = "9")
451 public static void setComponentMixingCutoutShape(Component component,
452 Shape shape)
453 {
454 if (component == null) {
455 throw new NullPointerException(
456 "The component argument should not be null.");
457 }
458
459 AWTAccessor.getComponentAccessor().setMixingCutoutShape(component,
460 shape);
461 }
462 }
463
|