Browse Source

REPORT-144629 模板助手插件适配 合并冲突

fbp/feature^2
Leo.Qin 7 days ago
parent
commit
7df0d58781
  1. 28
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java
  2. 49
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java
  3. 6
      designer-base/src/main/resources/com/fine/theme/icon/insert/auto_chart_disabled.svg
  4. 6
      designer-base/src/main/resources/com/fine/theme/icon/insert/auto_chart_normal.svg
  5. 4
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  6. 14
      designer-base/src/test/java/com/fr/design/gui/storybook/components/ComboCheckBoxStoryBoard.java
  7. 53
      designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java
  8. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  9. 4
      designer-realize/src/main/java/com/fr/design/actions/insert/cell/AutoChartCellAction.java
  10. 4
      designer-realize/src/main/java/com/fr/design/actions/insert/flot/AutoChartFloatAction.java
  11. 20
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

28
designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java

@ -21,7 +21,6 @@ import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.stable.StringUtils;
@ -37,7 +36,6 @@ import javax.swing.UIManager;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.ActionEvent;
@ -347,10 +345,10 @@ public class TableDataDesensitizationTableModel extends UITableModelAdapter<Tabl
*/
private class EffectedRolesChooser extends AbstractCellEditor implements TableCellEditor {
private EffectedRolesComboBox rolesCheckBox;
private UIComboCheckBox rolesCheckBox;
EffectedRolesChooser() {
rolesCheckBox = new EffectedRolesComboBox();
rolesCheckBox = new UIComboCheckBox(roleMap.values().toArray());
this.addCellEditorListener(new CellEditorListener() {
@Override
public void editingStopped(ChangeEvent e) {
@ -417,28 +415,6 @@ public class TableDataDesensitizationTableModel extends UITableModelAdapter<Tabl
return rolesCheckBox.getSelectedValues();
}
private class EffectedRolesComboBox extends UIComboCheckBox {
public EffectedRolesComboBox() {
super(roleMap.values().toArray(), true);
}
@Override
protected void setLayoutAndAddComponents() {
// 使用BorderLayout,否则默认使用的FlowLayout会让整个下拉选框使用最小Size,然后TableCell这边会出现空白
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = getClickPane();
pane.setOpaque(false);
this.add(pane, BorderLayout.CENTER);
}
@Override
protected void setEditorToolTipText(JComponent editor, String text) {
// 选项过多时,已选中的值会做省略显示处理,此处添加一个Tooltips,显示完整值
if (text != null) {
editor.setToolTipText(text);
}
}
}
}
/**

49
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

@ -2,8 +2,6 @@ package com.fr.design.gui.icombocheckbox;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.HoverAware;
@ -17,15 +15,14 @@ import com.fr.stable.StringUtils;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.FontMetrics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -39,7 +36,6 @@ import java.util.Map;
import static com.fine.theme.utils.FineUIStyle.OFFET_LEFT_TEXT_FIELD;
import static com.fine.theme.utils.FineUIStyle.PLAIN_ARROW_BUTTON;
import static com.fine.theme.utils.FineUIStyle.TRANSPARENT_TEXT_FIELD;
import static com.fine.theme.utils.FineUIStyle.setStyle;
/**
@ -143,7 +139,7 @@ public class UIComboCheckBox extends JComboBox implements UIObserver, GlobalName
initClickPane();
setLayoutAndAddComponents();
setText();
SwingUtilities.invokeLater(this::setText);
addPopupListener(this);
}
@ -152,10 +148,12 @@ public class UIComboCheckBox extends JComboBox implements UIObserver, GlobalName
* 设置布局管理器并且添加组件
* 默认使用FlowLayout
*/
protected void setLayoutAndAddComponents() {
this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
this.add(editor);
this.add(arrowButton);
private void setLayoutAndAddComponents() {
// 使用BorderLayout,否则默认使用的FlowLayout会让整个下拉选框使用最小Size,然后TableCell这边会出现空白
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = getClickPane();
pane.setOpaque(false);
this.add(pane, BorderLayout.CENTER);
}
public UICheckListPopup getPopup() {
@ -341,7 +339,10 @@ public class UIComboCheckBox extends JComboBox implements UIObserver, GlobalName
* @param text
*/
protected void setEditorToolTipText(JComponent editor, String text) {
// 默认不做设置
// 选项过多时,已选中的值会做省略显示处理,此处添加一个Tooltips,显示完整值
if (text != null) {
editor.setToolTipText(text);
}
}
/**
@ -360,6 +361,10 @@ public class UIComboCheckBox extends JComboBox implements UIObserver, GlobalName
String omitText = StringUtils.EMPTY;
char[] chars = text.toCharArray();
if (textEditor.getWidth() == 0) {
return text;
}
for (int i = 1; i <= chars.length; i++) {
//如果原文本+省略号长度超过文本框
if (fontMetrics.charsWidth(chars, 0, i) + omitLength > textEditor.getWidth()) {
@ -497,26 +502,4 @@ public class UIComboCheckBox extends JComboBox implements UIObserver, GlobalName
public String getUIClassID() {
return UI_CLASS_ID;
}
/**
* 简单的测试demo
*
* @param args
*/
public static void main(String args[]) {
UIComboCheckBox comboBox = new UIComboCheckBox(new Object[]
{"MATA", "HANA", "KAKA", "KUKA", "INFI", "LILY", "RIBO", "CUBE", "MATA", "HANA", "KAKA", "KUKA"});
comboBox.isShowOmitText(false);
comboBox.setPopupMaxDisplayNumber(6);
JPanel jPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
jPanel.add(comboBox);
JFrame jFrame = new JFrame();
jFrame.setVisible(true);
jFrame.setSize(600, 400);
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.add(jPanel, BorderLayout.CENTER);
}
}

6
designer-base/src/main/resources/com/fine/theme/icon/insert/auto_chart_disabled.svg

@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 26C10.5 26.5523 10.9477 27 11.5 27H17C17.5523 27 18 26.5523 18 26V23.0365L17.3945 22.4032C16.6539 21.6285 17.0125 20.3675 18 20.0674V4C18 3.44771 17.5523 3 17 3H11.5C10.9477 3 10.5 3.44772 10.5 4V26ZM12.1 25.4H16.4V4.6H12.1V25.4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M27.5 10V19.6285L26.6486 19.4739L25.9 18.083V10.6H21.6V18.7572L21.2143 19.4739L20 19.6943V10C20 9.44772 20.4477 9 21 9H26.5C27.0523 9 27.5 9.44771 27.5 10Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M20.7058 28.278C20.4063 28.4222 20.0667 28.1754 20.1113 27.8461L20.5647 24.4978C20.5817 24.372 20.5405 24.2453 20.4528 24.1535L18.118 21.7112C17.8883 21.4709 18.018 21.0717 18.345 21.0124L21.6695 20.4088C21.7944 20.3862 21.9022 20.3078 21.9624 20.1961L23.5637 17.2208C23.7212 16.9281 24.141 16.9281 24.2985 17.2208L25.8998 20.1961C25.8997 20.1959 25.8999 20.1962 25.8998 20.1961C25.96 20.3078 26.0681 20.3862 26.193 20.4089L29.5172 21.0124C29.8442 21.0717 29.9739 21.4709 29.7442 21.7112L27.5 24.0587L27.4097 24.1536C27.322 24.2453 27.2808 24.372 27.2978 24.4979L27.5 25.9909V25.9932L27.7509 27.8461C27.7955 28.1754 27.4559 28.4222 27.1564 28.278L24.1121 26.8121C24.0737 26.7937 24.0332 26.7814 23.992 26.7753C23.9105 26.7634 23.8263 26.7756 23.7504 26.8122L20.7058 28.278Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 27C1.44772 27 1 26.5523 1 26V16C1 15.4477 1.44772 15 2 15H7.5C8.05228 15 8.5 15.4477 8.5 16V26C8.5 26.5523 8.05228 27 7.5 27H2ZM6.9 25.4H2.6V16.6H6.9V25.4Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

6
designer-base/src/main/resources/com/fine/theme/icon/insert/auto_chart_normal.svg

@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 26C10.5 26.5523 10.9477 27 11.5 27H17C17.5523 27 18 26.5523 18 26V23.0365L17.3945 22.4032C16.6539 21.6285 17.0125 20.3675 18 20.0674V4C18 3.44771 17.5523 3 17 3H11.5C10.9477 3 10.5 3.44772 10.5 4V26ZM12.1 25.4H16.4V4.6H12.1V25.4Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M27.5 10V19.6285L26.6486 19.4739L25.9 18.083V10.6H21.6V18.7572L21.2143 19.4739L20 19.6943V10C20 9.44772 20.4477 9 21 9H26.5C27.0523 9 27.5 9.44771 27.5 10Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M20.7058 28.278C20.4063 28.4222 20.0667 28.1754 20.1113 27.8461L20.5647 24.4978C20.5817 24.372 20.5405 24.2453 20.4528 24.1535L18.118 21.7112C17.8883 21.4709 18.018 21.0717 18.345 21.0124L21.6695 20.4088C21.7944 20.3862 21.9022 20.3078 21.9624 20.1961L23.5637 17.2208C23.7212 16.9281 24.141 16.9281 24.2985 17.2208L25.8998 20.1961C25.8997 20.1959 25.8999 20.1962 25.8998 20.1961C25.96 20.3078 26.0681 20.3862 26.193 20.4089L29.5172 21.0124C29.8442 21.0717 29.9739 21.4709 29.7442 21.7112L27.5 24.0587L27.4097 24.1536C27.322 24.2453 27.2808 24.372 27.2978 24.4979L27.5 25.9909V25.9932L27.7509 27.8461C27.7955 28.1754 27.4559 28.4222 27.1564 28.278L24.1121 26.8121C24.0737 26.7937 24.0332 26.7814 23.992 26.7753C23.9105 26.7634 23.8263 26.7756 23.7504 26.8122L20.7058 28.278Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 27C1.44772 27 1 26.5523 1 26V16C1 15.4477 1.44772 15 2 15H7.5C8.05228 15 8.5 15.4477 8.5 16V26C8.5 26.5523 8.05228 27 7.5 27H2ZM6.9 25.4H2.6V16.6H6.9V25.4Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

4
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -512,6 +512,10 @@
"disable": "alphafine/alphaFine_template_disable.svg",
"white": "alphafine/alphaFine_template_white.svg"
},
"auto_chart": {
"normal": "insert/auto_chart_normal.svg",
"disable": "insert/auto_chart_disabled.svg"
},
"shadow_detect": "shadow/detect.svg",
"shadow_success": "shadow/success.svg",
"shadow_error": "shadow/error.svg",

14
designer-base/src/test/java/com/fr/design/gui/storybook/components/ComboCheckBoxStoryBoard.java

@ -3,12 +3,8 @@ package com.fr.design.gui.storybook.components;
import com.fr.design.gui.icombocheckbox.UIComboCheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.storybook.StoryBoard;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.ArrayUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
@ -32,15 +28,7 @@ public class ComboCheckBoxStoryBoard extends StoryBoard {
}
private UIComboCheckBox getComboCheckBox(Object[] array) {
return new UIComboCheckBox(array, true) {
protected void setLayoutAndAddComponents() {
// 使用BorderLayout,否则默认使用的FlowLayout会让整个下拉选框使用最小Size,然后TableCell这边会出现空白
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = getClickPane();
pane.setOpaque(false);
this.add(pane, BorderLayout.CENTER);
}
};
return new UIComboCheckBox(array, true) {};
}
}

53
designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java

@ -1,9 +1,10 @@
package com.fr.design.chart;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.chart.auto.AutoTypeCalculate;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.dialog.FineJOptionPane;
@ -33,18 +34,23 @@ import javax.swing.UIManager;
import javax.swing.event.ListSelectionListener;
import javax.swing.plaf.SplitPaneUI;
import javax.swing.plaf.basic.BasicSplitPaneUI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CancellationException;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CancellationException;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author Bjorn
@ -93,6 +99,7 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
this.add(splitPane);
}
ListCellRenderer iconCellRenderer = new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
@ -112,26 +119,27 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
}
};
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") + ":"));
tableNameComboBox.setPreferredSize(new Dimension(126, 20));
tableDataPane.add(tableNameComboBox);
JPanel areaNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
panel.add(areaNamePane);
areaNamePane.add(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Field") + ":"));
areaNamePane.add(dataFieldBox);
panel.add(refreshButton);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
return panel;
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(column(
row(10,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data"))),
cell(tableNameComboBox).weight(1),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Field"))),
cell(dataFieldBox).weight(1),
cell(refreshButton),
flex(1)
),
flex()
).with(it -> it.setBorder(new ScaledEmptyBorder(10, 10, 10, 10))).getComponent());
return contentPane;
}
private void initButtonGroup() {
dataFieldBox = new UIComboCheckBox(new Object[0]);
dataFieldBox.getClickPane().setOpaque(false);
dataFieldBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -180,6 +188,7 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
private void initRefreshLabel() {
refreshButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Recommend"));
FineUIStyle.setStyle(refreshButton, FineUIStyle.STYLE_PRIMARY);
refreshButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

4
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -1,6 +1,6 @@
package com.fr.van.chart.designer.type;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.chartattr.Chart;
@ -61,7 +61,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
buttonPane.setLayout(new BorderLayout());
if (ChartTypeManager.AUTO_CHART) {
autoButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Auto_Recommended_Chart"),
BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png")) {
new LazyIcon("auto_chart")) {
@Override
public Dimension getPreferredSize() {
return new Dimension((int) super.getPreferredSize().getWidth(), 25);

4
designer-realize/src/main/java/com/fr/design/actions/insert/cell/AutoChartCellAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.insert.cell;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.chart.chartattr.AutoChartCollection;
import com.fr.common.annotations.Open;
import com.fr.design.actions.core.WorkBookSupportable;
@ -31,7 +31,7 @@ public class AutoChartCellAction extends AbstractCellAction implements WorkBookS
this.setMenuKeySet(INSERT_AUTO_CHART);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png"));
this.setSmallIcon(new LazyIcon("auto_chart"));
}
public static final MenuKeySet INSERT_AUTO_CHART = new MenuKeySet() {

4
designer-realize/src/main/java/com/fr/design/actions/insert/flot/AutoChartFloatAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions.insert.flot;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.gui.chart.MiddleChartDialog;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.ElementCasePane;
@ -28,7 +28,7 @@ public class AutoChartFloatAction extends ChartFloatAction {
this.setMenuKeySet(FLOAT_INSERT_AUTO_CHART);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png"));
this.setSmallIcon(new LazyIcon("auto_chart"));
}
public static final MenuKeySet FLOAT_INSERT_AUTO_CHART = new MenuKeySet() {

20
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

@ -17,16 +17,13 @@ import com.fr.design.gui.icombocheckbox.UIComboCheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.report.cell.desensitization.CellDesensitizationBean;
import com.fr.stable.StringUtils;
import com.fr.third.org.apache.commons.collections4.map.HashedMap;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.FontMetrics;
@ -41,8 +38,8 @@ import java.util.Set;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIStyle.PLAIN_BUTTON;
import static com.fine.theme.utils.FineUIStyle.TRANSPARENT_TEXT_FIELD;
import static com.fine.theme.utils.FineUIStyle.setStyle;
@ -288,21 +285,6 @@ public class DesensitizationCellPane extends BasicBeanPane {
super(DesensitizationCellPane.this.roleMap.values().toArray(), true);
}
@Override
protected void setLayoutAndAddComponents() {
// 使用BorderLayout,否则默认使用的FlowLayout会让整个下拉选框使用最小Size,然后TableCell这边会出现空白
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(getClickPane(), BorderLayout.CENTER);
}
@Override
protected void setEditorToolTipText(JComponent editor, String text) {
// 选项过多时,已选中的值会做省略显示处理,此处添加一个Tooltips,显示完整值
if (text != null) {
editor.setToolTipText(text);
}
}
@Override
protected void setEditorPlaceHolder(UITextField editor) {
editor.setPlaceholder(this.getPlaceHolder());

Loading…
Cancel
Save