diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
index a9322f33fc..0cb12a8315 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
@@ -247,10 +247,10 @@ public class JDBCDefPane extends JPanel {
cell(driverComboBox).weight(3), flex(2)
).getComponent())
.addSupplier("odbc", () -> row(
- cell(driverComboBox).weight(3), flex(0.2), cell(odbcTipsLink).weight(1.8)
+ cell(driverComboBox).weight(3), flex(0.2), row(cell(odbcTipsLink)).weight(1.8)
).getComponent())
.addSupplier("define", () -> row(
- cell(driverLoaderBox).weight(3), flex(0.2), cell(driverManageLabel).weight(1.8)
+ cell(driverLoaderBox).weight(3), flex(0.2), row(cell(driverManageLabel)).weight(1.8)
).getComponent());
changeDriverRow();
diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java
index 88b126e07b..017b971876 100644
--- a/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java
+++ b/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java
@@ -1,7 +1,7 @@
package com.fr.design.mainframe;
+import com.fr.design.constants.LayoutConstants;
import java.awt.BorderLayout;
-import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -25,6 +25,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
+import static com.fine.swing.ui.layout.Layouts.column;
public class DecodeDialog {
@@ -37,20 +38,26 @@ public class DecodeDialog {
public DecodeDialog(final FILE file) {
this.file = file;
-
+
jd = new JDialog();
jd.setLayout(new BorderLayout());
- UILabel newNameLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd"));
+ JPanel contentPanel = new JPanel();
+ contentPanel.setLayout(new BorderLayout());
+ // 密码输入
+ UILabel newNameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd"));
jt = new UITextField(StringUtils.EMPTY);
jt.selectAll();
- jd.add(row(20, cell(newNameLable), cell(jt)).getComponent(), BorderLayout.NORTH);
-
+ // 提示文本
hintsLabel = new UILabel();
- hintsLabel.setForeground(Color.RED);
+ FineUIStyle.setStyle(hintsLabel, FineUIStyle.LABEL_WARNING_TIP);
hintsLabel.setVisible(false);
+ contentPanel.add(column(LayoutConstants.VERTICAL_GAP,
+ row(20, cell(newNameLabel), cell(jt).weight(1)),
+ cell(hintsLabel)
+ ).getComponent());
+ contentPanel.setBorder(new ScaledEmptyBorder(30, 20, 10, 20));
confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"));
- FineUIStyle.setStyle(confirmButton, FineUIStyle.PLAIN_BUTTON);
confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String key = jt.getText();
@@ -76,8 +83,8 @@ public class DecodeDialog {
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
buttonPane.add(row(8, cell(confirmButton), cell(cancelButton)).getComponent(), BorderLayout.EAST);
+ jd.add(contentPanel,BorderLayout.CENTER);
jd.add(buttonPane, BorderLayout.SOUTH);
- jd.add(hintsLabel, BorderLayout.CENTER);
jd.setSize(340, 180);
jd.setModal(true);
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode"));
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_area.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_area.svg
new file mode 100644
index 0000000000..8e7a17493a
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_area.svg
@@ -0,0 +1,7 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_bubble.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_bubble.svg
new file mode 100644
index 0000000000..81eb99dad8
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_bubble.svg
@@ -0,0 +1,7 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_column.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_column.svg
new file mode 100644
index 0000000000..ddf2ef872e
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_column.svg
@@ -0,0 +1,7 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_cuvette.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_cuvette.svg
new file mode 100644
index 0000000000..4d68f0943c
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_cuvette.svg
@@ -0,0 +1,15 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_different_pie.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_different_pie.svg
new file mode 100644
index 0000000000..99f947b8ba
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_different_pie.svg
@@ -0,0 +1,6 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_line.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_line.svg
new file mode 100644
index 0000000000..9f4013ec9d
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_line.svg
@@ -0,0 +1,6 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pie.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pie.svg
new file mode 100644
index 0000000000..620f4db03e
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pie.svg
@@ -0,0 +1,10 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pointer_180.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pointer_180.svg
new file mode 100644
index 0000000000..32f8af8ede
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pointer_180.svg
@@ -0,0 +1,35 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pointer_360.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pointer_360.svg
new file mode 100644
index 0000000000..1f680fd7a1
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_pointer_360.svg
@@ -0,0 +1,35 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_radar.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_radar.svg
new file mode 100644
index 0000000000..d1141904ca
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_radar.svg
@@ -0,0 +1,7 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_ring.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_ring.svg
new file mode 100644
index 0000000000..783652eeea
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_ring.svg
@@ -0,0 +1,13 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_same_pie.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_same_pie.svg
new file mode 100644
index 0000000000..5f18014891
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_same_pie.svg
@@ -0,0 +1,6 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_scatter.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_scatter.svg
new file mode 100644
index 0000000000..54b295eafe
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_scatter.svg
@@ -0,0 +1,9 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_slot.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_slot.svg
new file mode 100644
index 0000000000..542a90fa65
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_slot.svg
@@ -0,0 +1,18 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_stack_radar.svg b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_stack_radar.svg
new file mode 100644
index 0000000000..c278096d54
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/chart/icon_stack_radar.svg
@@ -0,0 +1,46 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
index 45971eca90..57d03e4efc 100644
--- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
+++ b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
@@ -425,6 +425,21 @@
"chart_rectangleTree": "chart/chart_rectangleTree.svg",
"chart_wordCloud": "chart/chart_wordCloud.svg",
"chart_frame": "chart/chart_frame.svg",
+ "icon_area": "chart/icon_area.svg",
+ "icon_bubble": "chart/icon_bubble.svg",
+ "icon_cuvette": "chart/icon_cuvette.svg",
+ "icon_different_pie": "chart/icon_different_pie.svg",
+ "icon_line": "chart/icon_line.svg",
+ "icon_pie": "chart/icon_pie.svg",
+ "icon_pointer_180": "chart/icon_pointer_180.svg",
+ "icon_pointer_360": "chart/icon_pointer_360.svg",
+ "icon_radar": "chart/icon_radar.svg",
+ "icon_ring": "chart/icon_ring.svg",
+ "icon_same_pie": "chart/icon_same_pie.svg",
+ "icon_scatter": "chart/icon_scatter.svg",
+ "icon_slot": "chart/icon_slot.svg",
+ "icon_stack_radar": "chart/icon_stack_radar.svg",
+ "icon_column": "chart/icon_column.svg",
"out": "border/out.svg",
"in": "border/in.svg",
"bottom": "border/bottom.svg",
diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/ChartImageCheckOutPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/ChartImageCheckOutPane.java
index 74bf668f8b..0715be73a4 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/ChartImageCheckOutPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/ChartImageCheckOutPane.java
@@ -1,5 +1,6 @@
package com.fr.van.chart.custom.component;
+import com.fine.theme.icon.LazyIcon;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
@@ -8,21 +9,30 @@ import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import javax.swing.BorderFactory;
-import javax.swing.ImageIcon;
+import javax.swing.Icon;
import javax.swing.JCheckBox;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
+import java.awt.Graphics;
+import java.awt.Dimension;
import java.util.ArrayList;
+import static com.fine.swing.ui.layout.Layouts.cell;
+import static com.fine.swing.ui.layout.Layouts.row;
+import static com.fine.swing.ui.layout.Layouts.flex;
+
/**
* Created by Fangjie on 2016/4/19.
*/
public class ChartImageCheckOutPane extends BasicPane implements UIObserver {
private JCheckBox checkBox;
- private CustomPlotType customPlotType;
- private ArrayList changeListeners = new ArrayList();
+ private Icon backgroundIcon;
+ private final CustomPlotType customPlotType;
+ private static final int ICON_WIDTH = 56;
+ private static final int ICON_HEIGHT = 50;
+ private final ArrayList changeListeners = new ArrayList();
public ChartImageCheckOutPane(CustomPlotType type){
this(type, false);
@@ -30,40 +40,40 @@ public class ChartImageCheckOutPane extends BasicPane implements UIObserver {
public ChartImageCheckOutPane( CustomPlotType type, boolean isSelected){
this.customPlotType = type;
+ initComponent(isSelected);
+ }
- initCheckBox(isSelected);
-
- this.add(checkBox, BorderLayout.CENTER);
+ @Override
+ protected void paintComponent(Graphics g) {
+ super.paintComponent(g);
+ if (backgroundIcon != null) {
+ backgroundIcon.paintIcon(this, g, 0, 0);
+ }
}
public CustomPlotType getCustomPlotType() {
return customPlotType;
}
- private void initCheckBox(boolean isSelected) {
+ private void initComponent(boolean isSelected) {
this.checkBox = new JCheckBox();
this.checkBox.setSelected(isSelected);
//设置提示
this.checkBox.setToolTipText(CustomPlotFactory.getTooltipText(this.customPlotType));
- //背景
- checkBox.setIcon(new ImageIcon(getClass().getResource(getIconPath(customPlotType,isSelected))));
-
+ //设置背景图标
+ this.backgroundIcon = new LazyIcon(getIconId(this.customPlotType), new Dimension(ICON_WIDTH, ICON_HEIGHT));
this.setLayout(new BorderLayout());
+ this.add(row(flex(), cell(checkBox)).getComponent(), BorderLayout.NORTH);
}
- private String getIconPath(CustomPlotType customPlotType, boolean isSelected) {
- return isSelected ? CustomPlotFactory.getTypeIconPath(customPlotType)[0] : CustomPlotFactory.getTypeIconPath(customPlotType)[1];
+ private String getIconId(CustomPlotType customPlotType) {
+ return CustomPlotFactory.getTypeIconId(customPlotType);
}
-
public JCheckBox getCheckBox() {
return checkBox;
}
- public void checkIconImage(){
- checkBox.setIcon(new ImageIcon(getClass().getResource(getIconPath(customPlotType, checkBox.isSelected()))));
- }
-
public void setPaneBorder(boolean isRightLine, boolean isBottomLine){
this.setBorder(BorderFactory.createMatteBorder(1, 1, isBottomLine ? 1 : 0, isRightLine ? 1 : 0, UIConstants.LINE_COLOR));
}
@@ -77,7 +87,6 @@ public class ChartImageCheckOutPane extends BasicPane implements UIObserver {
}
-
@Override
protected String title4PopupWindow() {
return null;
diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
index f73d23671b..296abc5601 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
@@ -65,8 +65,6 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane {
updateOldSelectedList();
addCheckBoxListener();
-
- checkoutSelected();
}
private void updateOldSelectedList() {
@@ -76,13 +74,6 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane {
}
}
- private void checkoutSelected() {
- for (int i = 0; i < customTypeList.size(); i++){
- //根据是否选中重置背景
- customTypeList.get(i).checkIconImage();
- }
- }
-
private void initContentPane() {
content = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(CUSTOM_TYPE_NUM, 0, 0);
@@ -124,9 +115,6 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane {
//点击后更新已选顺序
checkoutSelectedPlotTypeList();
- //点击后,更新背景
- checkoutSelected();
-
//响应观察者事件,以便更新chart
fireDirty();
}
@@ -169,8 +157,6 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane {
populateCustomTypeList(customPlot);
populateSelectedPlotTypeList(customPlot);
-
- checkoutSelected();
}
private void populateSelectedPlotTypeList(VanChartCustomPlot customPlot) {
diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java b/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
index bb110c8203..b2d0e6dd08 100644
--- a/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
+++ b/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
@@ -7,7 +7,6 @@ import com.fr.base.background.ColorBackground;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache;
-import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.ElementCasePane;
@@ -26,7 +25,6 @@ import com.fr.stable.ColumnRow;
import com.fr.stable.EssentialUtils;
import com.fr.stable.StringUtils;
-import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.BorderLayout;
@@ -48,11 +46,8 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
private CellSelection oldSelection;
private SelectionListener gridSelectionChangeListener;
UIObserverListener uiObserverListener;
- private final static Icon DISABLED_ICON = new LazyIcon("cellSelect").disabled();
- private final static Icon ENABLE_ICON = new LazyIcon("cellSelect");
private boolean enabled;
SelectActionListener selectActionListener;
- private AbstractAttrNoScrollPane parent;
HeaderAreaPane.CellSelectionManager cellSelectionManager;
@@ -65,13 +60,6 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
initTextField();
initSelectButton();
initLayout();
- //翻新前AbstractAttrNoScrollPane中递归注册已加载的Pane事件,UI翻新后部分面板未提前加载导致事件未注册,先主动调用下后续再重构
- registerChangeListener(new UIObserverListener() {
- @Override
- public void doChange() {
- parent.attributeChanged();
- }
- });
}
private void initLayout() {
@@ -100,7 +88,7 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
}
void initSelectButton() {
- selectButton = new UIButton(ENABLE_ICON);
+ selectButton = new UIButton(new LazyIcon("cellSelect"));
selectActionListener = new SelectActionListener(this);
selectButton.addMouseListener(selectActionListener);
}
@@ -123,12 +111,6 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
colJTextField.setText(StringUtils.EMPTY);
rowJTextField.setText(StringUtils.EMPTY);
}
- if (enabled) {
- selectButton.setIcon(ENABLE_ICON);
- } else {
- selectButton.setIcon(DISABLED_ICON);
- }
- selectButton.setEnabled(false);
refresh();
}
diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java
index bff1c4ec72..cd9c616d26 100644
--- a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java
+++ b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java
@@ -1,7 +1,6 @@
package com.fr.design.sort.header;
-import com.fr.design.constants.LayoutConstants;
-import com.fr.design.gui.core.ReactiveCardPane;
+import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
@@ -23,6 +22,8 @@ import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
+import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
+import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
public class HeaderAreaPane extends JPanel {
@@ -31,10 +32,8 @@ public class HeaderAreaPane extends JPanel {
private CellSelectionManager cellSelectionManager = new CellSelectionManager();
TemplateCellElement cellElement;
SortColumnRowPane columnRowPane;
- ReactiveCardPane cardPane;
UIComboBox uiComboBox;
- UILabel headerLabel;
- boolean showHeaderArea;
+ JPanel sortColumnRowPanel;
HeaderAreaPane(int headerAreaPaneWidth, int headerAreaPaneRightWidth) {
this.headerAreaPaneWidth = headerAreaPaneWidth;
@@ -43,59 +42,25 @@ public class HeaderAreaPane extends JPanel {
}
void initComponents() {
- headerLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Header_Area"), SwingConstants.LEFT);
uiComboBox = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_None"), Toolkit.i18nText("Fine-Design_Basic_Custom")});
columnRowPane = new SortColumnRowPane();
- initCardPane();
- initChangeListener();
+ sortColumnRowPanel = new JPanel(new BorderLayout());
+ sortColumnRowPanel.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
+ sortColumnRowPanel.add(row(flex(LEFT_WEIGHT), cell(columnRowPane).weight(RIGHT_WEIGHT)).getComponent());
this.setLayout(new BorderLayout());
- this.add(cardPane);
+ this.add(column(
+ row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Sort_Header_Area"))).weight(LEFT_WEIGHT), cell(uiComboBox).weight(RIGHT_WEIGHT)),
+ cell(sortColumnRowPanel)
+ ).getComponent());
+ uiComboBox.setSelectedIndex(1);
+ initChangeListener();
}
private void initChangeListener() {
uiComboBox.addItemListener(e -> {
- if ((showHeaderArea ? 1 : 0) != uiComboBox.getSelectedIndex()) {
- triggerItemChanged();
- }
+ sortColumnRowPanel.setVisible(uiComboBox.getSelectedIndex() == 1);
});
- uiComboBox.setEnabled(false);
- }
-
- private void triggerItemChanged() {
- if (uiComboBox.getSelectedIndex() == 0) {
- cardPane.select("none").populate();
- showHeaderArea = false;
- cellSelectionManager.removeNotSelectables(columnRowPane.updateBean());
- columnRowPane.cancelSelectState();
- } else {
- cardPane.select("custom").populate();
- showHeaderArea = true;
- ColumnRow columnRow = columnRowPane.updateBean();
- if (cellSelectionManager.isNotSelectables(columnRow)) {
- columnRowPane.setColumnRow(ColumnRow.ERROR);
- } else {
- cellSelectionManager.addNotSelectables(columnRow);
- }
- }
- }
-
- private void initCardPane() {
- cardPane = ReactiveCardPane.create()
- .addSupplier("none", () -> column(LayoutConstants.VERTICAL_GAP,
- row(
- cell(headerLabel).weight(1.2), cell(uiComboBox).weight(3)
- )
- ).getComponent())
- .addSupplier("custom", () -> column(LayoutConstants.VERTICAL_GAP,
- row(
- cell(headerLabel).weight(1.2), cell(uiComboBox).weight(3)
- ),
- row(
- flex(1.2), cell(columnRowPane).weight(3)
- )
- ).getComponent());
-
- cardPane.select("none").populate();
+ uiComboBox.setSelectedIndex(0);
}
public void populateBean(ColumnRow columnRow, boolean showHeaderArea, TemplateCellElement cellElement) {
diff --git a/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java
index 496b368014..28087fd4f9 100644
--- a/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java
+++ b/designer-realize/src/main/java/com/fr/design/webattr/DragToolBarPane.java
@@ -112,7 +112,7 @@ public class DragToolBarPane extends WidgetToolBarPane {
JPanel movePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
movePane.add(column(1,
cell(topToolbarPanel),
- cell(toolbarButtonList),
+ cell(toolbarButtonList).weight(1),
cell(bottomToolbarPanel)
).getComponent());
this.add(new JScrollPane(movePane), BorderLayout.CENTER);