|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.fr.design.mainframe; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.base.i18n.BidiUtils; |
|
|
|
|
import com.fr.base.svg.IconUtils; |
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
@ -136,7 +137,7 @@ public class FormParaWidgetPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public FormParaWidgetPane() { |
|
|
|
|
setLayout(new FlowLayout(FlowLayout.LEFT)); |
|
|
|
|
setLayout(new FlowLayout(FlowLayout.LEADING)); |
|
|
|
|
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().addComponentListener(new ComponentAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void componentResized(ComponentEvent e) { |
|
|
|
@ -158,19 +159,20 @@ public class FormParaWidgetPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
initFormParaComponent(); |
|
|
|
|
BidiUtils.applyOrientationByLocale(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initWidgetTypePopUp() { |
|
|
|
|
JPanel widgetPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
JPanel widgetPane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0)); |
|
|
|
|
loadPredefinedWidget(); |
|
|
|
|
int rowNum = calculateWidgetWindowRowNum(); |
|
|
|
|
JPanel westPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
|
|
|
|
JPanel westPanel = new JPanel(new FlowLayout(FlowLayout.LEADING)); |
|
|
|
|
for (WidgetOption o : loadWidgetOptions()) { |
|
|
|
|
westPanel.add(new ToolBarButton(o)); |
|
|
|
|
} |
|
|
|
|
int x = commonWidgetNum * (widgetButtonWidth + smallGAP) - smallGAP; |
|
|
|
|
westPanel.setPreferredSize(new Dimension(x, (int) (rowNum * westPanel.getPreferredSize().getHeight()))); |
|
|
|
|
JPanel eastPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
|
|
|
|
JPanel eastPane = new JPanel(new FlowLayout(FlowLayout.LEADING)); |
|
|
|
|
for (WidgetOption no : predifinedwidgeList) { |
|
|
|
|
eastPane.add(new ToolBarButton(no)); |
|
|
|
|
} |
|
|
|
@ -196,7 +198,7 @@ public class FormParaWidgetPane extends JPanel {
|
|
|
|
|
|
|
|
|
|
private void initChartTypePopUp() { |
|
|
|
|
if (chartTypePopupMenu == null) { |
|
|
|
|
JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
|
|
|
|
JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEADING)); |
|
|
|
|
WidgetOption[] chartOptions = loadChartOptions(); |
|
|
|
|
for (WidgetOption chartOption : chartOptions) { |
|
|
|
|
ToolBarButton button = new ToolBarButton(chartOption); |
|
|
|
@ -374,7 +376,7 @@ public class FormParaWidgetPane extends JPanel {
|
|
|
|
|
(int) jSeparatorLayout.getLocation().getY()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
labelPane.add(chartPopUpButton, BorderLayout.EAST); |
|
|
|
|
labelPane.add(chartPopUpButton, BorderLayout.LINE_END); |
|
|
|
|
chartPane.add(labelPane, BorderLayout.SOUTH); |
|
|
|
|
return chartPane; |
|
|
|
|
} |
|
|
|
@ -401,7 +403,7 @@ public class FormParaWidgetPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
labelPane.add(chartPopUpButton, BorderLayout.EAST); |
|
|
|
|
labelPane.add(chartPopUpButton, BorderLayout.LINE_END); |
|
|
|
|
widgetPane.add(labelPane, BorderLayout.SOUTH); |
|
|
|
|
return widgetPane; |
|
|
|
|
} |
|
|
|
|