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

kenneth_suter
23.29.2007 14f210825823c17cff84d9221fa76673cbe27aa9
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/CustomHTMLEditorKit.java
@@ -40,7 +40,7 @@
/**
 * Class used to be able to detect events in the button inside an HTML pane.
 */
class CustomHTMLEditorKit extends HTMLEditorKit
public class CustomHTMLEditorKit extends HTMLEditorKit
{
  private HashSet<ActionListener> listeners = new HashSet<ActionListener>();
  private static final long serialVersionUID = 298103926252426388L;
@@ -48,7 +48,7 @@
  /**
   * Default constructor.
   */
  CustomHTMLEditorKit()
  public CustomHTMLEditorKit()
  {
    super();
  }
@@ -116,10 +116,16 @@
     */
    public void actionPerformed(ActionEvent ev)
    {
      for (ActionListener l: listeners)
      {
        l.actionPerformed(ev);
      if (ev != null && ev.getWhen() != lastActionWhen) {
        lastActionWhen = ev.getWhen();
        for (ActionListener l: listeners)
        {
          l.actionPerformed(ev);
        }
      }
    }
  }
  private static long lastActionWhen = 0;
}