|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.fr.design.dscolumn; |
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
|
import com.fr.design.condition.DSColumnLiteConditionPane; |
|
|
|
@ -36,6 +38,9 @@ import java.awt.event.ItemEvent;
|
|
|
|
|
import java.awt.event.ItemListener; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
|
|
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX; |
|
|
|
|
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* SpecifiedGroupAttrDialog |
|
|
|
|
*/ |
|
|
|
@ -86,10 +91,11 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10)); |
|
|
|
|
specifiedComboBox = new UIComboBox(new String[] { |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Condition_Group"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Formula_Group") |
|
|
|
|
}); |
|
|
|
|
specifiedComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); |
|
|
|
|
|
|
|
|
|
specifiedComboBox.addItemListener(new ItemListener() { |
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
@ -101,9 +107,8 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
JPanel northPane = GUICoreUtils.createFlowPane( |
|
|
|
|
new JComponent[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Specified_Grouping") + ":"), |
|
|
|
|
specifiedComboBox}, FlowLayout.LEFT); |
|
|
|
|
JPanel northPane = FineLayoutBuilder.createHorizontalLayout(10, |
|
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Specified_Grouping") + ":"), specifiedComboBox); |
|
|
|
|
this.add(northPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
cardLayout = new CardLayout(); |
|
|
|
@ -124,6 +129,7 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
otherComboBox = new UIComboBox(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG-Discard_All_Others"), |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG_Leave_In_Their_Own_Groups"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG_Put_All_Others_Together")}); |
|
|
|
|
otherComboBox.addItemListener(otherItemListener); |
|
|
|
|
|
|
|
|
|
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OtherGroup_Name") + ":"); |
|
|
|
|
otherTextField = new UITextField(8); |
|
|
|
|
southPane.add(otherComboBox); |
|
|
|
@ -132,9 +138,9 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
// 公式分组
|
|
|
|
|
formulaGroupPane = new FormulaGroupPane(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
centerCardPane.add("Condition", conditionsGroupPane); |
|
|
|
|
centerCardPane.add("Formula", formulaGroupPane); |
|
|
|
|
centerCardPane.add("Formula", FineUIUtils.wrapComponentWithTitle(formulaGroupPane, |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_D_Dispaly_Divide_Result_Set_into_Groups"))); |
|
|
|
|
this.add(centerCardPane, BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -310,7 +316,6 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
private JPanel southPane; |
|
|
|
|
|
|
|
|
|
public FormulaGroupPane() { |
|
|
|
|
this.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_D_Dispaly_Divide_Result_Set_into_Groups"))); |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); |
|
|
|
|
JPanel contentPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
|
this.add(contentPane, BorderLayout.NORTH); |
|
|
|
@ -319,9 +324,9 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
northPane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
contentPane.add(northPane); |
|
|
|
|
modeComboBox = new UIComboBox(displayModeNames); |
|
|
|
|
|
|
|
|
|
northPane.add(GUICoreUtils.createFlowPane(new JComponent[] { new UILabel(InsertText), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Display_Modes") + ": "), |
|
|
|
|
modeComboBox }, FlowLayout.LEFT), BorderLayout.WEST); |
|
|
|
|
modeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); |
|
|
|
|
northPane.add(FineLayoutBuilder.createHorizontalLayout(10, |
|
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Display_Modes") + ":"), modeComboBox)); |
|
|
|
|
|
|
|
|
|
UILabel label = new UILabel("="); |
|
|
|
|
label.setFont(new Font("Dialog", Font.BOLD, 12)); |
|
|
|
@ -330,7 +335,6 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
UIButton formulaButton = new UIButton("..."); |
|
|
|
|
formulaButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula") + "..."); |
|
|
|
|
formulaButton.setPreferredSize(new Dimension(25, valueField.getPreferredSize().height)); |
|
|
|
|
formulaButton.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
BaseFormula valueFormula = BaseFormula.createFormulaBuilder().build(); |
|
|
|
@ -358,8 +362,8 @@ public class SpecifiedGroupAttrPane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
southPane = GUICoreUtils.createFlowPane(new JComponent[] {new UILabel(InsertText), //new UILabel(com.fr.design.i18n.Toolkit.i18nText("I-Message_FunctionGrouper_2")),
|
|
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Custom_Value") + ": "), label, valueField, formulaButton}, FlowLayout.LEFT); |
|
|
|
|
southPane = FineLayoutBuilder.createHorizontalLayout(10, |
|
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Custom_Value") + ": "), label, valueField, formulaButton); |
|
|
|
|
contentPane.add(southPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|