From 8594603c2a7b2cf9a308c5c1f982e996b6c06a77 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 24 Aug 2017 19:12:13 +0800 Subject: [PATCH 01/11] =?UTF-8?q?REPORT-3899=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E8=81=9A=E5=90=88=E5=9D=97=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyDesigner.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index 0c700a7bf5..fcafd4c8ca 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -738,7 +738,7 @@ public class PolyDesigner extends ReportComponent Date: Fri, 25 Aug 2017 14:44:11 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=96=B9=E5=BC=8F=E6=94=B9=E4=B8=BAop=3Dwrit?= =?UTF-8?q?e=5Fplus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/preview/WriteEnhancePreview.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java b/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java index 71705e9634..8dc18b57d7 100644 --- a/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java +++ b/designer_base/src/com/fr/design/preview/WriteEnhancePreview.java @@ -28,13 +28,13 @@ public class WriteEnhancePreview extends AbstractPreviewProvider { @Override public int previewTypeCode() { - return IOFile.WRITE_PREVIEW_TYPE; + return IOFile.WRITE_ENHANCE_PREVIEW_TYPE; } @Override public Map parametersForPreview() { Map map = new HashMap(); - map.put("op", "write_ex"); + map.put("op", "write_plus"); return map; } } From 6b6d0e8d912cf5a066722b5afcd7dad544cf06fd Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 25 Aug 2017 14:52:26 +0800 Subject: [PATCH 03/11] =?UTF-8?q?REPORT-4132=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=20=E5=A1=AB=E6=8A=A5=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=8F=AF=E7=94=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=B2=A1=E6=9C=89=EF=BC=8C=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E9=83=BD=E6=88=90=E4=BA=86=E5=8F=AF=E8=A7=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index 16876b6f04..cedcfc1db7 100644 --- a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -22,7 +22,7 @@ public class BasicWidgetPropertySettingPane extends BasicPane { public BasicWidgetPropertySettingPane() { 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)); visibleCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Widget-Visible"), true); visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); From 6d0998169fddec85038bb934b37ea9a859931c11 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 25 Aug 2017 15:34:44 +0800 Subject: [PATCH 04/11] =?UTF-8?q?REPORT-3993=20-=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E9=80=89=E4=B8=AD=E4=B8=80=E7=89=87?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E8=AE=BE=E7=BD=AE=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E3=80=81=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E6=9C=89=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/CellWidgetPropertyPane.java | 31 ++++++++++++------- .../present/ConditionAttributesGroupPane.java | 24 +++++++++++++- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java index 5637a68ca6..60f45450c7 100644 --- a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -1,6 +1,7 @@ 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; @@ -15,6 +16,7 @@ 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; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -30,6 +32,7 @@ public class CellWidgetPropertyPane extends BasicPane { private TemplateCellElement cellElement; private WidgetPane cellEditorDefPane; + private ElementCasePane ePane; public static CellWidgetPropertyPane getInstance(){ if (singleton == null) { @@ -84,6 +87,7 @@ public class CellWidgetPropertyPane extends BasicPane { public void reInit(ElementCasePane ePane){ + this.ePane = ePane; cellEditorDefPane = new WidgetPane(ePane); this.removeAll(); this.add(cellEditorDefPane, BorderLayout.CENTER); @@ -108,18 +112,23 @@ public class CellWidgetPropertyPane extends BasicPane { if (cellElement == null) {// 利用默认的CellElement. return; } - - Widget cellWidget = this.cellEditorDefPane.update(); - // p:最后把这个cellEditorDef设置到CellGUIAttr. - if (cellWidget instanceof NoneWidget) { - cellElement.setWidget(null); - } else { - if (cellElement.getWidget() != null) { - cellWidget = upDateWidgetAuthority(cellElement, cellWidget); + final CellSelection finalCS = (CellSelection) ePane.getSelection(); + final TemplateElementCase tplEC = ePane.getEditingElementCase(); + ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { + public void dealWith(CellElement editCellElement) { + Widget cellWidget = cellEditorDefPane.update(); + // p:最后把这个cellEditorDef设置到CellGUIAttr. + TemplateCellElement cellElement = (TemplateCellElement) editCellElement; + if (cellWidget instanceof NoneWidget) { + cellElement.setWidget(null); + } else { + if (cellElement.getWidget() != null) { + cellWidget = upDateWidgetAuthority(cellElement, cellWidget); + } + cellElement.setWidget(cellWidget); + } } - cellElement.setWidget(cellWidget); - } - + }); } diff --git a/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java b/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java index 5cc05777da..6479653642 100644 --- a/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java +++ b/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import com.fr.base.FRContext; +import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.mainframe.DesignerContext; 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.general.Inter; import com.fr.grid.selection.CellSelection; +import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.highlight.DefaultHighlight; @@ -27,6 +29,7 @@ import com.fr.stable.Nameable; public class ConditionAttributesGroupPane extends UIListControlPane { private static ConditionAttributesGroupPane singleton; private TemplateCellElement editCellElement; // 当前单元格对象 + private ElementCasePane ePane; private ConditionAttributesGroupPane() { super(); @@ -49,7 +52,25 @@ public class ConditionAttributesGroupPane extends UIListControlPane { if (isPopulating) { return; } - editCellElement.setHighlightGroup(updateHighlightGroup()); + final CellSelection finalCS = (CellSelection) ePane.getSelection(); + final TemplateElementCase tplEC = ePane.getEditingElementCase(); +// for (int i = 0; i < finalCS.getRowSpan(); i++) { +// for (int j = 0; j < finalCS.getColumnSpan(); j++) { +// int row = i + finalCS.getRow(); +// int column = j + finalCS.getColumn(); +// TemplateCellElement editCellElement = tplEC.getTemplateCellElement(column, row); +// // alex:不加这一句话会导致跨行跨列的格子被多次update +// if (editCellElement.getColumn() != column || editCellElement.getRow() != row) { +// continue; +// } +// } +// } + + ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { + public void dealWith(CellElement editCellElement) { + ((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup()); + } + }); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); } @@ -64,6 +85,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane { } public void populate(ElementCasePane ePane) { + this.ePane = ePane; CellSelection cs = (CellSelection) ePane.getSelection(); final TemplateElementCase tplEC = ePane.getEditingElementCase(); editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); From 60d2d56444dccee3d147ede1cdd282a222f60c55 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 25 Aug 2017 15:50:22 +0800 Subject: [PATCH 05/11] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=8F=B3=E4=BE=A7ta?= =?UTF-8?q?b=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/EastRegionContainerPane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index c5f81a9d8f..cfc34633fa 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -643,6 +643,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { setTabButtonSelected(); } }); + button.setToolTipText(title); } public UIButton getButton() { From e28b7a8892fd7ae4b0a4eef3343cc8b0da41e04b Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 25 Aug 2017 15:53:19 +0800 Subject: [PATCH 06/11] =?UTF-8?q?REPORT-4097=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]Mac=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=96=87=E4=BB=B6=E6=97=B6=EF=BC=8C=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file/export/AbstractExportAction.java | 4 +- .../src/com/fr/file/FILEChooserPane.java | 148 ++++++++---------- 2 files changed, 64 insertions(+), 88 deletions(-) diff --git a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java index e80e75fb9b..74e8fbdf35 100644 --- a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java @@ -72,7 +72,7 @@ public abstract class AbstractExportAction extends JWorkBookAction { } // Choose a file name.... - FILEChooserPane fileChooserPane = FILEChooserPane.getInstance(false, true); + FILEChooserPane fileChooserPane = FILEChooserPane.getInstance(true, true); fileChooserPane.setFILEFilter(this.getChooseFileFilter()); // 打开文件后输出文件名修改,eg:w.cpt.doc / w.svg.doc,去掉中间的后缀名~~ w.doc @@ -139,7 +139,7 @@ public abstract class AbstractExportAction extends JWorkBookAction { if (exporter instanceof AppExporter) { AppExporter appExporter = (AppExporter) exporter; if (exporter instanceof ExcelExporter || exporter instanceof CSVExporter - || exporter instanceof PDFExporterProcessor || exporter instanceof WordExporter) { + || exporter instanceof PDFExporterProcessor || exporter instanceof WordExporter) { ReportHelper.clearFormulaResult(tpl);// 清空rpt中的公式计算结果 appExporter.export(fileOutputStream, tpl.execute(parameterMap, ActorFactory.getActor(ActorConstants.TYPE_PAGE) diff --git a/designer_base/src/com/fr/file/FILEChooserPane.java b/designer_base/src/com/fr/file/FILEChooserPane.java index 29d018398d..cdc0c2c0f9 100644 --- a/designer_base/src/com/fr/file/FILEChooserPane.java +++ b/designer_base/src/com/fr/file/FILEChooserPane.java @@ -1,51 +1,5 @@ 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.FRContext; import com.fr.dav.LocalEnv; @@ -70,12 +24,23 @@ import com.fr.file.filter.FILEFilter; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; -import com.fr.stable.CoreConstants; -import com.fr.stable.ProductConstants; -import com.fr.stable.StableUtils; -import com.fr.stable.StringUtils; +import com.fr.stable.*; 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,以显示当前路径 * 边距要调整 @@ -300,15 +265,15 @@ public class FILEChooserPane extends BasicPane { if (ss instanceof FILEFilter) { setFILEFilter((FILEFilter) ss); } else { - setFILEFilter(null); - } + setFILEFilter(null); + } } }); } - - private void doCancel(){ - this.locationBtnPane.setPopDir(null); - dialogExit(); + + private void doCancel() { + this.locationBtnPane.setPopDir(null); + dialogExit(); } /** @@ -343,7 +308,7 @@ public class FILEChooserPane extends BasicPane { } } - protected String getEnvProjectName(){ + protected String getEnvProjectName() { return Inter.getLocText("Utils-Report-Env_Directory"); } @@ -361,7 +326,7 @@ public class FILEChooserPane extends BasicPane { * 在指定index增加过滤器 * * @param filter 过滤器 - * @param index 序号 + * @param index 序号 */ public void addChooseFILEFilter(FILEFilter filter, int index) { if (filterList.contains(filter)) { @@ -377,7 +342,7 @@ public class FILEChooserPane extends BasicPane { * 若是已经存在,则将之删去之后,在指定的位置增加 * * @param filter 过滤 - * @param index 序号 + * @param index 序号 */ public void addChooseFILEFilterToFist(FILEFilter filter, int index) { if (filterList.contains(filter)) { @@ -421,7 +386,7 @@ public class FILEChooserPane extends BasicPane { /** * richer:默认的话就使用.cpt作为后缀名 * - * @param text 文本 + * @param text 文本 * @param suffix 后缀 */ public void setFileNameTextField(String text, String suffix) { @@ -457,6 +422,7 @@ public class FILEChooserPane extends BasicPane { /** * 打开对话框 + * * @param parent 父类 * @return 类型 */ @@ -466,6 +432,7 @@ public class FILEChooserPane extends BasicPane { /** * 打开对话框 + * * @param parent 父类 * @param suffix 后缀 * @return 类型 @@ -476,6 +443,7 @@ public class FILEChooserPane extends BasicPane { /** * 打开对话框 + * * @param parent 父类 * @return 类型 */ @@ -485,6 +453,7 @@ public class FILEChooserPane extends BasicPane { /** * 打开对话框 + * * @param parent 父类 * @param suffix 后缀 * @return 类型 @@ -497,7 +466,7 @@ public class FILEChooserPane extends BasicPane { * august:控件的事件都在这里面添加的 那么我每次showDialog,不都要重复添加一次事件吗?无语了 * * @param parent 父类 - * @param type 类型 + * @param type 类型 * @param suffix 后缀 * @return 类型 */ @@ -506,7 +475,7 @@ public class FILEChooserPane extends BasicPane { this.suffix = suffix; - dialog = showWindow((Window)parent, false); + dialog = showWindow((Window) parent, false); JPanel contentPane = (JPanel) dialog.getContentPane(); contentPane.setLayout(FRGUIPaneFactory.createM_BorderLayout()); contentPane.add(this, BorderLayout.CENTER); @@ -545,11 +514,11 @@ public class FILEChooserPane extends BasicPane { protected void fileType() { String appName = ProductConstants.APP_NAME; JTemplate editing = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if(ComparatorUtils.equals(suffix,".crt")){ + if (ComparatorUtils.equals(suffix, ".crt")) { this.addChooseFILEFilter(new ChooseFileFilter("crt", appName + Inter.getLocText(new String[]{"Utils-The-Chart", "FR-App-All_File"}))); return; } - if(editing == null || !editing.isChartBook()){ + if (editing == null || !editing.isChartBook()) { String[] fileSuffix_local = LocalEnv.FILE_TYPE; String[] fileSuffix = {"cpt", "frm", "form", "cht", "chart"}; if (type == JFileChooser.OPEN_DIALOG) { @@ -566,10 +535,10 @@ public class FILEChooserPane extends BasicPane { // richer:form文件 daniel 改成三个字 this.addChooseFILEFilter(new ChooseFileFilter("frm", appName + Inter.getLocText(new String[]{"FR-App-Template_Form", "FR-App-All_File"}))); this.addChooseFILEFilter(new ChooseFileFilter("form", appName + Inter.getLocText(new String[]{"FR-App-Template_Form", "FR-App-All_File"}))); - }else{ - String[] fileSuffix_local = {"xls","xlsx"}; + } else { + String[] fileSuffix_local = {"xls", "xlsx"}; if (type == JFileChooser.OPEN_DIALOG) { - this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local,Inter.getLocText("Import-Excel_Source"))); + this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, Inter.getLocText("Import-Excel_Source"))); } } @@ -578,8 +547,8 @@ public class FILEChooserPane extends BasicPane { this.addChooseFILEFilter(new ChooseFileFilter("xls", Inter.getLocText("Import-Excel_Source"))); this.addChooseFILEFilter(new ChooseFileFilter("xlsx", Inter.getLocText("Import-Excel2007_Source"))); } - if(ComparatorUtils.equals(suffix,".png")){ - this.addChooseFILEFilter(new ChooseFileFilter("png",Inter.getLocText("FR-App-Export_png"))); + if (ComparatorUtils.equals(suffix, ".png")) { + this.addChooseFILEFilter(new ChooseFileFilter("png", Inter.getLocText("FR-App-Export_png"))); } if (type == JFileChooser.SAVE_DIALOG) { this.addChooseFILEFilter(new ChooseFileFilter("pdf", Inter.getLocText("FR-Import-Export_PDF"))); @@ -627,7 +596,7 @@ public class FILEChooserPane extends BasicPane { postfixComboBox.setSelectedIndex(suffixIndex("doc")); } else if (ComparatorUtils.equals(suffix, ".txt")) { postfixComboBox.setSelectedIndex(suffixIndex("txt")); - }else if(ComparatorUtils.equals(suffix,".png")){ + } else if (ComparatorUtils.equals(suffix, ".png")) { postfixComboBox.setSelectedIndex(suffixIndex("png")); } //jerry 26216 只保留.cpt .frm有用的格式,并且不可编辑 @@ -643,10 +612,10 @@ public class FILEChooserPane extends BasicPane { } } - private int suffixIndex(String extension){ - for(int i=0 ;i Date: Fri, 25 Aug 2017 16:32:38 +0800 Subject: [PATCH 07/11] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20->=E4=BA=A4=E4=BA=92=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/settingpane/CellOtherSetPane.java | 23 ++++++++++++---- .../com/fr/design/present/BarCodePane.java | 27 ++++++------------- .../fr/design/present/CurrencyLinePane.java | 12 +++++---- .../fr/design/constants/LayoutConstants.java | 2 +- .../data/datapane/VerticalChoosePane.java | 3 ++- .../com/fr/design/gui/style/FRFontPane.java | 7 +++-- .../fr/design/layout/FRGUIPaneFactory.java | 9 +++++++ .../design/present/dict/DatabaseDictPane.java | 7 ++--- .../design/present/dict/DictionaryPane.java | 11 ++++---- .../fr/design/style/AbstractSelectBox.java | 1 + 10 files changed, 61 insertions(+), 41 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 6be46f1c54..b6826a8612 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/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.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; 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_HEIGTH = 24; + private static final Dimension NORMAL_DIMENSION = new Dimension(155, 20); + private static final Dimension SMALL_DIMENSION = new Dimension(150, 20); // normal 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[]{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()); seniorPane.add(seniorUpPane(), BorderLayout.NORTH); seniorPane.add(southContentPane, BorderLayout.CENTER); @@ -167,15 +170,25 @@ public class CellOtherSetPane extends AbstractCellAttrPane { double[] downRowSize = {p, p, p, p, p, p}; double[] downColumnSize = {p, f}; 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[][]{ new Component[]{null, null}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content"), SwingConstants.LEFT), showContent}, - new Component[]{null, fileNamePane}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip"), SwingConstants.RIGHT), tooltipTextField}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content"), SwingConstants.LEFT), showContentPane}, + new Component[]{fileNamePane, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip"), SwingConstants.LEFT), tooltipTextFieldPane}, 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()); pane.add(upPane, BorderLayout.NORTH); pane.add(downPane, BorderLayout.CENTER); diff --git a/designer/src/com/fr/design/present/BarCodePane.java b/designer/src/com/fr/design/present/BarCodePane.java index 1966449381..ac38203387 100644 --- a/designer/src/com/fr/design/present/BarCodePane.java +++ b/designer/src/com/fr/design/present/BarCodePane.java @@ -60,17 +60,6 @@ public class BarCodePane extends FurtherBasicBeanPane { 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() { barCodePreviewPane = new BarCodePreviewPane(); this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); @@ -86,7 +75,7 @@ public class BarCodePane extends FurtherBasicBeanPane { RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); RCodeVersionComboBox = 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(); initErrorCorrectComboBox(); @@ -106,7 +95,7 @@ public class BarCodePane extends FurtherBasicBeanPane { new Component[]{borderPane, 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(getSpecialPane(), "special"); typeComboBox.addItemListener(new ItemListener() { @@ -150,9 +139,9 @@ public class BarCodePane extends FurtherBasicBeanPane { double[] rowSize = {p, p, p, p, p, p, p, p}; double[] columnSize = {p, f, f}; 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); - JPanel barHeightContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); + JPanel barHeightContainer = new JPanel(new BorderLayout()); barHeightContainer.add(barHeightSpinner); UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), UILabel.RIGHT); uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); @@ -172,9 +161,9 @@ public class BarCodePane extends FurtherBasicBeanPane { private JPanel getSpecialPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, p}; - double[] rowSize = {p, p, p, p, p, p, p, p}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion"), UILabel.LEFT); uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); RCodeVersionComboBox.setPreferredSize(new Dimension(155,20)); @@ -186,7 +175,7 @@ public class BarCodePane extends FurtherBasicBeanPane { 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; } diff --git a/designer/src/com/fr/design/present/CurrencyLinePane.java b/designer/src/com/fr/design/present/CurrencyLinePane.java index 7922f21867..ab4af16450 100644 --- a/designer/src/com/fr/design/present/CurrencyLinePane.java +++ b/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.border.UIRoundedBorder; +import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UIBasicSpinner; @@ -31,6 +32,7 @@ import java.awt.*; public class CurrencyLinePane extends FurtherBasicBeanPane { private static final int VS_NUM = 4; private static final int VG_NUM = 6; + private static final Dimension NORMAL_DIMENSION = new Dimension(155, 20); private UIBasicSpinner intPartSpinner; private UIBasicSpinner deciPartSpinner; private UITextField textField; @@ -72,11 +74,11 @@ public class CurrencyLinePane extends FurtherBasicBeanPane protected void initComponents() { // 整数位选择 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.setPreferredSize(new Dimension(158, 20)); + deciPartSpinner.setPreferredSize(NORMAL_DIMENSION); // 预览区域 textField = new UITextField(10); @@ -95,7 +97,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p, p, p, p}; - + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField}, @@ -105,7 +107,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane }; - 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.add(linePane, BorderLayout.CENTER); @@ -186,7 +188,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane protected static JPanel groupPane(JComponent comp) { JPanel jp = new JPanel(); jp.setBorder(null); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); jp.add(comp); return jp; } diff --git a/designer_base/src/com/fr/design/constants/LayoutConstants.java b/designer_base/src/com/fr/design/constants/LayoutConstants.java index 2ff1ac72b3..82872d018a 100644 --- a/designer_base/src/com/fr/design/constants/LayoutConstants.java +++ b/designer_base/src/com/fr/design/constants/LayoutConstants.java @@ -1 +1 @@ -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; } \ No newline at end of file +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; } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java b/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java index bac6b26724..9f90737b6b 100644 --- a/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java +++ b/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[] columnSize = {p, f}; double[] rowSize = {p, p, p}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; JPanel rs = new JPanel(new BorderLayout(0, 0)); rs.add(tableNameComboBox, BorderLayout.CENTER); @@ -53,7 +54,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { 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.add(content, BorderLayout.CENTER); } diff --git a/designer_base/src/com/fr/design/gui/style/FRFontPane.java b/designer_base/src/com/fr/design/gui/style/FRFontPane.java index f428878cda..6e80c2d7f5 100644 --- a/designer_base/src/com/fr/design/gui/style/FRFontPane.java +++ b/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); subPane = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/sub.png")); 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[]{ colorSelectPane, underline, isStrikethroughCheckBox, isShadowCheckBox }; @@ -248,7 +252,6 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse initAllNames(); setToolTips(); this.setLayout(new BorderLayout()); -// this.add(fontNameComboBox, BorderLayout.NORTH); this.add(createPane(), BorderLayout.CENTER); DefaultValues defaultValues = FRContext.getDefaultValues(); populateBean(defaultValues.getFRFont()); diff --git a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java index e71334430d..a613f23d8b 100644 --- a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java @@ -37,6 +37,15 @@ public class FRGUIPaneFactory { return new FlowLayout(FlowLayout.LEFT, 0, 0); } + /** + * 创建一个靠右的布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createRightZeroLayout() { + return new FlowLayout(FlowLayout.RIGHT, 0, 0); + } + /** * 创建一个靠左的水平和垂直间隙均为5的流式布局 * diff --git a/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java b/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java index 4b25c3436f..95036f849f 100644 --- a/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java @@ -37,6 +37,7 @@ public class DatabaseDictPane extends FurtherBasicBeanPane i /** * richer:数据字典和数据链面板 */ + private static final int SMALL_WDITH = 150; protected com.fr.data.impl.Connection database; protected DoubleDeckValueEditorPane keyColumnPane; protected DoubleDeckValueEditorPane valueDictPane; @@ -76,10 +77,10 @@ public class DatabaseDictPane extends FurtherBasicBeanPane i Component[][] components = new Component[][]{ 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_Display_Value") + " ", UILabel.LEFT), valueDictPane} + 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} }; - JPanel dbDictPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + JPanel dbDictPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 32, LayoutConstants.VGAP_LARGE); this.setLayout(new BorderLayout(0, 4)); this.add(chooseTable, BorderLayout.NORTH); this.add(dbDictPanel, BorderLayout.CENTER); diff --git a/designer_base/src/com/fr/design/present/dict/DictionaryPane.java b/designer_base/src/com/fr/design/present/dict/DictionaryPane.java index 91d0d8ea52..6f0b637cfd 100644 --- a/designer_base/src/com/fr/design/present/dict/DictionaryPane.java +++ b/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.impl.DynamicSQLDict; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.LayoutConstants; import com.fr.design.data.DataCreatorUI; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; @@ -25,18 +27,17 @@ public class DictionaryPane extends UIComboBoxPane implements DataCr @Override protected void initLayout() { 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 f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p}; + double[] rowSize = {p, p}; + int[][] rowCount = {{1, 1}, {1, 1}}; Component[][] components = new Component[][]{ 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(cardPane, BorderLayout.CENTER); } diff --git a/designer_base/src/com/fr/design/style/AbstractSelectBox.java b/designer_base/src/com/fr/design/style/AbstractSelectBox.java index f354c164f8..f837c08f97 100644 --- a/designer_base/src/com/fr/design/style/AbstractSelectBox.java +++ b/designer_base/src/com/fr/design/style/AbstractSelectBox.java @@ -57,6 +57,7 @@ public abstract class AbstractSelectBox extends AbstractPopBox implements Mou } public void ancestorRemoved(AncestorEvent evt) { + hidePopupMenu(); } public void ancestorMoved(AncestorEvent event) { From b03e0cd524b60ac042a57605e74c155c00ee12ba Mon Sep 17 00:00:00 2001 From: MoMeak Date: Fri, 25 Aug 2017 16:34:10 +0800 Subject: [PATCH 08/11] CR->LF --- .../fr/design/constants/LayoutConstants.java | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/constants/LayoutConstants.java b/designer_base/src/com/fr/design/constants/LayoutConstants.java index 82872d018a..149923c1a8 100644 --- a/designer_base/src/com/fr/design/constants/LayoutConstants.java +++ b/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 VGAP_HUGER = 20; /** * 图表属性表中二级菜单距离右边框的距离 */ public static final int CHART_ATTR_TOMARGIN = 46; } \ No newline at end of file +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; +} \ No newline at end of file From bfbe166ed8027af3a05129566e6cde236a8c794f Mon Sep 17 00:00:00 2001 From: MoMeak Date: Fri, 25 Aug 2017 16:38:54 +0800 Subject: [PATCH 09/11] PMD --- .../src/com/fr/design/present/dict/DatabaseDictPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java b/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java index 95036f849f..5cd4e41ea0 100644 --- a/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java @@ -37,7 +37,7 @@ public class DatabaseDictPane extends FurtherBasicBeanPane i /** * richer:数据字典和数据链面板 */ - private static final int SMALL_WDITH = 150; + private static final int GAP_HUGER = 32; protected com.fr.data.impl.Connection database; protected DoubleDeckValueEditorPane keyColumnPane; protected DoubleDeckValueEditorPane valueDictPane; @@ -80,7 +80,7 @@ public class DatabaseDictPane extends FurtherBasicBeanPane i 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} }; - JPanel dbDictPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 32, LayoutConstants.VGAP_LARGE); + JPanel dbDictPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, GAP_HUGER, LayoutConstants.VGAP_LARGE); this.setLayout(new BorderLayout(0, 4)); this.add(chooseTable, BorderLayout.NORTH); this.add(dbDictPanel, BorderLayout.CENTER); From f0d9f4826175aa33165a3a141bc100a83f01b75d Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 25 Aug 2017 16:59:14 +0800 Subject: [PATCH 10/11] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E6=82=AC=E5=81=9C1s?= =?UTF-8?q?=E5=90=8E=E5=87=BA=E7=8E=B0=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/ibutton/UIButton.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIButton.java index 096e363a51..776a6a284a 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButton.java +++ b/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; protected UIObserverListener uiObserverListener; + private static final int TOOLTIP_INIT_DELAY = 1000; // 延迟 1s 显示提示文字 public UIButton() { this(StringUtils.EMPTY); @@ -139,6 +140,7 @@ public class UIButton extends JButton implements UIObserver { setBackground(null); setRolloverEnabled(true); initListener(); + ToolTipManager.sharedInstance().setInitialDelay(TOOLTIP_INIT_DELAY); } @Override From 00ff1c6014f52220546d11205a4f74a677295167 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 25 Aug 2017 17:30:33 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/present/ConditionAttributesGroupPane.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java b/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java index 6479653642..961c88d105 100644 --- a/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java +++ b/designer/src/com/fr/design/present/ConditionAttributesGroupPane.java @@ -54,17 +54,6 @@ public class ConditionAttributesGroupPane extends UIListControlPane { } final CellSelection finalCS = (CellSelection) ePane.getSelection(); final TemplateElementCase tplEC = ePane.getEditingElementCase(); -// for (int i = 0; i < finalCS.getRowSpan(); i++) { -// for (int j = 0; j < finalCS.getColumnSpan(); j++) { -// int row = i + finalCS.getRow(); -// int column = j + finalCS.getColumn(); -// TemplateCellElement editCellElement = tplEC.getTemplateCellElement(column, row); -// // alex:不加这一句话会导致跨行跨列的格子被多次update -// if (editCellElement.getColumn() != column || editCellElement.getRow() != row) { -// continue; -// } -// } -// } ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { public void dealWith(CellElement editCellElement) {