From b06086abb554d47a68aee413f65ca74cb3a26bad Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 2 Dec 2019 09:48:10 +0800 Subject: [PATCH] =?UTF-8?q?sonar=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D,?= =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icontainer/UIEastResizableContainer.java | 10 +++++---- .../icontainer/UIModeControlContainer.java | 22 +++++++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java index 1513eb6e95..2a5c29d8c8 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -1,12 +1,11 @@ package com.fr.design.gui.icontainer; -import com.fr.base.BaseUtils; -import com.fr.base.vcs.DesignerMode; + +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.stable.Constants; import javax.swing.*; import java.awt.*; @@ -174,6 +173,7 @@ public class UIEastResizableContainer extends JPanel { @Override public void addLayoutComponent(String name, Component comp) { + // do nothing } }; @@ -238,6 +238,7 @@ public class UIEastResizableContainer extends JPanel { * 伸缩右子面板时,触发此方法 */ public void onResize() { + // do nothing here } private class TopToolPane extends JPanel { @@ -261,6 +262,7 @@ public class UIEastResizableContainer extends JPanel { @Override public void mouseDragged(MouseEvent e) { + // do nothing } }); addMouseListener(new MouseAdapter() { @@ -282,7 +284,7 @@ public class UIEastResizableContainer extends JPanel { } onResize(); refreshContainer(); - if (DesignerMode.isAuthorityEditing()) { + if (DesignModeContext.isAuthorityEditing()) { DesignerContext.getDesignerFrame().doResize(); } } diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java index 4d844336f1..a589b0c878 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java @@ -1,6 +1,7 @@ package com.fr.design.gui.icontainer; import com.fr.base.vcs.DesignerMode; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; @@ -85,7 +86,7 @@ public class UIModeControlContainer extends JLayeredPane { public void needToShowCoverAndHidPane() { - if (DesignerMode.isAuthorityEditing()) { + if (DesignModeContext.isAuthorityEditing()) { this.remove(coverPane); this.remove(hidePane); } else { @@ -128,7 +129,7 @@ public class UIModeControlContainer extends JLayeredPane { if (isHideMode || !upEditMode) { return; } - if (DesignerMode.isAuthorityEditing()) { + if (DesignModeContext.isAuthorityEditing()) { return; } setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)); @@ -151,11 +152,12 @@ public class UIModeControlContainer extends JLayeredPane { MouseMotionListener mouseMotionListener = new MouseMotionListener() { @Override public void mouseMoved(MouseEvent e) { + //do nothing } @Override public void mouseDragged(MouseEvent e) { - if (DesignerMode.isAuthorityEditing()) { + if (DesignModeContext.isAuthorityEditing()) { return; } boolean notUpEditMode = isHideMode || !upEditMode; @@ -174,7 +176,7 @@ public class UIModeControlContainer extends JLayeredPane { @Override public void removeLayoutComponent(Component comp) { - + //do nothing } @Override @@ -234,11 +236,12 @@ public class UIModeControlContainer extends JLayeredPane { @Override public void addLayoutComponent(String name, Component comp) { + // do nothing } }; protected void onModeChanged() { - + //do nothing here } /** @@ -309,7 +312,7 @@ public class UIModeControlContainer extends JLayeredPane { addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - + // do nothing } }); } @@ -319,6 +322,7 @@ public class UIModeControlContainer extends JLayeredPane { @Override public void removeLayoutComponent(Component comp) { + // do nothing } @Override @@ -333,10 +337,12 @@ public class UIModeControlContainer extends JLayeredPane { @Override public void layoutContainer(Container parent) { + // do nothing } @Override public void addLayoutComponent(String name, Component comp) { + // do nothing } }; @@ -366,7 +372,7 @@ public class UIModeControlContainer extends JLayeredPane { addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - + // do nothing } }); @@ -407,6 +413,7 @@ public class UIModeControlContainer extends JLayeredPane { @Override public void removeLayoutComponent(Component comp) { + // do nothing } @Override @@ -437,6 +444,7 @@ public class UIModeControlContainer extends JLayeredPane { @Override public void addLayoutComponent(String name, Component comp) { + // do nothing } };