Browse Source

Merge remote-tracking branch 'origin/fbp/release' into fbp/release

fbp/release
Destiny.Lin 2 months ago
parent
commit
f3ff5d9654
  1. 6
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 35
      designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java
  3. 50
      designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java

6
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -81,7 +81,6 @@ import javax.swing.JScrollBar;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.ToolTipManager;
import javax.swing.border.EmptyBorder;
import javax.swing.tree.TreePath;
import java.awt.BorderLayout;
import java.awt.Color;
@ -509,11 +508,10 @@ public class TableDataTreePane extends BasicTableDataTreePane {
} else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) {
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table_Data_Duplicate_Name_Tips", tempName));
dg.setButtonEnabled(false);
} else if (oldName.length() >= PROCEDURE_NAME_INDEX && tableDataPane.updateBean() instanceof MultiResultTableData) {
if (isIncludeUnderline(tempName)) {
} else if (oldName.length() >= PROCEDURE_NAME_INDEX && tableDataPane.updateBean() instanceof MultiResultTableData
&& isIncludeUnderline(tempName)) {
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Result_Table_Data_Name_Tips"));
dg.setButtonEnabled(false);
}
} else if (!BasicTableDataUtils.checkName(tempName)) {
dg.setButtonEnabled(false);
} else {

35
designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java

@ -1,10 +1,7 @@
package com.fr.design.gui.date;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIStyle;
import com.fr.design.gui.ibutton.UIButton;
import com.fine.theme.light.ui.FineComboBoxUI;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxUI;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
@ -13,6 +10,7 @@ import com.fr.stable.StringUtils;
import com.fr.design.carton.FeedbackToolboxDialog;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
@ -26,6 +24,7 @@ import javax.swing.plaf.basic.ComboPopup;
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.LayoutManager;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.Serializable;
import java.text.ParseException;
@ -292,25 +291,28 @@ public class UIDatePicker extends UIComboBox implements Serializable {
@Override
protected ComboBoxUI getUIComboBoxUI() {
return new UIComboBoxUI() {
return new FineComboBoxUI() {
@Override
protected UIButton createArrowButton() {
arrowButton = new UIButton(new LazyIcon("down_arrow")) {
public boolean shouldResponseChangeListener() {
return false;
}
};
arrowButton.addMouseListener(this);
comboBox.addMouseListener(this);
FineUIStyle.setStyle(arrowButton, FineUIStyle.PLAIN_BUTTON);
return (UIButton) arrowButton;
protected JButton createArrowButton() {
JButton button = super.createArrowButton();
button.addMouseListener(getPopupMouseAdapter());
return button;
}
@Override
protected ComboPopup createPopup() {
return new DatePopup(comboBox);
}
@Override
protected void installListeners() {
super.installListeners();
comboBox.addMouseListener(getPopupMouseAdapter());
}
MouseAdapter getPopupMouseAdapter() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (UIDatePicker.this.isPopupVisible()) {
@ -323,7 +325,8 @@ public class UIDatePicker extends UIComboBox implements Serializable {
}
};
}
};
}
//设置dataFormat

50
designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java

@ -1,6 +1,9 @@
package com.fr.design.chartx.component;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chartx.TwoTuple;
import com.fr.data.TableDataSource;
import com.fr.data.TableDataSourceTailor;
@ -31,19 +34,24 @@ import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.tree.DefaultMutableTreeNode;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author Bjorn
* @version 10.0
@ -67,49 +75,39 @@ public class MapAreaMatchPane extends BasicBeanPane<MapMatchResult> {
initButtonGroup();
initRefreshLabel();
areaNameBox = new UIComboBox();
this.setLayout(new BorderLayout(5, 5));
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
this.add(createContentPane(), BorderLayout.NORTH);
initTable(treeNodeAndItems);
JPanel tablePane = new JPanel();
tablePane.setLayout(new BorderLayout(5, 10));
tablePane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
tablePane.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
JScrollPane matchAreaScroll = new JScrollPane(matchAreaTable) {
@Override
public Dimension getPreferredSize() {
return new Dimension(400, 290);
return scale(new Dimension(400, 290));
}
};
tablePane.add(matchAreaScroll, BorderLayout.CENTER);
JScrollPane matchResultScroll = new JScrollPane(matchResultTable) {
JScrollPane matchResultScroll = new JScrollPane(matchResultTable){
@Override
public Dimension getPreferredSize() {
return new Dimension(400, 200);
return scale(new Dimension(400, 200));
}
};
matchResultScroll.setBorder(BorderFactory.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Custom_Match_List")));
tablePane.add(matchResultScroll, BorderLayout.SOUTH);
Component matchResult = FineUIUtils.wrapComponentWithTitle(matchResultScroll, Toolkit.i18nText("Fine-Design_Chart_Custom_Match_List"));
tablePane.add(matchResult, BorderLayout.SOUTH);
this.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
this.add(tablePane, BorderLayout.CENTER);
}
private JPanel createContentPane() {
JPanel panel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
JPanel tableDataPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
panel.add(tableDataPane);
tableDataPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data") + ":"));
tableNameCombox.setPreferredSize(new Dimension(96, 20));
tableDataPane.add(tableNameCombox);
JPanel areaNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
panel.add(areaNamePane);
areaNamePane.add(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":"));
areaNamePane.add(areaNameBox);
areaNameBox.setPreferredSize(new Dimension(96, 20));
panel.add(refreshLabel);
return panel;
tableNameCombox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
areaNameBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
return FineLayoutBuilder.createHorizontalLayout(10,
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data") + ":"), tableNameCombox,
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":"), areaNameBox,
refreshLabel);
}
private void initTable(TwoTuple<DefaultMutableTreeNode, Set<String>> treeNodeAndItems) {

Loading…
Cancel
Save