Browse Source

Pull request #2417: REPORT-40613 【二轮回归】数据列右侧属性面板的过滤条件编辑按钮较长

Merge in DESIGN/design from ~YVAN/design:release/10.0 to release/10.0

* commit '92fb4dafae64992d201e08402e73d89e911b8534':
  REPORT-40613 【二轮回归】数据列右侧属性面板的过滤条件编辑按钮较长 【问题原因】编辑按钮比较长是因为前面的过滤条件这个Label的宽度是TableLayout.PREFERRED,而上面那些Label的宽度是定值60,所以显示起来右边的编辑按钮宽度没有与上面的保持一致 【改动思路】将编辑按钮左侧的过滤条件Label的宽度也修改为定值60,另外修改了一些ToolKit的导包问题
feature/big-screen
Yvan 4 years ago
parent
commit
c4b516bd15
  1. 53
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

53
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -22,6 +22,7 @@ import com.fr.design.gui.ilable.MultilineLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -251,15 +252,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
dataPane.setListener(dataListener); dataPane.setListener(dataListener);
groupPane.setListener(groupListener); groupPane.setListener(groupListener);
double[] rowSize = {P}, columnSize = {P, F}; double[] rowSize = {P}, columnSize = {60, F};
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Filter_Conditions")); UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
condition = new DSColumnConditionAction(); condition = new DSColumnConditionAction();
if (tc != null) { if (tc != null) {
condition.setEditingComponent(tc); condition.setEditingComponent(tc);
} }
//丢掉icon,修改按钮名称为编辑 //丢掉icon,修改按钮名称为编辑
condition.setSmallIcon(null); condition.setSmallIcon(null);
condition.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); condition.setName(Toolkit.i18nText("Fine-Design_Basic_Edit"));
conditionUIButton = new UIButton(condition); conditionUIButton = new UIButton(condition);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{uiLabel, UIComponentUtils.wrapWithBorderLayoutPane(conditionUIButton)} new Component[]{uiLabel, UIComponentUtils.wrapWithBorderLayoutPane(conditionUIButton)}
@ -273,12 +274,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
@Override @Override
public String getIconPath() { public String getIconPath() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"); return Toolkit.i18nText("Fine-Design_Report_Basic");
} }
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Basic"); return Toolkit.i18nText("FR-Designer_Basic");
} }
@ -441,12 +442,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
@Override @Override
public String getIconPath() { public String getIconPath() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"); return Toolkit.i18nText("Fine-Design_Report_Advanced");
} }
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"); return Toolkit.i18nText("Fine-Design_Report_Advanced");
} }
@ -570,19 +571,19 @@ public class CellDSColumnEditor extends CellQuickEditor {
//可扩展性 //可扩展性
JPanel extendableDirectionPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); JPanel extendableDirectionPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
extendableDirectionPane.add(heCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Horizontal_Extendable"))); extendableDirectionPane.add(heCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_ExpandD_Horizontal_Extendable")));
extendableDirectionPane.add(veCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Vertical_Extendable"))); extendableDirectionPane.add(veCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_ExpandD_Vertical_Extendable")));
//补充空白数据 //补充空白数据
JPanel multiNumPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); JPanel multiNumPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
useMultiNumCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fill_Blank_Data")); useMultiNumCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fill_Blank_Data"));
JPanel checkBoxPane = new JPanel(new BorderLayout()); JPanel checkBoxPane = new JPanel(new BorderLayout());
checkBoxPane.add(useMultiNumCheckBox, BorderLayout.WEST); checkBoxPane.add(useMultiNumCheckBox, BorderLayout.WEST);
multiNumPane.add(checkBoxPane); multiNumPane.add(checkBoxPane);
multiNumSpinner = new UISpinner(1, 10000, 1, 1); multiNumSpinner = new UISpinner(1, 10000, 1, 1);
//数据倍数 //数据倍数
UILabel multipleLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Multiple")); UILabel multipleLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Column_Multiple"));
multiPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ multiPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{ new Component[]{
multipleLabel, multiNumSpinner multipleLabel, multiNumSpinner
@ -659,17 +660,17 @@ public class CellDSColumnEditor extends CellQuickEditor {
IOUtils.readIcon("/com/fr/design/images/expand/asc.png"), IOUtils.readIcon("/com/fr/design/images/expand/asc.png"),
IOUtils.readIcon("/com/fr/design/images/expand/des.png") IOUtils.readIcon("/com/fr/design/images/expand/des.png")
}; };
String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Original"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Ascending"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Descending")}; String[] nameArray = {Toolkit.i18nText("Fine-Design_Report_Sort_Original"), Toolkit.i18nText("Fine-Design_Report_Sort_Ascending"), Toolkit.i18nText("Fine-Design_Report_Sort_Descending")};
sortTypePane = new UIButtonGroup(iconArray); sortTypePane = new UIButtonGroup(iconArray);
sortTypePane.setAllToolTips(nameArray); sortTypePane.setAllToolTips(nameArray);
sortTypePane.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ExpandD_Sort_After_Expand")); sortTypePane.setGlobalName(Toolkit.i18nText("Fine-Design_Basic_ExpandD_Sort_After_Expand"));
cardLayout = new CardLayout(); cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout); centerPane = new JPanel(cardLayout);
formulaField = new JFormulaField(DEFAULT_VALUE); formulaField = new JFormulaField(DEFAULT_VALUE);
centerPane.add(new JPanel(), "none"); centerPane.add(new JPanel(), "none");
centerPane.add(formulaField, "content"); centerPane.add(formulaField, "content");
UILabel sortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Sort_Order")); UILabel sortLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Sort_Sort_Order"));
sortLabel.setPreferredSize(LABEL_DIMENSION); sortLabel.setPreferredSize(LABEL_DIMENSION);
sortTypePane.addChangeListener(new ChangeListener() { sortTypePane.addChangeListener(new ChangeListener() {
@Override @Override
@ -849,15 +850,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
public ResultSetFilterConfigPane() { public ResultSetFilterConfigPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel filterLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Results_Filter")); UILabel filterLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Bind_Column_Results_Filter"));
//结果集筛选下拉框 //结果集筛选下拉框
rsComboBox = new UIComboBox(new String[]{ rsComboBox = new UIComboBox(new String[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Undefined"), Toolkit.i18nText("Fine-Design_Report_Undefined"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Top_N"), Toolkit.i18nText("Fine-Design_Report_Bind_Column_Top_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Bottom_N"), Toolkit.i18nText("Fine-Design_Report_Bind_Column_Bottom_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Odd"), Toolkit.i18nText("Fine-Design_Report_Odd"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Even"), Toolkit.i18nText("Fine-Design_Report_Even"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Specify") Toolkit.i18nText("Fine-Design_Report_Specify")
}); });
rsComboBox.addActionListener(actionListener); rsComboBox.addActionListener(actionListener);
//配置展示CardLayout //配置展示CardLayout
@ -881,20 +882,20 @@ public class CellDSColumnEditor extends CellQuickEditor {
//奇数 UILabel 占一行作为提示信息 //奇数 UILabel 占一行作为提示信息
setCardPane.add(new JPanel(), ODD.name()); setCardPane.add(new JPanel(), ODD.name());
MultilineLabel oddTip = new MultilineLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_DS_Filter_Odd_Tip")); MultilineLabel oddTip = new MultilineLabel(Toolkit.i18nText("Fine-Design_Report_DS_Filter_Odd_Tip"));
oddTip.setForeground(TIP_FONT_COLOR); oddTip.setForeground(TIP_FONT_COLOR);
tipCardPane.add(oddTip, ODD.name()); tipCardPane.add(oddTip, ODD.name());
//偶数 UILabel 占一行作为提示信息 //偶数 UILabel 占一行作为提示信息
setCardPane.add(new JPanel(), EVEN.name()); setCardPane.add(new JPanel(), EVEN.name());
MultilineLabel evenTip = new MultilineLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_DS_Filter_Even_Tip")); MultilineLabel evenTip = new MultilineLabel(Toolkit.i18nText("Fine-Design_Report_DS_Filter_Even_Tip"));
evenTip.setForeground(TIP_FONT_COLOR); evenTip.setForeground(TIP_FONT_COLOR);
tipCardPane.add(evenTip, EVEN.name()); tipCardPane.add(evenTip, EVEN.name());
//输入框占用右半边,提示信息占一行 //输入框占用右半边,提示信息占一行
serialTextField = new UITextField(16); serialTextField = new UITextField(16);
setCardPane.add(serialTextField, SPECIFY.name()); setCardPane.add(serialTextField, SPECIFY.name());
MultilineLabel specifyTip = new MultilineLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_DS_Filter_Specify_Tip")); MultilineLabel specifyTip = new MultilineLabel(Toolkit.i18nText("Fine-Design_Report_DS_Filter_Specify_Tip"));
specifyTip.setForeground(TIP_FONT_COLOR); specifyTip.setForeground(TIP_FONT_COLOR);
tipCardPane.add(specifyTip, SPECIFY.name()); tipCardPane.add(specifyTip, SPECIFY.name());
contentPane = TableLayoutHelper.createDiffVGapTableLayoutPane(new Component[][]{ contentPane = TableLayoutHelper.createDiffVGapTableLayoutPane(new Component[][]{
@ -1072,7 +1073,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
textFieldPane.add(formulaTextField, BorderLayout.CENTER); textFieldPane.add(formulaTextField, BorderLayout.CENTER);
textFieldPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); textFieldPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png")); UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png"));
formulaButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Formula") + "..."); formulaButton.setToolTipText(Toolkit.i18nText("Fine-Design_Report_Formula") + "...");
formulaButton.setPreferredSize(new Dimension(20, formulaTextField.getPreferredSize().height)); formulaButton.setPreferredSize(new Dimension(20, formulaTextField.getPreferredSize().height));
formulaButton.addActionListener(formulaButtonActionListener); formulaButton.addActionListener(formulaButtonActionListener);
@ -1157,7 +1158,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
public CustomValuePane() { public CustomValuePane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
UILabel customValueLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Display_Value")); UILabel customValueLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Display_Value"));
customValueLabel.setPreferredSize(LABEL_DIMENSION); customValueLabel.setPreferredSize(LABEL_DIMENSION);
formulaField = new JFormulaField(DEFAULT_VALUE); formulaField = new JFormulaField(DEFAULT_VALUE);
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{

Loading…
Cancel
Save