Browse Source

Merge remote-tracking branch 'origin/release/9.0' into release/9.0

master
mengao 7 years ago
parent
commit
19494c7351
  1. 2
      designer/src/com/fr/design/actions/file/export/AbstractExportAction.java
  2. 15
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  3. 23
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  4. 27
      designer/src/com/fr/design/present/BarCodePane.java
  5. 13
      designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
  6. 12
      designer/src/com/fr/design/present/CurrencyLinePane.java
  7. 20
      designer/src/com/fr/design/widget/ValueWidgetPane.java
  8. 24
      designer/src/com/fr/design/widget/WidgetPane.java
  9. 2
      designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  10. 1
      designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java
  11. 13
      designer/src/com/fr/poly/PolyDesigner.java
  12. 46
      designer_base/src/com/fr/design/constants/LayoutConstants.java
  13. 3
      designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java
  14. 6
      designer_base/src/com/fr/design/foldablepane/HeaderPane.java
  15. 4
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  16. 2
      designer_base/src/com/fr/design/gui/ibutton/UIButton.java
  17. 7
      designer_base/src/com/fr/design/gui/style/FRFontPane.java
  18. 9
      designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java
  19. 1
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  20. 7
      designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java
  21. 11
      designer_base/src/com/fr/design/present/dict/DictionaryPane.java
  22. 4
      designer_base/src/com/fr/design/preview/WriteEnhancePreview.java
  23. 1
      designer_base/src/com/fr/design/style/AbstractSelectBox.java
  24. 82
      designer_base/src/com/fr/file/FILEChooserPane.java
  25. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  26. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java
  27. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundNameObjectCreator.java
  28. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java
  29. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java
  30. 2
      designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java
  31. 22
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java
  32. 2
      designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java

2
designer/src/com/fr/design/actions/file/export/AbstractExportAction.java

@ -72,7 +72,7 @@ public abstract class AbstractExportAction extends JWorkBookAction {
} }
// Choose a file name.... // Choose a file name....
FILEChooserPane fileChooserPane = FILEChooserPane.getInstance(false, true); FILEChooserPane fileChooserPane = FILEChooserPane.getInstance(true, true);
fileChooserPane.setFILEFilter(this.getChooseFileFilter()); fileChooserPane.setFILEFilter(this.getChooseFileFilter());
// 打开文件后输出文件名修改,eg:w.cpt.doc / w.svg.doc,去掉中间的后缀名~~ w.doc // 打开文件后输出文件名修改,eg:w.cpt.doc / w.svg.doc,去掉中间的后缀名~~ w.doc

15
designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe; 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.dialog.BasicDialog; 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.dialog.DialogActionAdapter;
@ -15,6 +16,7 @@ import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection; 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.DefaultTemplateCellElement; import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
@ -30,6 +32,7 @@ public class CellWidgetPropertyPane extends BasicPane {
private TemplateCellElement cellElement; private TemplateCellElement cellElement;
private WidgetPane cellEditorDefPane; private WidgetPane cellEditorDefPane;
private ElementCasePane ePane;
public static CellWidgetPropertyPane getInstance(){ public static CellWidgetPropertyPane getInstance(){
if (singleton == null) { if (singleton == null) {
@ -84,6 +87,7 @@ public class CellWidgetPropertyPane extends BasicPane {
public void reInit(ElementCasePane ePane){ public void reInit(ElementCasePane ePane){
this.ePane = ePane;
cellEditorDefPane = new WidgetPane(ePane); cellEditorDefPane = new WidgetPane(ePane);
this.removeAll(); this.removeAll();
this.add(cellEditorDefPane, BorderLayout.CENTER); this.add(cellEditorDefPane, BorderLayout.CENTER);
@ -108,9 +112,13 @@ public class CellWidgetPropertyPane extends BasicPane {
if (cellElement == null) {// 利用默认的CellElement. if (cellElement == null) {// 利用默认的CellElement.
return; return;
} }
final CellSelection finalCS = (CellSelection) ePane.getSelection();
Widget cellWidget = this.cellEditorDefPane.update(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
Widget cellWidget = cellEditorDefPane.update();
// p:最后把这个cellEditorDef设置到CellGUIAttr. // p:最后把这个cellEditorDef设置到CellGUIAttr.
TemplateCellElement cellElement = (TemplateCellElement) editCellElement;
if (cellWidget instanceof NoneWidget) { if (cellWidget instanceof NoneWidget) {
cellElement.setWidget(null); cellElement.setWidget(null);
} else { } else {
@ -119,7 +127,8 @@ public class CellWidgetPropertyPane extends BasicPane {
} }
cellElement.setWidget(cellWidget); cellElement.setWidget(cellWidget);
} }
}
});
} }

23
designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -39,6 +40,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private static final int HEAD_WDITH = 290; private static final int HEAD_WDITH = 290;
private static final int HEAD_HEIGTH = 24; private static final int HEAD_HEIGTH = 24;
private static final Dimension NORMAL_DIMENSION = new Dimension(155, 20);
private static final Dimension SMALL_DIMENSION = new Dimension(150, 20);
// normal // normal
private UIButtonGroup autoshrik; private UIButtonGroup autoshrik;
@ -138,7 +141,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_InsertRow_Policy"), SwingConstants.LEFT), insertRowPolicy}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_InsertRow_Policy"), SwingConstants.LEFT), insertRowPolicy},
new Component[]{null, insertRowPane}, new Component[]{null, insertRowPane},
}; };
southContentPane = TableLayoutHelper.createGapTableLayoutPane(components1, rowSize1, columnSize1, rowCount1, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); southContentPane = TableLayoutHelper.createGapTableLayoutPane(components1, rowSize1, columnSize1, rowCount1, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
JPanel seniorPane = new JPanel(new BorderLayout()); JPanel seniorPane = new JPanel(new BorderLayout());
seniorPane.add(seniorUpPane(), BorderLayout.NORTH); seniorPane.add(seniorUpPane(), BorderLayout.NORTH);
seniorPane.add(southContentPane, BorderLayout.CENTER); seniorPane.add(southContentPane, BorderLayout.CENTER);
@ -167,15 +170,25 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
double[] downRowSize = {p, p, p, p, p, p}; double[] downRowSize = {p, p, p, p, p, p};
double[] downColumnSize = {p, f}; double[] downColumnSize = {p, f};
int[][] downRowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; int[][] downRowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel showContentPane = new JPanel(FRGUIPaneFactory.createRightZeroLayout());
showContent.setPreferredSize(SMALL_DIMENSION);
showContentPane.add(showContent);
fileNamePane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
JPanel tooltipTextFieldPane = new JPanel(FRGUIPaneFactory.createRightZeroLayout());
tooltipTextField.setPreferredSize(NORMAL_DIMENSION);
tooltipTextFieldPane.add(tooltipTextField);
Component[][] downComponent = new Component[][]{ Component[][] downComponent = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content"), SwingConstants.LEFT), showContent}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content"), SwingConstants.LEFT), showContentPane},
new Component[]{null, fileNamePane}, new Component[]{fileNamePane, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip"), SwingConstants.RIGHT), tooltipTextField}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip"), SwingConstants.LEFT), tooltipTextFieldPane},
new Component[]{null, null}, new Component[]{null, null},
new Component[]{null, null}, new Component[]{null, null},
}; };
JPanel downPane = TableLayoutHelper.createGapTableLayoutPane(downComponent, downRowSize, downColumnSize, downRowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); JPanel downPane = TableLayoutHelper.createGapTableLayoutPane(downComponent, downRowSize, downColumnSize, downRowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
JPanel pane = new JPanel(new BorderLayout()); JPanel pane = new JPanel(new BorderLayout());
pane.add(upPane, BorderLayout.NORTH); pane.add(upPane, BorderLayout.NORTH);
pane.add(downPane, BorderLayout.CENTER); pane.add(downPane, BorderLayout.CENTER);

27
designer/src/com/fr/design/present/BarCodePane.java

@ -60,17 +60,6 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
addlistener(); addlistener();
} }
public static void main(String[] args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
content.add(new BarCodePane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(270, 400);
jf.setVisible(true);
}
private void initComponents() { private void initComponents() {
barCodePreviewPane = new BarCodePreviewPane(); barCodePreviewPane = new BarCodePreviewPane();
this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0));
@ -86,7 +75,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1));
RCodeVersionComboBox = new UIComboBox(); RCodeVersionComboBox = new UIComboBox();
RCodeErrorCorrectComboBox = new UIComboBox(); RCodeErrorCorrectComboBox = new UIComboBox();
typeSetLabel = new UILabel(Inter.getLocText("Type_Set"), UILabel.LEFT); typeSetLabel = new UILabel(Inter.getLocText("FR-Designer_Type_Set"), UILabel.LEFT);
initVersionComboBox(); initVersionComboBox();
initErrorCorrectComboBox(); initErrorCorrectComboBox();
@ -106,7 +95,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
new Component[]{borderPane, null}, new Component[]{borderPane, null},
new Component[]{centerPane, null} new Component[]{centerPane, null}
}; };
JPanel barCode = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); JPanel barCode = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE);
centerPane.add(getNormalPane(), "normal"); centerPane.add(getNormalPane(), "normal");
centerPane.add(getSpecialPane(), "special"); centerPane.add(getSpecialPane(), "special");
typeComboBox.addItemListener(new ItemListener() { typeComboBox.addItemListener(new ItemListener() {
@ -150,9 +139,9 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
double[] rowSize = {p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p};
double[] columnSize = {p, f, f}; double[] columnSize = {p, f, f};
int[][] rowCount = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] rowCount = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}};
JPanel barWidthContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); JPanel barWidthContainer = new JPanel(new BorderLayout());
barWidthContainer.add(barWidthSpinner); barWidthContainer.add(barWidthSpinner);
JPanel barHeightContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); JPanel barHeightContainer = new JPanel(new BorderLayout());
barHeightContainer.add(barHeightSpinner); barHeightContainer.add(barHeightSpinner);
UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), UILabel.RIGHT); UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), UILabel.RIGHT);
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); uiLabel.setPreferredSize(typeSetLabel.getPreferredSize());
@ -172,9 +161,9 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
private JPanel getSpecialPane() { private JPanel getSpecialPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, p}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion"), UILabel.LEFT); UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion"), UILabel.LEFT);
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); uiLabel.setPreferredSize(typeSetLabel.getPreferredSize());
RCodeVersionComboBox.setPreferredSize(new Dimension(155,20)); RCodeVersionComboBox.setPreferredSize(new Dimension(155,20));
@ -186,7 +175,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix"), UILabel.LEFT), RCodesizespinner} new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix"), UILabel.LEFT), RCodesizespinner}
}; };
JPanel specialPane = TableLayoutHelper.createGapTableLayoutPane(components_special, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); JPanel specialPane = TableLayoutHelper.createGapTableLayoutPane(components_special, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE);
return specialPane; return specialPane;
} }

13
designer/src/com/fr/design/present/ConditionAttributesGroupPane.java

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -15,6 +16,7 @@ import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
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.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.highlight.DefaultHighlight; import com.fr.report.cell.cellattr.highlight.DefaultHighlight;
@ -27,6 +29,7 @@ import com.fr.stable.Nameable;
public class ConditionAttributesGroupPane extends UIListControlPane { public class ConditionAttributesGroupPane extends UIListControlPane {
private static ConditionAttributesGroupPane singleton; private static ConditionAttributesGroupPane singleton;
private TemplateCellElement editCellElement; // 当前单元格对象 private TemplateCellElement editCellElement; // 当前单元格对象
private ElementCasePane ePane;
private ConditionAttributesGroupPane() { private ConditionAttributesGroupPane() {
super(); super();
@ -49,7 +52,14 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
if (isPopulating) { if (isPopulating) {
return; return;
} }
editCellElement.setHighlightGroup(updateHighlightGroup()); final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup());
}
});
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
} }
@ -64,6 +74,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
} }
public void populate(ElementCasePane ePane) { public void populate(ElementCasePane ePane) {
this.ePane = ePane;
CellSelection cs = (CellSelection) ePane.getSelection(); CellSelection cs = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow());

12
designer/src/com/fr/design/present/CurrencyLinePane.java

@ -2,6 +2,7 @@ package com.fr.design.present;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
@ -31,6 +32,7 @@ import java.awt.*;
public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent> { public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent> {
private static final int VS_NUM = 4; private static final int VS_NUM = 4;
private static final int VG_NUM = 6; private static final int VG_NUM = 6;
private static final Dimension NORMAL_DIMENSION = new Dimension(155, 20);
private UIBasicSpinner intPartSpinner; private UIBasicSpinner intPartSpinner;
private UIBasicSpinner deciPartSpinner; private UIBasicSpinner deciPartSpinner;
private UITextField textField; private UITextField textField;
@ -72,11 +74,11 @@ public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent>
protected void initComponents() { protected void initComponents() {
// 整数位选择 // 整数位选择
intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1)); intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1));
intPartSpinner.setPreferredSize(new Dimension(158, 20)); intPartSpinner.setPreferredSize(NORMAL_DIMENSION);
// 小数位选择 // 小数位选择
deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1)); deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1));
deciPartSpinner.setPreferredSize(new Dimension(158, 20)); deciPartSpinner.setPreferredSize(NORMAL_DIMENSION);
// 预览区域 // 预览区域
textField = new UITextField(10); textField = new UITextField(10);
@ -95,7 +97,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent>
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p}; double[] rowSize = {p, p, p, p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField}, new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField},
@ -105,7 +107,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent>
}; };
JPanel linePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel linePane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(linePane, BorderLayout.CENTER); this.add(linePane, BorderLayout.CENTER);
@ -186,7 +188,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent>
protected static JPanel groupPane(JComponent comp) { protected static JPanel groupPane(JComponent comp) {
JPanel jp = new JPanel(); JPanel jp = new JPanel();
jp.setBorder(null); jp.setBorder(null);
jp.setLayout(new FlowLayout(FlowLayout.LEFT)); jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
jp.add(comp); jp.add(comp);
return jp; return jp;
} }

20
designer/src/com/fr/design/widget/ValueWidgetPane.java

@ -1,9 +1,11 @@
package com.fr.design.widget; package com.fr.design.widget;
import javax.swing.JPanel; import javax.swing.*;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.widget.editors.WidgetValueEditor; import com.fr.design.mainframe.widget.editors.WidgetValueEditor;
import com.fr.form.ui.DataControl; import com.fr.form.ui.DataControl;
@ -11,6 +13,8 @@ import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetValue; import com.fr.form.ui.WidgetValue;
import com.fr.general.Inter; import com.fr.general.Inter;
import java.awt.*;
public class ValueWidgetPane extends WidgetPane { public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane; private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor; private WidgetValueEditor widgetValueEditor;
@ -19,13 +23,23 @@ public class ValueWidgetPane extends WidgetPane {
@Override @Override
protected void initComponents(ElementCasePane pane) { protected void initComponents(ElementCasePane pane) {
super.initComponents(pane); super.initComponents(pane);
}
public JPanel initNorthPane(){
JPanel northPane = super.initNorthPane();
label = new UILabel(" " + Inter.getLocText(new String[]{"Widget", "Value"})+ ":"); label = new UILabel(" " + Inter.getLocText(new String[]{"Widget", "Value"})+ ":");
northPane.add(label);
label.setVisible(false); label.setVisible(false);
widgetValuePane = new JPanel(); widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout()); widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
northPane.add(widgetValuePane); double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{northPane, label,widgetValuePane},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
} }
@Override @Override

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

@ -35,7 +35,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
private EditorTypeComboBox editorTypeComboBox; private EditorTypeComboBox editorTypeComboBox;
private CellWidgetCardPane cellEditorCardPane; private CellWidgetCardPane cellEditorCardPane;
private boolean shouldFireSelectedEvent = true; private boolean shouldFireSelectedEvent = true;
protected JPanel northPane; private JPanel northPane;
public WidgetPane() { public WidgetPane() {
this(null); this(null);
@ -55,7 +55,18 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
editorTypeComboBox = new EditorTypeComboBox(pane != null); editorTypeComboBox = new EditorTypeComboBox(pane != null);
editorTypeComboBox.setPreferredSize(new Dimension(155, 30)); editorTypeComboBox.setPreferredSize(new Dimension(155, 30));
editorTypeComboBox.setMaximumRowCount(16); editorTypeComboBox.setMaximumRowCount(16);
northPane = initNorthPane();
northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15));
this.add(northPane, BorderLayout.NORTH);
editorTypeComboBox.addItemListener(this);
cellEditorCardPane = new CellWidgetCardPane(pane);
this.add(cellEditorCardPane, BorderLayout.CENTER);
this.addAttributeChangeListener(listener);
}
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));
@ -66,15 +77,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText(new String[]{"FR-Designer_Selection", "FR-Designer_Widget"})), emptyLabel, editorTypeComboBox}, new Component[]{new UILabel(Inter.getLocText(new String[]{"FR-Designer_Selection", "FR-Designer_Widget"})), emptyLabel, editorTypeComboBox},
}; };
northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15)); return jPanel;
this.add(northPane, BorderLayout.NORTH);
editorTypeComboBox.addItemListener(this);
cellEditorCardPane = new CellWidgetCardPane(pane);
this.add(cellEditorCardPane, BorderLayout.CENTER);
this.addAttributeChangeListener(listener);
} }
protected JPanel createContentPane() { protected JPanel createContentPane() {

2
designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -22,7 +22,7 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
public BasicWidgetPropertySettingPane() { public BasicWidgetPropertySettingPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
enableCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Visible"), true); enableCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Enabled"), true);
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
visibleCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Widget-Visible"), true); visibleCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Widget-Visible"), true);
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));

1
designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -129,7 +129,6 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
currentSamplelabel = timeSampleLabel; currentSamplelabel = timeSampleLabel;
} }
refreshPreviewLabel(); refreshPreviewLabel();
CellWidgetPropertyPane.getInstance().update();
} }
}; };
fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH); fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH);

13
designer/src/com/fr/poly/PolyDesigner.java

@ -738,7 +738,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
* @return 工具 * @return 工具
*/ */
public ToolBarDef[] toolbars4Target() { public ToolBarDef[] toolbars4Target() {
return selection == null || isChooseBlock() ? null : this.selection.toolbars4Target(); return selection == null || isChooseBlock() || isChooseChartInner() ? null : this.selection.toolbars4Target();
} }
/** /**
@ -753,7 +753,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
} }
if (selection == null || isChooseBlock()) { if (selection == null || isChooseBlock() || isChooseChartInner()) {
setToolBarElemEnabled(selection != null); setToolBarElemEnabled(selection != null);
return toolBarComponent; return toolBarComponent;
} else { } else {
@ -909,6 +909,15 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
return selectedtype == SelectionType.BLOCK; return selectedtype == SelectionType.BLOCK;
} }
/**
* 是否选中图表聚合块内部
*
* @return 是则返回true
*/
public boolean isChooseChartInner() {
return selectedtype == SelectionType.CHART_INNER;
}
/** /**
* Fire gridSelection Changed * Fire gridSelection Changed
*/ */

46
designer_base/src/com/fr/design/constants/LayoutConstants.java

@ -1 +1,45 @@
package com.fr.design.constants; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 12-12-27 * Time: 下午2:28 * 所有的间隙常数都从这里取,注意写上PMD检测规则来检查 */ public class LayoutConstants { private LayoutConstants() { } /** * 水平间隙 */ public static final int HGAP_SMALL = 1; /** * 水平间隙 */ public static final int HGAP_LARGE = 4; /** * 垂直间隙 */ public static final int VGAP_SMALL = 4; /** * 垂直间隙 */ public static final int VGAP_MEDIUM = 6; /** * 垂直间隙 */ public static final int VGAP_LARGE = 10; /** * 图表属性表中二级菜单距离右边框的距离 */ public static final int CHART_ATTR_TOMARGIN = 46; } package com.fr.design.constants;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 7.0.3
* Date: 12-12-27
* Time: 下午2:28
* 所有的间隙常数都从这里取注意写上PMD检测规则来检查
*/
public class LayoutConstants {
private LayoutConstants() {
}
/**
* 水平间隙
*/
public static final int HGAP_SMALL = 1;
/**
* 水平间隙
*/
public static final int HGAP_LARGE = 4;
/**
* 垂直间隙
*/
public static final int VGAP_SMALL = 4;
/**
* 垂直间隙
*/
public static final int VGAP_MEDIUM = 6;
/**
* 垂直间隙
*/
public static final int VGAP_LARGE = 10;
/**
* 垂直间隙
*/
public static final int VGAP_HUGER = 20;
/**
* 图表属性表中二级菜单距离右边框的距离
*/
public static final int CHART_ATTR_TOMARGIN = 46;
}

3
designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java

@ -31,6 +31,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
JPanel rs = new JPanel(new BorderLayout(0, 0)); JPanel rs = new JPanel(new BorderLayout(0, 0));
rs.add(tableNameComboBox, BorderLayout.CENTER); rs.add(tableNameComboBox, BorderLayout.CENTER);
@ -53,7 +54,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
new Component[]{l3, rs} new Component[]{l3, rs}
}; };
JPanel content = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(content, BorderLayout.CENTER); this.add(content, BorderLayout.CENTER);
} }

6
designer_base/src/com/fr/design/foldablepane/HeaderPane.java

@ -1,10 +1,12 @@
package com.fr.design.foldablepane; package com.fr.design.foldablepane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxUtilities;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.Map;
/** /**
* Created by MoMeak on 2017/7/5. * Created by MoMeak on 2017/7/5.
@ -61,6 +63,10 @@ public class HeaderPane extends JPanel {
g2d.fillRect(0, 0, headWidth, headHeight); g2d.fillRect(0, 0, headWidth, headHeight);
g2d.setFont(new Font("SimSun", 0, fontSize)); g2d.setFont(new Font("SimSun", 0, fontSize));
g2d.setPaint(bgColor); g2d.setPaint(bgColor);
Map<?, ?> desktopHints = RSyntaxUtilities.getDesktopAntiAliasHints();
if (desktopHints != null) {
g2d.setRenderingHints(desktopHints);
}
g2d.drawString(this.title, TITLE_X, headHeight - fontSize / 2 - 1); g2d.drawString(this.title, TITLE_X, headHeight - fontSize / 2 - 1);
int leftWdith = headWidth - LEFT_X; int leftWdith = headWidth - LEFT_X;
if (this.isShow) { if (this.isShow) {

4
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -179,10 +179,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f, 155}; double[] columnSize = { p, f};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), null, topToolBar}, new Component[]{new UILabel(getAddItemText()), topToolBar},
}; };
JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0));

2
designer_base/src/com/fr/design/gui/ibutton/UIButton.java

@ -36,6 +36,7 @@ public class UIButton extends JButton implements UIObserver {
private CellBorderStyle border = null; private CellBorderStyle border = null;
protected UIObserverListener uiObserverListener; protected UIObserverListener uiObserverListener;
private static final int TOOLTIP_INIT_DELAY = 1000; // 延迟 1s 显示提示文字
public UIButton() { public UIButton() {
this(StringUtils.EMPTY); this(StringUtils.EMPTY);
@ -139,6 +140,7 @@ public class UIButton extends JButton implements UIObserver {
setBackground(null); setBackground(null);
setRolloverEnabled(true); setRolloverEnabled(true);
initListener(); initListener();
ToolTipManager.sharedInstance().setInitialDelay(TOOLTIP_INIT_DELAY);
} }
@Override @Override

7
designer_base/src/com/fr/design/gui/style/FRFontPane.java

@ -238,7 +238,11 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
superPane.setPreferredSize(BUTTON_SIZE); superPane.setPreferredSize(BUTTON_SIZE);
subPane = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/sub.png")); subPane = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/sub.png"));
subPane.setPreferredSize(BUTTON_SIZE); subPane.setPreferredSize(BUTTON_SIZE);
isSuperOrSubPane = new TwoButtonPane(superPane, subPane); Component[] SuperOrSubComponents = new Component[]{
superPane, subPane
};
isSuperOrSubPane = new JPanel(new BorderLayout());
isSuperOrSubPane.add(GUICoreUtils.createFlowPane(SuperOrSubComponents, FlowLayout.LEFT, LayoutConstants.HGAP_SMALL));
Component[] components_font = new Component[]{ Component[] components_font = new Component[]{
colorSelectPane, underline, isStrikethroughCheckBox, isShadowCheckBox colorSelectPane, underline, isStrikethroughCheckBox, isShadowCheckBox
}; };
@ -248,7 +252,6 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
initAllNames(); initAllNames();
setToolTips(); setToolTips();
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
// this.add(fontNameComboBox, BorderLayout.NORTH);
this.add(createPane(), BorderLayout.CENTER); this.add(createPane(), BorderLayout.CENTER);
DefaultValues defaultValues = FRContext.getDefaultValues(); DefaultValues defaultValues = FRContext.getDefaultValues();
populateBean(defaultValues.getFRFont()); populateBean(defaultValues.getFRFont());

9
designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java

@ -37,6 +37,15 @@ public class FRGUIPaneFactory {
return new FlowLayout(FlowLayout.LEFT, 0, 0); return new FlowLayout(FlowLayout.LEFT, 0, 0);
} }
/**
* 创建一个靠右的布局
*
* @return FlowLayout对象
*/
public static LayoutManager createRightZeroLayout() {
return new FlowLayout(FlowLayout.RIGHT, 0, 0);
}
/** /**
* 创建一个靠左的水平和垂直间隙均为5的流式布局 * 创建一个靠左的水平和垂直间隙均为5的流式布局
* *

1
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -643,6 +643,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setTabButtonSelected(); setTabButtonSelected();
} }
}); });
button.setToolTipText(title);
} }
public UIButton getButton() { public UIButton getButton() {

7
designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java

@ -37,6 +37,7 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
/** /**
* richer:数据字典和数据链面板 * richer:数据字典和数据链面板
*/ */
private static final int GAP_HUGER = 32;
protected com.fr.data.impl.Connection database; protected com.fr.data.impl.Connection database;
protected DoubleDeckValueEditorPane keyColumnPane; protected DoubleDeckValueEditorPane keyColumnPane;
protected DoubleDeckValueEditorPane valueDictPane; protected DoubleDeckValueEditorPane valueDictPane;
@ -76,10 +77,10 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Actual_Value") + " ", UILabel.LEFT), keyColumnPane}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Actual_Value"), UILabel.LEFT), keyColumnPane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Display_Value") + " ", UILabel.LEFT), valueDictPane} new Component[]{new UILabel(Inter.getLocText("FR-Designer_Display_Value"), UILabel.LEFT), valueDictPane}
}; };
JPanel dbDictPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); JPanel dbDictPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, GAP_HUGER, LayoutConstants.VGAP_LARGE);
this.setLayout(new BorderLayout(0, 4)); this.setLayout(new BorderLayout(0, 4));
this.add(chooseTable, BorderLayout.NORTH); this.add(chooseTable, BorderLayout.NORTH);
this.add(dbDictPanel, BorderLayout.CENTER); this.add(dbDictPanel, BorderLayout.CENTER);

11
designer_base/src/com/fr/design/present/dict/DictionaryPane.java

@ -3,9 +3,11 @@ package com.fr.design.present.dict;
import com.fr.data.Dictionary; import com.fr.data.Dictionary;
import com.fr.data.impl.DynamicSQLDict; import com.fr.data.impl.DynamicSQLDict;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -25,18 +27,17 @@ public class DictionaryPane extends UIComboBoxPane<Dictionary> implements DataCr
@Override @Override
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(0, 4)); this.setLayout(new BorderLayout(0, 4));
// JPanel northPane = new JPanel(new BorderLayout(4, 0));
// northPane.add(new UILabel(Inter.getLocText("Type_Set"), UILabel.LEFT),BorderLayout.WEST);
// northPane.add(jcb,BorderLayout.CENTER);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p}; double[] rowSize = {p, p};
int[][] rowCount = {{1, 1}, {1, 1}};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Type_Set"), UILabel.LEFT), jcb}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Type_Set"), UILabel.LEFT), jcb},
new Component[]{null, null}
}; };
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_MEDIUM);
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);
} }

4
designer_base/src/com/fr/design/preview/WriteEnhancePreview.java

@ -28,13 +28,13 @@ public class WriteEnhancePreview extends AbstractPreviewProvider {
@Override @Override
public int previewTypeCode() { public int previewTypeCode() {
return IOFile.WRITE_PREVIEW_TYPE; return IOFile.WRITE_ENHANCE_PREVIEW_TYPE;
} }
@Override @Override
public Map<String, Object> parametersForPreview() { public Map<String, Object> parametersForPreview() {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
map.put("op", "write_ex"); map.put("op", "write_plus");
return map; return map;
} }
} }

1
designer_base/src/com/fr/design/style/AbstractSelectBox.java

@ -57,6 +57,7 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
} }
public void ancestorRemoved(AncestorEvent evt) { public void ancestorRemoved(AncestorEvent evt) {
hidePopupMenu();
} }
public void ancestorMoved(AncestorEvent event) { public void ancestorMoved(AncestorEvent event) {

82
designer_base/src/com/fr/file/FILEChooserPane.java

@ -1,51 +1,5 @@
package com.fr.file; package com.fr.file;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.AbstractAction;
import javax.swing.AbstractListModel;
import javax.swing.ActionMap;
import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import javax.swing.InputMap;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.KeyStroke;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.filechooser.FileSystemView;
import javax.swing.plaf.basic.BasicArrowButton;
import javax.swing.plaf.basic.BasicButtonUI;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
@ -70,12 +24,23 @@ import com.fr.file.filter.FILEFilter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.CoreConstants; import com.fr.stable.*;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.filechooser.FileSystemView;
import javax.swing.plaf.basic.BasicArrowButton;
import javax.swing.plaf.basic.BasicButtonUI;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* /*
* FileChooserPane要高亮显示某Button,以显示当前路径 * FileChooserPane要高亮显示某Button,以显示当前路径
* 边距要调整 * 边距要调整
@ -457,6 +422,7 @@ public class FILEChooserPane extends BasicPane {
/** /**
* 打开对话框 * 打开对话框
*
* @param parent 父类 * @param parent 父类
* @return 类型 * @return 类型
*/ */
@ -466,6 +432,7 @@ public class FILEChooserPane extends BasicPane {
/** /**
* 打开对话框 * 打开对话框
*
* @param parent 父类 * @param parent 父类
* @param suffix 后缀 * @param suffix 后缀
* @return 类型 * @return 类型
@ -476,6 +443,7 @@ public class FILEChooserPane extends BasicPane {
/** /**
* 打开对话框 * 打开对话框
*
* @param parent 父类 * @param parent 父类
* @return 类型 * @return 类型
*/ */
@ -485,6 +453,7 @@ public class FILEChooserPane extends BasicPane {
/** /**
* 打开对话框 * 打开对话框
*
* @param parent 父类 * @param parent 父类
* @param suffix 后缀 * @param suffix 后缀
* @return 类型 * @return 类型
@ -800,7 +769,9 @@ public class FILEChooserPane extends BasicPane {
} }
if (FILEChooserPane.this.showLoc) { if (FILEChooserPane.this.showLoc) {
// 桌面
if (OperatingSystem.isWindows()) {
// windows下展示桌面
File[] desktop = FileSystemView.getFileSystemView().getRoots(); File[] desktop = FileSystemView.getFileSystemView().getRoots();
if (desktop != null) { if (desktop != null) {
for (int i = 0; i < desktop.length; i++) { for (int i = 0; i < desktop.length; i++) {
@ -809,6 +780,9 @@ public class FILEChooserPane extends BasicPane {
} }
} }
} }
} else { // *nix下展示家目录
filesOfSystem.add(new FileFILE(FileSystemView.getFileSystemView().getDefaultDirectory()));
}
// C, D, E等盘符 // C, D, E等盘符
File[] roots = File.listRoots(); File[] roots = File.listRoots();
@ -1182,6 +1156,7 @@ public class FILEChooserPane extends BasicPane {
return; return;
} }
boolean isWebAppNamePath;
popDir = dir; popDir = dir;
this.buttonList.clear(); this.buttonList.clear();
@ -1190,12 +1165,13 @@ public class FILEChooserPane extends BasicPane {
} }
String path = dir.getPath(); String path = dir.getPath();
isWebAppNamePath = ComparatorUtils.equals(dir.prefix(), FILEFactory.WEBREPORT_PREFIX);
// 确保最后一个字符是分隔符 // 确保最后一个字符是分隔符
if (!path.endsWith("/") && !path.endsWith("\\") && !StringUtils.isBlank(path)) { if (!path.endsWith("/") && !path.endsWith("\\") && !StringUtils.isBlank(path)) {
path = path + "/"; path = path + "/";
} }
String webAppName = GeneralContext.getCurrentAppNameOfEnv(); String webAppName = GeneralContext.getCurrentAppNameOfEnv();
if (StringUtils.isBlank(path)) { if (StringUtils.isBlank(path) && isWebAppNamePath) {
this.buttonList.add(createBlankButton(new SetDirectoryAction(webAppName + '/'))); this.buttonList.add(createBlankButton(new SetDirectoryAction(webAppName + '/')));
} }
@ -1206,7 +1182,7 @@ public class FILEChooserPane extends BasicPane {
int start = matcher.start(); int start = matcher.start();
String btn_text = path.substring(node_start, start); String btn_text = path.substring(node_start, start);
String btn_path = path.substring(0, start); String btn_path = path.substring(0, start);
if (StringUtils.isBlank(btn_text)) { if (StringUtils.isBlank(btn_text) && isWebAppNamePath) {
btn_text = webAppName; btn_text = webAppName;
} }
this.buttonList.add(createBlankButton((new SetDirectoryAction(btn_text + '/', this.buttonList.add(createBlankButton((new SetDirectoryAction(btn_text + '/',

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

@ -9,9 +9,9 @@ import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
@ -178,7 +178,7 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
//轮播切换界面 //轮播切换界面
timeInterval.setValue(changeConfigAttr.getTimeInterval()); timeInterval.setValue(changeConfigAttr.getTimeInterval());
colorSelectBox4carousel.setSelectObject(changeConfigAttr.getCarouselColor()); colorSelectBox4carousel.setSelectObject(changeConfigAttr.getCarouselColor());
arrowCheckbox.setSelected(changeConfigAttr.getShowArrow()); arrowCheckbox.setSelected(changeConfigAttr.isShowArrow());
checkCardPane(); checkCardPane();

2
designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java

@ -11,9 +11,9 @@ import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import java.util.ArrayList; import java.util.ArrayList;

2
designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundNameObjectCreator.java

@ -4,7 +4,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper; import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground; import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;

2
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java

@ -14,7 +14,7 @@ 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.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground; import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*; import javax.swing.*;

2
designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java

@ -4,7 +4,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground; import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.designer.style.background.VanChartAxisAreaPane; import com.fr.plugin.chart.designer.style.background.VanChartAxisAreaPane;
import java.awt.*; import java.awt.*;

2
designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java

@ -21,7 +21,7 @@ public class ElementCasePropertyUI extends AbstractWidgetPropertyUIProvider {
@Override @Override
public AbstractPropertyTable createWidgetAttrTable() { public AbstractPropertyTable createWidgetAttrTable() {
return new ElementCasePropertyTable(xCreator); return null;
} }
@Override @Override

22
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -123,9 +123,11 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
extraPane.initPropertyGroups(designer); extraPane.initPropertyGroups(designer);
} }
} }
// for (AbstractPropertyTable propertyTable : widgetPropertyTables) { if (widgetPropertyTables != null) {
// propertyTable.initPropertyGroups(designer); for (AbstractPropertyTable propertyTable : widgetPropertyTables) {
// } propertyTable.initPropertyGroups(designer);
}
}
} }
/** /**
@ -224,12 +226,14 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
mobileExtraPropertyPanes.add(extraPane); mobileExtraPropertyPanes.add(extraPane);
wsp.add(extraPane); wsp.add(extraPane);
} }
// AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
// widgetPropertyTables.add(propertyTable); if (propertyTable != null) {
// designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane)); widgetPropertyTables.add(propertyTable);
// designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane));
// UIScrollPane uiScrollPane = new UIScrollPane(getExtraBodyTable(propertyTable));
// wsp.add(uiScrollPane); UIScrollPane uiScrollPane = new UIScrollPane(getExtraBodyTable(propertyTable));
wsp.add(uiScrollPane);
}
} }
} }
} }

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

@ -78,7 +78,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}; };
double[] rowSize = {p, p, p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p, p, p};
double[] columnSize = {p, f}; double[] columnSize = {p, f};
int[][] rowCount = {{1, 3}, {1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; int[][] rowCount = {{1, 1}, {1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 10); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 10);
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));

Loading…
Cancel
Save