Browse Source

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

【问题原因】编辑按钮比较长是因为前面的过滤条件这个Label的宽度是TableLayout.PREFERRED,而上面那些Label的宽度是定值60,所以显示起来右边的编辑按钮宽度没有与上面的保持一致
【改动思路】将编辑按钮左侧的过滤条件Label的宽度也修改为定值60,另外修改了一些ToolKit的导包问题
feature/big-screen
Yvan 4 years ago
parent
commit
5e4ad9b890
  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.ispinner.UISpinner;
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;
@ -251,15 +252,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
dataPane.setListener(dataListener);
groupPane.setListener(groupListener);
double[] rowSize = {P}, columnSize = {P, F};
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
double[] rowSize = {P}, columnSize = {60, F};
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
condition = new DSColumnConditionAction();
if (tc != null) {
condition.setEditingComponent(tc);
}
//丢掉icon,修改按钮名称为编辑
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);
Component[][] components = new Component[][]{
new Component[]{uiLabel, UIComponentUtils.wrapWithBorderLayoutPane(conditionUIButton)}
@ -273,12 +274,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
@Override
public String getIconPath() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic");
return Toolkit.i18nText("Fine-Design_Report_Basic");
}
@Override
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
public String getIconPath() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced");
return Toolkit.i18nText("Fine-Design_Report_Advanced");
}
@Override
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();
extendableDirectionPane.add(heCheckBox = new UICheckBox(com.fr.design.i18n.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(heCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_ExpandD_Horizontal_Extendable")));
extendableDirectionPane.add(veCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_ExpandD_Vertical_Extendable")));
//补充空白数据
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());
checkBoxPane.add(useMultiNumCheckBox, BorderLayout.WEST);
multiNumPane.add(checkBoxPane);
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[][]{
new Component[]{
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/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.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();
centerPane = new JPanel(cardLayout);
formulaField = new JFormulaField(DEFAULT_VALUE);
centerPane.add(new JPanel(), "none");
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);
sortTypePane.addChangeListener(new ChangeListener() {
@Override
@ -849,15 +850,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
public ResultSetFilterConfigPane() {
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[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Undefined"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Top_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Bottom_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Odd"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Even"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Specify")
Toolkit.i18nText("Fine-Design_Report_Undefined"),
Toolkit.i18nText("Fine-Design_Report_Bind_Column_Top_N"),
Toolkit.i18nText("Fine-Design_Report_Bind_Column_Bottom_N"),
Toolkit.i18nText("Fine-Design_Report_Odd"),
Toolkit.i18nText("Fine-Design_Report_Even"),
Toolkit.i18nText("Fine-Design_Report_Specify")
});
rsComboBox.addActionListener(actionListener);
//配置展示CardLayout
@ -881,20 +882,20 @@ public class CellDSColumnEditor extends CellQuickEditor {
//奇数 UILabel 占一行作为提示信息
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);
tipCardPane.add(oddTip, ODD.name());
//偶数 UILabel 占一行作为提示信息
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);
tipCardPane.add(evenTip, EVEN.name());
//输入框占用右半边,提示信息占一行
serialTextField = new UITextField(16);
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);
tipCardPane.add(specifyTip, SPECIFY.name());
contentPane = TableLayoutHelper.createDiffVGapTableLayoutPane(new Component[][]{
@ -1072,7 +1073,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
textFieldPane.add(formulaTextField, BorderLayout.CENTER);
textFieldPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
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.addActionListener(formulaButtonActionListener);
@ -1157,7 +1158,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
public CustomValuePane() {
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);
formulaField = new JFormulaField(DEFAULT_VALUE);
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{

Loading…
Cancel
Save