From 23faffa02e132a30c02f928e317c6f66ac373d06 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Mon, 23 Apr 2007 00:29:32 +0000
Subject: [PATCH] The commit contains code for the following:
---
opends/src/quicksetup/org/opends/quicksetup/ui/CustomHTMLEditorKit.java | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/CustomHTMLEditorKit.java b/opends/src/quicksetup/org/opends/quicksetup/ui/CustomHTMLEditorKit.java
index 84defad..56f82ec 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/CustomHTMLEditorKit.java
+++ b/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;
+
}
--
Gitblit v1.10.0