Browse Source

sonar问题修复,无jira任务

persist/11.0
pengda 5 years ago
parent
commit
b06086abb5
  1. 10
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  2. 22
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

10
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -1,12 +1,11 @@
package com.fr.design.gui.icontainer; 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.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Constants;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -174,6 +173,7 @@ public class UIEastResizableContainer extends JPanel {
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
// do nothing
} }
}; };
@ -238,6 +238,7 @@ public class UIEastResizableContainer extends JPanel {
* 伸缩右子面板时触发此方法 * 伸缩右子面板时触发此方法
*/ */
public void onResize() { public void onResize() {
// do nothing here
} }
private class TopToolPane extends JPanel { private class TopToolPane extends JPanel {
@ -261,6 +262,7 @@ public class UIEastResizableContainer extends JPanel {
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
// do nothing
} }
}); });
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@ -282,7 +284,7 @@ public class UIEastResizableContainer extends JPanel {
} }
onResize(); onResize();
refreshContainer(); refreshContainer();
if (DesignerMode.isAuthorityEditing()) { if (DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
} }

22
designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -1,6 +1,7 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -85,7 +86,7 @@ public class UIModeControlContainer extends JLayeredPane {
public void needToShowCoverAndHidPane() { public void needToShowCoverAndHidPane() {
if (DesignerMode.isAuthorityEditing()) { if (DesignModeContext.isAuthorityEditing()) {
this.remove(coverPane); this.remove(coverPane);
this.remove(hidePane); this.remove(hidePane);
} else { } else {
@ -128,7 +129,7 @@ public class UIModeControlContainer extends JLayeredPane {
if (isHideMode || !upEditMode) { if (isHideMode || !upEditMode) {
return; return;
} }
if (DesignerMode.isAuthorityEditing()) { if (DesignModeContext.isAuthorityEditing()) {
return; return;
} }
setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR));
@ -151,11 +152,12 @@ public class UIModeControlContainer extends JLayeredPane {
MouseMotionListener mouseMotionListener = new MouseMotionListener() { MouseMotionListener mouseMotionListener = new MouseMotionListener() {
@Override @Override
public void mouseMoved(MouseEvent e) { public void mouseMoved(MouseEvent e) {
//do nothing
} }
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (DesignerMode.isAuthorityEditing()) { if (DesignModeContext.isAuthorityEditing()) {
return; return;
} }
boolean notUpEditMode = isHideMode || !upEditMode; boolean notUpEditMode = isHideMode || !upEditMode;
@ -174,7 +176,7 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
//do nothing
} }
@Override @Override
@ -234,11 +236,12 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
// do nothing
} }
}; };
protected void onModeChanged() { protected void onModeChanged() {
//do nothing here
} }
/** /**
@ -309,7 +312,7 @@ public class UIModeControlContainer extends JLayeredPane {
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
// do nothing
} }
}); });
} }
@ -319,6 +322,7 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
// do nothing
} }
@Override @Override
@ -333,10 +337,12 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
// do nothing
} }
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
// do nothing
} }
}; };
@ -366,7 +372,7 @@ public class UIModeControlContainer extends JLayeredPane {
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
// do nothing
} }
}); });
@ -407,6 +413,7 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
// do nothing
} }
@Override @Override
@ -437,6 +444,7 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
// do nothing
} }
}; };

Loading…
Cancel
Save