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

jvergara
05.04.2007 73b6faf791290e10ac84feb56361ab4bfa8196cc
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupStepPanel.java
@@ -32,6 +32,7 @@
import java.awt.GridBagLayout;
import java.util.HashMap;
import java.util.HashSet;
import javax.swing.Box;
import javax.swing.JEditorPane;
@@ -41,6 +42,8 @@
import javax.swing.event.HyperlinkListener;
import javax.swing.text.JTextComponent;
import org.opends.quicksetup.event.ButtonActionListener;
import org.opends.quicksetup.event.ButtonEvent;
import org.opends.quicksetup.installer.FieldName;
import org.opends.quicksetup.installer.InstallProgressDescriptor;
import org.opends.quicksetup.installer.LabelFieldDescriptor;
@@ -63,6 +66,9 @@
{
  private Component inputPanel;
  private HashSet<ButtonActionListener> buttonListeners =
    new HashSet<ButtonActionListener>();
  private ProgressMessageFormatter formatter;
  /* We can use a HashMap (not multi-thread safe) because all
@@ -190,6 +196,37 @@
    return height;
  }
  /**
   * Adds a button listener.  All the button listeners will be notified when
   * the buttons are clicked (by the user or programatically).
   * @param l the ButtonActionListener to be added.
   */
  public void addButtonActionListener(ButtonActionListener l)
  {
    buttonListeners.add(l);
  }
  /**
   * Removes a button listener.
   * @param l the ButtonActionListener to be removed.
   */
  public void removeButtonActionListener(ButtonActionListener l)
  {
    buttonListeners.remove(l);
  }
  /**
   * Notifies the button action listeners that an event occurred.
   * @param ev the button event to be notified.
   */
  protected void notifyButtonListeners(ButtonEvent ev)
  {
    for (ButtonActionListener l : buttonListeners)
    {
      l.buttonActionPerformed(ev);
    }
  }
  /**
   * Creates the layout of the panel.
   *