|
|
@ -114,6 +114,8 @@ import java.awt.Dimension; |
|
|
|
import java.awt.FontMetrics; |
|
|
|
import java.awt.FontMetrics; |
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
|
import java.nio.file.Paths; |
|
|
|
import java.nio.file.Paths; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
|
|
|
|
|
|
|
@ -1146,6 +1148,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>> |
|
|
|
* @param l 模板Listener |
|
|
|
* @param l 模板Listener |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void addJTemplateActionListener(JTemplateActionListener l) { |
|
|
|
public void addJTemplateActionListener(JTemplateActionListener l) { |
|
|
|
|
|
|
|
List<Object> list = Arrays.asList(this.listenerList.getListeners(JTemplateActionListener.class)); |
|
|
|
|
|
|
|
if (list.contains(l)) { |
|
|
|
|
|
|
|
this.listenerList.remove(JTemplateActionListener.class, l); |
|
|
|
|
|
|
|
} |
|
|
|
this.listenerList.add(JTemplateActionListener.class, l); |
|
|
|
this.listenerList.add(JTemplateActionListener.class, l); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|