void applyCompoundShape(Region shape){
  checkTreeLock();
  if (!areBoundsValid()) {
    if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
      mixingLog.fine("this = " + this + "; areBoundsValid = "+ areBoundsValid());
    }
    return;
  }
  if (!isLightweight()) {
    ComponentPeer peer=getPeer();
    if (peer != null) {
      if (shape.isEmpty()) {
        shape=Region.EMPTY_REGION;
      }
      if (shape.equals(getNormalShape())) {
        if (this.compoundShape == null) {
          return;
        }
        this.compoundShape=null;
        peer.applyShape(null);
      }
 else {
        if (shape.equals(getAppliedShape())) {
          return;
        }
        this.compoundShape=shape;
        Point compAbsolute=getLocationOnWindow();
        if (mixingLog.isLoggable(PlatformLogger.Level.FINER)) {
          mixingLog.fine("this = " + this + "; compAbsolute="+ compAbsolute+ "; shape="+ shape);
        }
        peer.applyShape(shape.getTranslatedRegion(-compAbsolute.x,-compAbsolute.y));
      }
    }
  }
}

void applyCompoundShape ( Region shape ) { checkTreeLock ( ) ; if ( ! areBoundsValid ( ) ) { if ( mixingLog . isLoggable ( PlatformLogger . Level . FINE ) ) { mixingLog . fine ( "this = " + this + "; areBoundsValid = " + areBoundsValid ( ) ) ; } return ; } if ( ! isLightweight ( ) ) { ComponentPeer peer = getPeer ( ) ; if ( peer != null ) { if ( shape . isEmpty ( ) ) { shape = Region . EMPTY_REGION ; } if ( shape . equals ( getNormalShape ( ) ) ) { if ( this . compoundShape == null ) { return ; } this . compoundShape = null ; peer . applyShape ( null ) ; } else { if ( shape . equals ( getAppliedShape ( ) ) ) { return ; } this . compoundShape = shape ; Point compAbsolute = getLocationOnWindow ( ) ; if ( mixingLog . isLoggable ( PlatformLogger . Level . FINER ) ) { mixingLog . fine ( "this = " + this + "; compAbsolute=" + compAbsolute + "; shape=" + shape ) ; } peer . applyShape ( shape . getTranslatedRegion ( - compAbsolute . x , - compAbsolute . y ) ) ; } } } }
applies the shape to the component
