Browse Source

Merge pull request #1374 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit 'ab6453dcb4de9f1eef4fcabc5152a1db499dce25':
  无JIRA任务,国际化,下拉按钮长度调整
master
superman 7 years ago
parent
commit
79665d5655
  1. 8
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  2. 2
      designer_base/src/com/fr/design/module/DesignModule.java

8
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -37,7 +37,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected CardLayout cardLayout; protected CardLayout cardLayout;
protected JPanel cardPane; protected JPanel cardPane;
protected BasePlot plot; protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 24; private static final int TOP_TOOLBAR_HEIGHT = 20;
private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常
public UIControlPane() { public UIControlPane() {
this.initComponentPane(); this.initComponentPane();
@ -191,6 +192,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
g2.fillRect(0, 0, c.getWidth(), c.getHeight()); g2.fillRect(0, 0, c.getWidth(), c.getHeight());
} }
}); });
topToolBar.setBorder(null);
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);
@ -206,10 +208,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected JPanel getLeftTopPane (UIToolbar topToolBar) { protected JPanel getLeftTopPane (UIToolbar topToolBar) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f}; double[] columnSize = { p, f, TOP_TOOLBAR_WIDTH};
double[] rowSize = {TOP_TOOLBAR_HEIGHT}; double[] rowSize = {TOP_TOOLBAR_HEIGHT};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar}, new Component[]{new UILabel(getAddItemText()), new JPanel(), topToolBar},
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
} }

2
designer_base/src/com/fr/design/module/DesignModule.java

@ -95,7 +95,7 @@ public abstract class DesignModule extends TopModule {
new NameObjectCreator(Inter.getLocText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class), new NameObjectCreator(Inter.getLocText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class),
new NameObjectCreator(Inter.getLocText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), new NameObjectCreator(Inter.getLocText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class),
new NameObjectCreator("FR-Designer_JavaScript", JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) new NameObjectCreator(Inter.getLocText("FR-Designer_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class)
}; };
} }

Loading…
Cancel
Save