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

kenneth_suter
27.10.2007 0650329dd85ec3cdc30c280260c41e9f1581bc28
moved common code to utility method
3 files modified
39 ■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupDialog.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java 18 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java 11 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupDialog.java
@@ -113,15 +113,7 @@
      }
    });
    frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    UIFactory.IconType ic;
    if (Utils.isMacOS())
    {
      ic = UIFactory.IconType.MINIMIZED_MAC;
    } else
    {
      ic = UIFactory.IconType.MINIMIZED;
    }
    frame.setIconImage(UIFactory.getImageIcon(ic).getImage());
    Utilities.setFrameIcon(frame);
  }
  /**
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java
@@ -27,6 +27,8 @@
package org.opends.quicksetup.ui;
import org.opends.quicksetup.util.Utils;
import javax.swing.*;
import javax.swing.text.JTextComponent;
import java.awt.*;
@@ -74,4 +76,20 @@
    return panel;
  }
  /**
   * Sets a frames image icon to the standard OpenDS icon appropriate
   * for the running platform.
   *
   * @param frame for which the icon will be set
   */
  static public void setFrameIcon(JFrame frame) {
    UIFactory.IconType ic;
    if (Utils.isMacOS()) {
      ic = UIFactory.IconType.MINIMIZED_MAC;
    } else {
      ic = UIFactory.IconType.MINIMIZED;
    }
    frame.setIconImage(UIFactory.getImageIcon(ic).getImage());
  }
}
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/StatusPanelDialog.java
@@ -68,6 +68,7 @@
import org.opends.quicksetup.event.MinimumSizeComponentListener;
import org.opends.quicksetup.ui.UIFactory;
import org.opends.quicksetup.ui.Utilities;
import org.opends.quicksetup.util.HtmlProgressMessageFormatter;
import org.opends.quicksetup.util.Utils;
@@ -142,15 +143,7 @@
      }
    });
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    UIFactory.IconType ic;
    if (Utils.isMacOS())
    {
      ic = UIFactory.IconType.MINIMIZED_MAC;
    } else
    {
      ic = UIFactory.IconType.MINIMIZED;
    }
    setIconImage(UIFactory.getImageIcon(ic).getImage());
    Utilities.setFrameIcon(this);
  }
  /**