mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
10.23.2007 3e1fe87fa6b264d431e899222421fbf7a7ede32d
Fix a bug in the FramePanel that made not to have distinct colors when running under Java Desktop 3 and Java.  It seems that in this environment the panel is not opaque so the code was skipped.  The fix consists of basically painting always the background colors regardless of whether the panel is marked as opaque or not.
1 files modified
19 ■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/ui/FramePanel.java 19 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/ui/FramePanel.java
@@ -149,22 +149,20 @@
   */
  protected void paintComponent(Graphics g)
  {
    if (isOpaque())
    { // paint background
      // paint background
      g.setColor(UIFactory.DEFAULT_BACKGROUND);
      int width = getWidth();
      int height = getHeight();
      int buttonsTotalHeight =
          buttonsPanel.getHeight() + buttonsPanelVerticalInsets;
      int stepsPanelTotalWidth =
          stepsPanel.getWidth() + stepsPanelHorizontalInsets;
      int buttonsTotalHeight = buttonsPanel.getHeight()
      + buttonsPanelVerticalInsets;
      int stepsPanelTotalWidth = stepsPanel.getWidth()
      + stepsPanelHorizontalInsets;
      g.fillRect(0, 0, stepsPanelTotalWidth, height);
      g.fillRect(stepsPanelTotalWidth, height - buttonsTotalHeight, width,
          height);
      g.setColor(UIFactory.CURRENT_STEP_PANEL_BACKGROUND);
      g.fillRect(stepsPanelTotalWidth, 0, width, height - buttonsTotalHeight);
    }
    if (backgroundIcon != null)
    {
@@ -174,10 +172,11 @@
      // set alpha composite.
      Graphics2D g2d = (Graphics2D) g.create();
      g2d.setComposite(AlphaComposite
          .getInstance(AlphaComposite.SRC_OVER, 0.1f));
          g2d.setComposite(AlphaComposite.getInstance(
                  AlphaComposite.SRC_OVER, 0.1f));
      backgroundIcon.paintIcon(this, g2d, UIFactory.LEFT_INSET_BACKGROUND,
          backgroundIcon.paintIcon(this, g2d,
                  UIFactory.LEFT_INSET_BACKGROUND,
          UIFactory.TOP_INSET_BACKGROUND);
      g2d.dispose(); //clean up