Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~kerry/design into release/9.0

master
kerry 7 years ago
parent
commit
d072fea5c5
  1. 19
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  2. 13
      designer/src/com/fr/design/widget/WidgetPane.java
  3. 5
      designer_base/src/com/fr/design/condition/LiteConditionPane.java
  4. 3
      designer_base/src/com/fr/design/locale/designer.properties
  5. 3
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  6. 5
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  7. 3
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  8. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  9. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  10. 29
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  11. 1
      designer_chart/src/com/fr/plugin/chart/range/component/SectionIntervalConfigPaneWithOutNum.java
  12. 2
      designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

19
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.base.FRContext;
import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.present.CellWriteAttrPane;
import com.fr.design.widget.WidgetPane; import com.fr.design.widget.WidgetPane;
import com.fr.form.ui.NoneWidget; import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
import com.fr.privilege.finegrain.WidgetPrivilegeControl; import com.fr.privilege.finegrain.WidgetPrivilegeControl;
import com.fr.report.cell.CellElement; import com.fr.report.cell.CellElement;
@ -34,7 +30,7 @@ public class CellWidgetPropertyPane extends BasicPane {
private WidgetPane cellEditorDefPane; private WidgetPane cellEditorDefPane;
private ElementCasePane ePane; private ElementCasePane ePane;
public static CellWidgetPropertyPane getInstance(){ public static CellWidgetPropertyPane getInstance() {
if (singleton == null) { if (singleton == null) {
singleton = new CellWidgetPropertyPane(); singleton = new CellWidgetPropertyPane();
} }
@ -43,11 +39,9 @@ public class CellWidgetPropertyPane extends BasicPane {
public CellWidgetPropertyPane() { public CellWidgetPropertyPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
// this.addAttributeChangeListener(listener);
// cellEditorDefPane = new WidgetPane(elementCasePane);
} }
public void clear (){ public void clear() {
singleton = null; singleton = null;
} }
@ -86,7 +80,7 @@ public class CellWidgetPropertyPane extends BasicPane {
} }
public void reInit(ElementCasePane ePane){ public void reInit(ElementCasePane ePane) {
this.ePane = ePane; this.ePane = ePane;
cellEditorDefPane = new WidgetPane(ePane); cellEditorDefPane = new WidgetPane(ePane);
this.removeAll(); this.removeAll();
@ -144,14 +138,15 @@ public class CellWidgetPropertyPane extends BasicPane {
return newWidget; return newWidget;
} }
@Override
/** /**
*检测是否有效 * 检测是否有效
*
* @throws Exception e
*/ */
@Override
public void checkValid() throws Exception { public void checkValid() throws Exception {
this.cellEditorDefPane.checkValid(); this.cellEditorDefPane.checkValid();
} }
} }

13
designer/src/com/fr/design/widget/WidgetPane.java

@ -65,7 +65,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.addAttributeChangeListener(listener); this.addAttributeChangeListener(listener);
} }
public JPanel initNorthPane(){ public JPanel initNorthPane() {
UILabel emptyLabel = new UILabel(); UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
@ -80,7 +80,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
return jPanel; return jPanel;
} }
protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane){ protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) {
return new CellWidgetCardPane(pane); return new CellWidgetCardPane(pane);
} }
@ -129,16 +129,16 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
editorTypeComboBox.setSelectedIndex(-1); editorTypeComboBox.setSelectedIndex(-1);
return; return;
} }
// 预定义组件
if (widget instanceof NameWidget) { if (widget instanceof NameWidget) {
String name = ((NameWidget) widget).getName(); String name = ((NameWidget) widget).getName();
shouldFireSelectedEvent = false; shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItem(new Item(name, name)); editorTypeComboBox.setSelectedItem(new Item(name, name));
shouldFireSelectedEvent = true; shouldFireSelectedEvent = true;
cellEditorCardPane.populate(widget); cellEditorCardPane.populate(widget);
return;
} }
// 内置组件
else {
Class clazz = widget.getClass(); Class clazz = widget.getClass();
if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) { if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) {
clazz = Button.class; clazz = Button.class;
@ -148,11 +148,10 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
shouldFireSelectedEvent = false; shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItemByWidgetClass(clazz); editorTypeComboBox.setSelectedItemByWidgetClass(clazz);
shouldFireSelectedEvent = true; shouldFireSelectedEvent = true;
}
removeAttributeChangeListener(); removeAttributeChangeListener();
initAllListeners(); initAllListeners();
this.addAttributeChangeListener(listener); this.addAttributeChangeListener(listener);
} }
public Widget update() { public Widget update() {

5
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.base.Formula;
import com.fr.data.DataConstants; import com.fr.data.DataConstants;
import com.fr.data.condition.*; import com.fr.data.condition.*;
import com.fr.data.core.Compare;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.formula.FormulaFactory; import com.fr.design.formula.FormulaFactory;
@ -21,6 +22,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.data.Condition; import com.fr.general.data.Condition;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.TreeExpansionEvent; import javax.swing.event.TreeExpansionEvent;
@ -165,6 +167,9 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
TreePath selectedTreePath = conditionsTree.getSelectionPath(); TreePath selectedTreePath = conditionsTree.getSelectionPath();
if (selectedTreePath == null) { if (selectedTreePath == null) {
// 清空编辑框
defaultConditionPane.populateBean((T)new ObjectCondition(new Compare(Compare.EQUALS, StringUtils.EMPTY)));
formulaTextArea.setText(StringUtils.EMPTY);
return; return;
} }

3
designer_base/src/com/fr/design/locale/designer.properties

@ -2133,3 +2133,6 @@ FR-Designer-Basic_Dynamic_Parameter_Injection=Injection
FR-Designer_Label= FR-Designer_Label=
FR-Designer_Widgetname=Widget Name FR-Designer_Widgetname=Widget Name
FR-Designer_Insert_Cell_Element=Insert Cell Element 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

3
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2129,3 +2129,6 @@ FR-Designer-Basic_Dynamic_Parameter_Injection=Injection
FR-Designer_Label=Label FR-Designer_Label=Label
FR-Designer_Widgetname=Widget Name FR-Designer_Widgetname=Widget Name
FR-Designer_Insert_Cell_Element=Insert Cell Element 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

5
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_Mobile-Height-Limit=
FR-Designer-Download_Online_Sources= FR-Designer-Download_Online_Sources=
FR-Designer_Select_Color= FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\ FR-Designer-Basic_Dynamic_Parameter_Injection=
FR-Designer_Label=\u30E9\u30D9\u30EBa FR-Designer_Label=\u30E9\u30D9\u30EBa
FR-Designer_Widgetname=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D FR-Designer_Widgetname=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D
FR-Designer_Insert_Cell_Element=\ FR-Designer_Insert_Cell_Element=
FR-Designer_Add_Condition=

3
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-Basic_Dynamic_Parameter_Injection=
FR-Designer_Label=\uB808\uC774\uBE14 FR-Designer_Label=\uB808\uC774\uBE14
FR-Designer_Widgetname=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uC774\uB984 FR-Designer_Widgetname=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uC774\uB984
FR-Designer_Insert_Cell_Element=\ FR-Designer_Insert_Cell_Element=
FR-Designer_Add_Condition=

1
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_Label=\u6A19\u7C3D
FR-Designer_Widgetname=\u63A7\u5236\u9805\u540D FR-Designer_Widgetname=\u63A7\u5236\u9805\u540D
FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20 FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20
FR-Designer_Add_Condition=

4
designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -243,6 +243,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
//默认不显示
preDataNumPane.setVisible(false);
panel1.add(preDataNumPane, BorderLayout.CENTER); panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate"));
panel2.add(notShowNull, BorderLayout.NORTH); panel2.add(notShowNull, BorderLayout.NORTH);
@ -416,6 +418,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
//默认不显示
preDataNumPane.setVisible(false);
panel1.add(preDataNumPane, BorderLayout.CENTER); panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries"));
panel2.add(notShowNull, BorderLayout.NORTH); panel2.add(notShowNull, BorderLayout.NORTH);

29
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.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -32,11 +33,14 @@ import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver { public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10; 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 OFF_HEIGHT = 6;
private static final int COLOR_REC_HEIGHT = 40; private static final int COLOR_REC_HEIGHT = 40;
private static final int COLOR_REC_WIDTH = 30; private static final int COLOR_REC_WIDTH = 30;
protected static final int TEXTFIELD_HEIGHT = 20; protected static final int TEXTFIELD_HEIGHT = 20;
protected static final int TEXTFIELD_WIDTH = 120; protected static final int TEXTFIELD_WIDTH = 120;
protected static final int UPCONTROLPANE_WIDTH = 230;
private static final int LAYOUR_DET = 6; private static final int LAYOUR_DET = 6;
private static final double VALUE = 100; private static final double VALUE = 100;
@ -182,17 +186,18 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
}; };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {p, f}; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] columnSize = {d, e};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] tmpComp = new Component[][]{new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), regionNumPane}}; 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[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Tick_And_Color")), designTypeButtonGroup}, 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.textGroup = new TextFieldGroupPane();
this.colorGroup = new ColorGroupPane(); this.colorGroup = new ColorGroupPane();
@ -249,7 +254,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
*/ */
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
if (designTypeButtonGroup.getSelectedIndex() == 0) { 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 { } else {
int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP; int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP;
return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width,
@ -573,10 +578,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
upControlPane.setBounds(0, 0, parent.getPreferredSize().width, upControlPane.getPreferredSize().height); upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP);
stagePanel.setBounds(0,upControlPane.getPreferredSize().height + LAYOUR_DET, parent.getPreferredSize().width, stagePanel.getPreferredSize().height); stagePanel.setBounds(MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET + MARGIN_TOP, UPCONTROLPANE_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); 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, upControlPane.getPreferredSize().height+ stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.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 @Override
@ -603,9 +608,9 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
upControlPane.setBounds(0, 0, parent.getPreferredSize().width, upControlPane.getPreferredSize().height); upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height);
colorGroup.setBounds(0, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + 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, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
} }
@Override @Override

1
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 d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] columnSize = {d, e}; double[] columnSize = {d, e};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize);
panel.setPreferredSize(new Dimension(230, (int)panel.getPreferredSize().getHeight()));
return panel; return panel;
} }

2
designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -116,7 +116,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue()); layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue());
adaptComboBox.setSelectedIndex(ob.getCompState()); adaptComboBox.setSelectedIndex(ob.getCompState());
componentIntervel.setValue(ob.getCompInterval()); componentIntervel.setValue(ob.getCompInterval());
background.setValue(ob.getBackground()); background.setValue(ob.getBorderStyle());
} }

Loading…
Cancel
Save