Browse Source

Merge pull request #1328 in DESIGN/design from ~PENGDA/design:feature/10.0 to feature/10.0

* commit 'ccd23246c6165def0a01cf15ea0a08b3e891a349':
  sonar问题修复,无jira任务
research/11.0
pengda 5 years ago
parent
commit
5001193af2
  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;
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();
}
}

22
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
}
};

Loading…
Cancel
Save