diff --git a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java index 920116b2c..e0a2cf441 100644 --- a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -2,18 +2,14 @@ package com.fr.design.mainframe; import com.fr.base.FRContext; import com.fr.design.actions.utils.ReportActionUtils; -import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; -import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.present.CellWriteAttrPane; import com.fr.design.widget.WidgetPane; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.grid.selection.CellSelection; -import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.privilege.finegrain.WidgetPrivilegeControl; import com.fr.report.cell.CellElement; @@ -34,7 +30,7 @@ public class CellWidgetPropertyPane extends BasicPane { private WidgetPane cellEditorDefPane; private ElementCasePane ePane; - public static CellWidgetPropertyPane getInstance(){ + public static CellWidgetPropertyPane getInstance() { if (singleton == null) { singleton = new CellWidgetPropertyPane(); } @@ -43,11 +39,9 @@ public class CellWidgetPropertyPane extends BasicPane { public CellWidgetPropertyPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); -// this.addAttributeChangeListener(listener); -// cellEditorDefPane = new WidgetPane(elementCasePane); } - public void clear (){ + public void clear() { singleton = null; } @@ -86,7 +80,7 @@ public class CellWidgetPropertyPane extends BasicPane { } - public void reInit(ElementCasePane ePane){ + public void reInit(ElementCasePane ePane) { this.ePane = ePane; cellEditorDefPane = new WidgetPane(ePane); this.removeAll(); @@ -144,14 +138,15 @@ public class CellWidgetPropertyPane extends BasicPane { return newWidget; } - @Override /** - *检测是否有效 + * 检测是否有效 + * + * @throws Exception e */ + @Override public void checkValid() throws Exception { this.cellEditorDefPane.checkValid(); } - } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/WidgetPane.java b/designer/src/com/fr/design/widget/WidgetPane.java index 10ebf66a5..593bf2197 100644 --- a/designer/src/com/fr/design/widget/WidgetPane.java +++ b/designer/src/com/fr/design/widget/WidgetPane.java @@ -65,7 +65,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener this.addAttributeChangeListener(listener); } - public JPanel initNorthPane(){ + public JPanel initNorthPane() { UILabel emptyLabel = new UILabel(); emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); @@ -80,7 +80,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener return jPanel; } - protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane){ + protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) { return new CellWidgetCardPane(pane); } @@ -129,30 +129,29 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener editorTypeComboBox.setSelectedIndex(-1); return; } - + // 预定义组件 if (widget instanceof NameWidget) { String name = ((NameWidget) widget).getName(); shouldFireSelectedEvent = false; editorTypeComboBox.setSelectedItem(new Item(name, name)); shouldFireSelectedEvent = true; cellEditorCardPane.populate(widget); - return; } + // 内置组件 + else { + Class clazz = widget.getClass(); + if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) { + clazz = Button.class; + } + cellEditorCardPane.populate(widget); - Class clazz = widget.getClass(); - if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) { - clazz = Button.class; + shouldFireSelectedEvent = false; + editorTypeComboBox.setSelectedItemByWidgetClass(clazz); + shouldFireSelectedEvent = true; } - cellEditorCardPane.populate(widget); - - shouldFireSelectedEvent = false; - editorTypeComboBox.setSelectedItemByWidgetClass(clazz); - shouldFireSelectedEvent = true; - removeAttributeChangeListener(); initAllListeners(); this.addAttributeChangeListener(listener); - } public Widget update() { diff --git a/designer_base/src/com/fr/design/condition/LiteConditionPane.java b/designer_base/src/com/fr/design/condition/LiteConditionPane.java index d6e4a2af4..33f2e30c8 100644 --- a/designer_base/src/com/fr/design/condition/LiteConditionPane.java +++ b/designer_base/src/com/fr/design/condition/LiteConditionPane.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.base.Formula; import com.fr.data.DataConstants; import com.fr.data.condition.*; +import com.fr.data.core.Compare; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.formula.FormulaFactory; @@ -21,6 +22,7 @@ import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.general.data.Condition; +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.event.TreeExpansionEvent; @@ -165,6 +167,9 @@ public abstract class LiteConditionPane extends BasicBeanPa TreePath selectedTreePath = conditionsTree.getSelectionPath(); if (selectedTreePath == null) { + // 清空编辑框 + defaultConditionPane.populateBean((T)new ObjectCondition(new Compare(Compare.EQUALS, StringUtils.EMPTY))); + formulaTextArea.setText(StringUtils.EMPTY); return; } diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 96949d4e5..9828576f5 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2132,4 +2132,7 @@ FR-Designer_Select_Color=Select Color FR-Designer-Basic_Dynamic_Parameter_Injection=Injection FR-Designer_Label= FR-Designer_Widgetname=Widget Name -FR-Designer_Insert_Cell_Element=Insert Cell Element \ No newline at end of file +FR-Designer_Insert_Cell_Element=Insert Cell Element +FR-Designer_Add_Condition=Add Condition +FR-Designer_Use_Params_Template=use parameter template +FR-Designer_Label_Name=label name \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index a28a02936..d46df9ef7 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -2128,4 +2128,7 @@ FR-Designer_Select_Color=Select Color FR-Designer-Basic_Dynamic_Parameter_Injection=Injection FR-Designer_Label=Label FR-Designer_Widgetname=Widget Name -FR-Designer_Insert_Cell_Element=Insert Cell Element \ No newline at end of file +FR-Designer_Insert_Cell_Element=Insert Cell Element +FR-Designer_Add_Condition=Add Condition +FR-Designer_Use_Params_Template=use parameter template +FR-Designer_Label_Name=label name \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 501932da0..fd83fe9f3 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -2123,7 +2123,8 @@ FR-Designer_Mobile-Height-Percent= FR-Designer_Mobile-Height-Limit= FR-Designer-Download_Online_Sources= FR-Designer_Select_Color= -FR-Designer-Basic_Dynamic_Parameter_Injection=\ +FR-Designer-Basic_Dynamic_Parameter_Injection= FR-Designer_Label=\u30E9\u30D9\u30EBa FR-Designer_Widgetname=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D -FR-Designer_Insert_Cell_Element=\ +FR-Designer_Insert_Cell_Element= +FR-Designer_Add_Condition= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 2d9828719..7c5afbdbd 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -2127,4 +2127,5 @@ FR-Designer_Select_Color= FR-Designer-Basic_Dynamic_Parameter_Injection= FR-Designer_Label=\uB808\uC774\uBE14 FR-Designer_Widgetname=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uC774\uB984 -FR-Designer_Insert_Cell_Element=\ \ No newline at end of file +FR-Designer_Insert_Cell_Element= +FR-Designer_Add_Condition= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 518d8d949..8451bb37e 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -2132,3 +2132,4 @@ FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165 FR-Designer_Label=\u6A19\u7C3D FR-Designer_Widgetname=\u63A7\u5236\u9805\u540D FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20 +FR-Designer_Add_Condition= \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index 622dcb5df..37caea168 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -243,6 +243,8 @@ public class ChartDataFilterPane extends ThirdTabPane { preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + //默认不显示 + preDataNumPane.setVisible(false); panel1.add(preDataNumPane, BorderLayout.CENTER); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); panel2.add(notShowNull, BorderLayout.NORTH); @@ -416,6 +418,8 @@ public class ChartDataFilterPane extends ThirdTabPane { preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + //默认不显示 + preDataNumPane.setVisible(false); panel1.add(preDataNumPane, BorderLayout.CENTER); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); panel2.add(notShowNull, BorderLayout.NORTH); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index b5cdb0b74..a4771e1bf 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -19,6 +19,7 @@ import com.fr.design.style.color.ColorControlWindow; import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.StringUtils; import javax.swing.*; @@ -32,11 +33,14 @@ import java.util.List; public class UIColorPickerPane extends BasicPane implements UIObserver { private static final int MARGIN_TOP = 10; + private static final int MARGIN_LEFT = 5; + private static final int COLORGROUP_MARGIN_LEFT = 40; private static final int OFF_HEIGHT = 6; private static final int COLOR_REC_HEIGHT = 40; private static final int COLOR_REC_WIDTH = 30; protected static final int TEXTFIELD_HEIGHT = 20; protected static final int TEXTFIELD_WIDTH = 120; + protected static final int UPCONTROLPANE_WIDTH = 230; private static final int LAYOUR_DET = 6; private static final double VALUE = 100; @@ -182,17 +186,18 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { }; double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + double[] columnSize = {d, e}; double[] rowSize = {p}; Component[][] tmpComp = new Component[][]{new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), regionNumPane}}; - - stagePanel = TableLayoutHelper.createTableLayoutPane(tmpComp, rowSize, columnSize); - + + stagePanel = TableLayout4VanChartHelper.createGapTableLayoutPane(tmpComp, rowSize, columnSize); + Component[][] components = new Component[][]{ new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Tick_And_Color")), designTypeButtonGroup}, }; - upControlPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + upControlPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); this.textGroup = new TextFieldGroupPane(); this.colorGroup = new ColorGroupPane(); @@ -204,7 +209,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { this.textFieldList = this.getTextFieldList(); refreshGroupPane(colors, getValueArray(number)); - + } protected ArrayList getTextFieldList(){ @@ -249,7 +254,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { */ public Dimension getPreferredSize() { if (designTypeButtonGroup.getSelectedIndex() == 0) { - return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height); + return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + MARGIN_TOP); } else { int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP; return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, @@ -503,7 +508,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { * 根据这些 确定每个Field的最大最小值. 并且改变背景颜色. */ public void checkEveryFiledMinMax() { - + double forValue = Double.MAX_VALUE; double backValue = -Double.MAX_VALUE; for(int i = 0, size = textFieldList.size(); i < size; i++) {// check 是否合格, 然后检查 是否改变颜色, @@ -515,9 +520,9 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { backValue = backNumber.doubleValue(); } } - + Number number = ChartBaseUtils.formula2Number(new Formula(getValue4Index(i))); - + if(number != null) { double value = number.doubleValue(); if(value < forValue && value > backValue) { @@ -571,13 +576,13 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { return null; } - @Override - public void layoutContainer(Container parent) { - upControlPane.setBounds(0, 0, parent.getPreferredSize().width, upControlPane.getPreferredSize().height); - stagePanel.setBounds(0,upControlPane.getPreferredSize().height + LAYOUR_DET, parent.getPreferredSize().width, stagePanel.getPreferredSize().height); - colorGroup.setBounds(0, MARGIN_TOP + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); - textGroup.setBounds(colorGroup.getPreferredSize().width, upControlPane.getPreferredSize().height+ stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); - } + @Override + public void layoutContainer(Container parent) { + upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP); + stagePanel.setBounds(MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET + MARGIN_TOP, UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height); + colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); + textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + MARGIN_TOP, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); + } @Override public void addLayoutComponent(String name, Component comp) { @@ -601,12 +606,12 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { return null; } - @Override - public void layoutContainer(Container parent) { - upControlPane.setBounds(0, 0, parent.getPreferredSize().width, upControlPane.getPreferredSize().height); - colorGroup.setBounds(0, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); - textGroup.setBounds(colorGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); - } + @Override + public void layoutContainer(Container parent) { + upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height); + colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); + textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); + } @Override public void addLayoutComponent(String name, Component comp) { @@ -633,7 +638,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { public int getDesignType(){ return this.designTypeButtonGroup.getSelectedIndex(); } - + public void populateBean(MapHotAreaColor hotAreaColor) { Color mainColor = hotAreaColor.getMainColor(); @@ -650,7 +655,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { regionNumPane.populateBean(value); refreshPane(); } - + private void initContainerLister(){ Container container = UIColorPickerPane.this; while (!(container instanceof ChartStylePane)) { @@ -684,7 +689,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { // 检查 数字顺序. private boolean checkInOrder() { textGroup.checkEveryFiledMinMax(); - + boolean allInOrder = true; double maxValue = Double.MAX_VALUE; diff --git a/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java b/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java index 899b283e5..0500e8581 100644 --- a/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java +++ b/designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java @@ -35,7 +35,6 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double[] columnSize = {d, e}; JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize); - panel.setPreferredSize(new Dimension(230, (int)panel.getPreferredSize().getHeight())); return panel; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 05b3d38cd..66aac8864 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -116,7 +116,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue()); adaptComboBox.setSelectedIndex(ob.getCompState()); componentIntervel.setValue(ob.getCompInterval()); - background.setValue(ob.getBackground()); + background.setValue(ob.getBorderStyle()); }