Browse Source

REPORT-35381 && REPORT-35379

feature/big-screen
hades 5 years ago
parent
commit
ac5c016673
  1. 2
      designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java
  2. 12
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  3. 12
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  4. 10
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

2
designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java

@ -76,7 +76,7 @@ public class AboutDialog extends JDialog implements ActionListener {
this.getRootPane().setDefaultButton(okButton);
this.setSize(new Dimension(660, 600));
this.setSize(defaultPane.getPreferredSize().width, 600);
GUICoreUtils.centerWindow(this);
}

12
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -4,6 +4,7 @@
package com.fr.design.actions.help;
import com.fr.base.FRContext;
import com.fr.base.GraphHelper;
import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -36,9 +37,13 @@ public class AboutPane extends JPanel {
private static final String COMPANY_TELEPHONE = CloudCenter.getInstance().acquireUrlByKind("help.compNo");
private static final String PRESIDENT_PHONE = CloudCenter.getInstance().acquireUrlByKind("help.PNo");
private int maxWidth;
public AboutPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.maxWidth = GraphHelper.getWidth(getBuildTitle() + GeneralUtils.readFullBuildNO() +
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO") +
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO_OK"));
//center panel
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER);
@ -90,6 +95,11 @@ public class AboutPane extends JPanel {
}
}
@Override
public Dimension getPreferredSize() {
return new Dimension(this.maxWidth, super.getPreferredSize().height);
}
private void addPhoneAndQQPane(JPanel contentPane) {
BoxCenterAligmentPane boxCenterAlignmentPane;
// 英文版不显示服务电话和QQ

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

@ -18,6 +18,10 @@ import java.awt.event.MouseMotionListener;
*/
public class UIEastResizableContainer extends JPanel {
private static final long serialVersionUID = 1854340560790476907L;
public static final int MAX_CONTAINER_WIDTH = 500;
public static final int MIN_CONTAINER_WIDTH = 286;
private int containerWidth = 240;
private int preferredWidth = 240;
private int topToolPaneHeight = 25;
@ -262,7 +266,13 @@ public class UIEastResizableContainer extends JPanel {
@Override
public void mouseDragged(MouseEvent e) {
// do nothing
containerWidth = UIEastResizableContainer.this.getWidth() + (UIEastResizableContainer.this.getLocationOnScreen().x - e.getXOnScreen());
containerWidth = Math.min(containerWidth, MAX_CONTAINER_WIDTH);
containerWidth = Math.max(containerWidth, MIN_CONTAINER_WIDTH);
refreshContainer();
if ( DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize();
}
}
});
addMouseListener(new MouseAdapter() {

10
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@ -66,7 +67,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel leftPane;
private JPanel rightPane;
private FixedPopupPane currentPopupPane;
private static final int CONTAINER_WIDTH = 286;
private static final int CONTAINER_WIDTH = containerWidth();
private static final int TAB_WIDTH = 38;
private static final int TAB_BUTTON_WIDTH = 32;
private static final int TAB_BUTTON_HEIGHT = 28;
@ -107,6 +108,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板)
private static int containerWidth() {
if (FRContext.isChineseEnv()) {
return UIEastResizableContainer.MIN_CONTAINER_WIDTH;
}
return UIEastResizableContainer.MAX_CONTAINER_WIDTH;
}
/**
* 得到实例
*

Loading…
Cancel
Save