Browse Source

REPORT-66167 解决图表栏有时候无法显示某些图表的问题

bugfix/10.0
方磊 3 years ago
parent
commit
2bf1b599c2
  1. 12
      designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java

12
designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java

@ -41,10 +41,6 @@ import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSeparator; import javax.swing.JSeparator;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Cursor; import java.awt.Cursor;
@ -55,6 +51,10 @@ import java.awt.event.ComponentEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/** /**
* @author null * @author null
@ -196,7 +196,9 @@ public class FormParaWidgetPane extends JPanel {
JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT));
WidgetOption[] chartOptions = loadChartOptions(); WidgetOption[] chartOptions = loadChartOptions();
for (WidgetOption chartOption : chartOptions) { for (WidgetOption chartOption : chartOptions) {
componentsPara.add(new ToolBarButton(chartOption)); ToolBarButton button = new ToolBarButton(chartOption);
button.setPreferredSize(new Dimension(widgetButtonWidth, widgetButtonHeight));
componentsPara.add(button);
} }
int x = COMMON_CHAR_NUM * (widgetButtonWidth + smallGAP); int x = COMMON_CHAR_NUM * (widgetButtonWidth + smallGAP);
int y = (int) Math.ceil(chartOptions.length / ((double) COMMON_CHAR_NUM)) * (widgetButtonHeight + smallGAP); int y = (int) Math.ceil(chartOptions.length / ((double) COMMON_CHAR_NUM)) * (widgetButtonHeight + smallGAP);

Loading…
Cancel
Save