Пример #1
0
  void initialize() {
    super.initialize();

    updateInsets(insets_);

    Font f = ((Window) target).getFont();
    if (f == null) {
      f = defaultFont;
      ((Window) target).setFont(f);
      setFont(f);
    }
    // Express our interest in display changes
    GraphicsConfiguration gc = getGraphicsConfiguration();
    ((Win32GraphicsDevice) gc.getDevice()).addDisplayChangedListener(this);

    initActiveWindowsTracking((Window) target);

    updateIconImages();

    Shape shape = ((Window) target).getShape();
    if (shape != null) {
      applyShape(Region.getInstance(shape, null));
    }

    float opacity = ((Window) target).getOpacity();
    if (opacity < 1.0f) {
      setOpacity(opacity);
    }

    synchronized (getStateLock()) {
      // default value of a boolean field is 'false', so set isOpaque to
      // true here explicitly
      this.isOpaque = true;
      setOpaque(((Window) target).isOpaque());
    }
  }