Browse Source

REPORT-5714 添加预定义控件问题

master
MoMeak 7 years ago
parent
commit
f6a7a17a55
  1. 5
      designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java

5
designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java

@ -40,6 +40,7 @@ import java.util.List;
public class FormParaWidgetPane extends JPanel {
private static FormParaWidgetPane THIS;
private final static int BORDER = 5;
private final static int WIDGET_WIDTHGAP = 4;
private List<WidgetOption> predifinedwidgeList = new ArrayList<WidgetOption>();
@ -123,7 +124,6 @@ public class FormParaWidgetPane extends JPanel {
}
private void initWidgetTypePopUp() {
if (widgetTypePopupMenu == null) {
JPanel widgetPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
loadPredefinedWidget();
int rowNum = calculateWidgetWindowRowNum();
@ -137,7 +137,7 @@ public class FormParaWidgetPane extends JPanel {
for (WidgetOption no : predifinedwidgeList) {
eastPane.add(new ToolBarButton(no));
}
int maxWidth = preWidgetShowMaxNum * (widgetButtonWidth + smallGAP) - smallGAP;
int maxWidth = preWidgetShowMaxNum * (widgetButtonWidth + smallGAP) - smallGAP + WIDGET_WIDTHGAP;
int width = predifinedwidgeList.size() >= preWidgetShowMaxNum ? maxWidth : (int) eastPane.getPreferredSize().getWidth();
eastPane.setPreferredSize(new Dimension(width, (int) (rowNum * eastPane.getPreferredSize().getHeight())));
@ -156,7 +156,6 @@ public class FormParaWidgetPane extends JPanel {
widgetTypePopupMenu.setBackground(UIConstants.SELECT_TAB);
widgetTypePopupMenu.add(widgetPane);
}
}
private void initChartTypePopUp() {
if (chartTypePopupMenu == null){

Loading…
Cancel
Save