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. 27
      designer/src/com/fr/design/widget/WidgetPane.java
  3. 5
      designer_base/src/com/fr/design/condition/LiteConditionPane.java
  4. 5
      designer_base/src/com/fr/design/locale/designer.properties
  5. 5
      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. 59
      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.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();
}
}

27
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() {

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.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<T extends Condition> 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;
}

5
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
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_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
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-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=

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_Label=\uB808\uC774\uBE14
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_Widgetname=\u63A7\u5236\u9805\u540D
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.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<ChartCollection> {
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);

59
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;

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[] columnSize = {d, e};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize);
panel.setPreferredSize(new Dimension(230, (int)panel.getPreferredSize().getHeight()));
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());
adaptComboBox.setSelectedIndex(ob.getCompState());
componentIntervel.setValue(ob.getCompInterval());
background.setValue(ob.getBackground());
background.setValue(ob.getBorderStyle());
}

Loading…
Cancel
Save