From d9f7bf50f452cd6838862c86ed79256b29765bd7 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 15 May 2017 10:25:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C=20?= =?UTF-8?q?=E5=90=88=E4=BB=A3=E7=A0=81=E6=BC=8F=E4=BA=86=E4=B8=AANPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/loghandler/LogHandlerBar.java | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index eeba6c2fd..5d9997f80 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -1,24 +1,16 @@ package com.fr.design.mainframe.loghandler; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.Insets; -import java.awt.ItemSelectable; -import java.awt.LayoutManager; +import com.fr.base.BaseUtils; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import javax.swing.Timer; - -import com.fr.base.BaseUtils; -import com.fr.design.gui.ibutton.UIButton; -import com.fr.general.Inter; - public class LogHandlerBar extends JPanel implements ItemSelectable { private static final long serialVersionUID = 1L; @@ -116,7 +108,9 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { }; if (timer != null) { timer.addActionListener(taskAction); - timer.start(); + if (timer != null) { + timer.start(); + } } } From f0fcb3fc95becbcaa447aaf0e15a3940e8d50970 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 15 May 2017 10:28:11 +0800 Subject: [PATCH 2/2] 1 --- .../com/fr/design/mainframe/loghandler/LogHandlerBar.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java index 5d9997f80..4fbef485d 100644 --- a/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java +++ b/designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java @@ -108,9 +108,10 @@ public class LogHandlerBar extends JPanel implements ItemSelectable { }; if (timer != null) { timer.addActionListener(taskAction); - if (timer != null) { - timer.start(); - } + } + // taskAction里还有可能置空timer. + if (timer != null) { + timer.start(); } }