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

jvergara
17.02.2008 f68e7a69b0ccd407685901e1a0839bdc316a7373
Extend GenericDialog so that its extending classes can use a customized message for the title.

Extend the Main Actions Pane so that extending classes can use a customized version of GenericDialog.
2 files modified
19 ■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/ui/GenericDialog.java 3 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java 16 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/GenericDialog.java
@@ -75,6 +75,7 @@
  private final static Color buttonPanelBackground =
    ColorAndFontConstants.greyBackground;
  private JButton okButton;
  /**
   * The close button.
   */
@@ -282,7 +283,7 @@
   * Updates the title of the dialog using the title of the panel.
   *
   */
  void updateTitle()
  public void updateTitle()
  {
    if (panel.getTitle() != null)
    {
opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java
@@ -118,9 +118,7 @@
                {
                  panel.setInfo(getInfo());
                }
                dlg = new GenericDialog(
                    Utilities.getFrame(MainActionsPane.this),
                    panel);
                dlg = createDialog(panel);
                dialogs.put(action, dlg);
                Utilities.centerGoldenMean(dlg,
@@ -175,6 +173,18 @@
  }
  /**
   * Creates the dialog to be displayed using the provided panel.
   * @param panel the panel that will be contained in the dialog.
   * @return the dialog to be displayed using the provided panel.
   */
  protected GenericDialog createDialog(StatusGenericPanel panel)
  {
    return new GenericDialog(
        Utilities.getFrame(MainActionsPane.this),
        panel);
  }
  /**
   * Creates the categories contained by this panel.
   * @return the categories contained by this panel.
   */