From 59f593ab81e904a97c27d4610bd5e7379bad6f3e Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Oct 2016 11:35:58 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=B6=8A?= =?UTF-8?q?=E6=9D=A5=E8=B6=8A=E5=8D=A1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/cell/GlobalStyleMenuDef.java | 48 +++++++++++++++++-- .../com/fr/grid/selection/CellSelection.java | 7 ++- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java b/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java index b33d269966..08cbf2d87d 100644 --- a/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java +++ b/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java @@ -8,19 +8,27 @@ import com.fr.base.BaseUtils; import com.fr.base.ConfigManager; import com.fr.base.NameStyle; import com.fr.design.actions.ElementCaseAction; +import com.fr.design.actions.TemplateComponentAction; import com.fr.design.actions.UpdateAction; import com.fr.design.gui.imenu.UIMenu; import com.fr.design.mainframe.CellElementPropertyPane; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; +import com.fr.design.selection.SelectionEvent; +import com.fr.design.selection.SelectionListener; import com.fr.design.style.StylePane; import com.fr.general.Inter; import com.fr.base.ConfigManagerProvider; +import com.fr.grid.selection.CellSelection; +import com.fr.grid.selection.Selection; import com.fr.stable.StringUtils; import com.fr.stable.pinyin.PinyinHelper; import java.awt.event.ActionEvent; +import java.awt.event.HierarchyEvent; +import java.awt.event.HierarchyListener; import java.util.Iterator; public class GlobalStyleMenuDef extends MenuDef { @@ -46,8 +54,9 @@ public class GlobalStyleMenuDef extends MenuDef { while (iterator.hasNext()) { String name = (String) iterator.next(); NameStyle nameStyle = NameStyle.getInstance(name); - - UpdateAction.UseMenuItem useMenuItem = new GlobalStyleSelection(ePane, nameStyle).createUseMenuItem(); + GlobalStyleSelection selection = new GlobalStyleSelection(ePane, nameStyle); + UpdateAction.UseMenuItem useMenuItem =selection.createUseMenuItem(); + selection.registerSelectionListener(ePane, useMenuItem); useMenuItem.setNameStyle(nameStyle); createdMenu.add(useMenuItem); } @@ -113,7 +122,9 @@ public class GlobalStyleMenuDef extends MenuDef { } - public static class GlobalStyleSelection extends ElementCaseAction { + + + public static class GlobalStyleSelection extends TemplateComponentAction { private NameStyle nameStyle; @@ -149,5 +160,36 @@ public class GlobalStyleMenuDef extends MenuDef { stylePane.updateGlobalStyle(getEditingComponent()); return true; } + + private SelectionListener createSelectionListener (){ + return new SelectionListener (){ + + @Override + public void selectionChanged(SelectionEvent e) { + update(); + if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { + Selection selection = getEditingComponent().getSelection(); + if (selection instanceof CellSelection) { + CellSelection cellselection = (CellSelection) selection; + //样式处理 + getEditingComponent().setCellNeedTOFormat(cellselection); + } + } + } + }; + } + + + public void registerSelectionListener(final ElementCasePane ePane, UseMenuItem useMenuItem) { + + SelectionListener listener = createSelectionListener(); + ePane.addSelectionChangeListener(listener); + useMenuItem.addHierarchyListener(new HierarchyListener(){ + @Override + public void hierarchyChanged(HierarchyEvent e) { + ePane.removeSelectionChangeListener(listener); + } + }); + } } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/selection/CellSelection.java b/designer/src/com/fr/grid/selection/CellSelection.java index ef7fa3e1e4..e7b5b493c4 100644 --- a/designer/src/com/fr/grid/selection/CellSelection.java +++ b/designer/src/com/fr/grid/selection/CellSelection.java @@ -24,6 +24,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; import com.fr.design.report.RowColumnPane; import com.fr.design.selection.QuickEditor; +import com.fr.design.selection.SelectionListener; import com.fr.general.Inter; import com.fr.grid.GridUtils; import com.fr.report.cell.CellElement; @@ -36,6 +37,8 @@ import com.fr.stable.StableUtils; import javax.swing.*; import java.awt.*; +import java.awt.event.HierarchyEvent; +import java.awt.event.HierarchyListener; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -434,7 +437,9 @@ public class CellSelection extends Selection { String name = (String) iterato.next(); name = GlobalStyleMenuDef.judgeChina(name); NameStyle nameStyle = NameStyle.getInstance(name); - UpdateAction.UseMenuItem useMenuItem = new GlobalStyleSelection(ePane, nameStyle).createUseMenuItem(); + GlobalStyleSelection selection = new GlobalStyleSelection(ePane, nameStyle); + UpdateAction.UseMenuItem useMenuItem = selection.createUseMenuItem(); + selection.registerSelectionListener(ePane, useMenuItem); useMenuItem.setNameStyle(nameStyle); styleMenu.add(useMenuItem); } From 768c49fd4f4b2c3ea4c35bf55531cb8d690205bb Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Mon, 10 Oct 2016 14:56:57 +0800 Subject: [PATCH 2/8] =?UTF-8?q?bugfix=EF=BC=9AQQ=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E7=99=BB=E9=99=86=E4=B9=8B=E5=90=8E=EF=BC=8C=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=86=8D=E7=99=BB=E9=99=86=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 但是有个问题,之前的逻辑是记录用户名密码的,但是qq授权拿不到解密之前的用户名密码,不能做再登陆的操作,如果客户那时候修改密码,那实际上这边还是 可以登陆的,算是一个漏洞吧。 --- .../src/com/fr/design/mainframe/bbs/UserInfoPane.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index b8a168baa0..df18f1f88d 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -77,12 +77,11 @@ public class UserInfoPane extends BasicPane{ @Override public void run() { String username = DesignerEnvManager.getEnvManager().getBBSName(); - String password = DesignerEnvManager.getEnvManager().getBBSPassword(); - String loginResult = LoginWebBridge.getHelper().login(username, password); - if (loginResult.equals(LOGININ)) { - markSignIn(username); - }else { + String inShowUsername = DesignerEnvManager.getEnvManager().getInShowBBsName(); + if (StringUtils.isEmpty(username) && StringUtils.isEmpty(inShowUsername)){ markUnSignIn(); + } else { + markSignIn(username); } } }); From a7ea035308f895222bf20a53fd70acee8b5e9d74 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Oct 2016 16:08:41 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=86=85=E5=AD=98=E9=87=8A=E6=94=BE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/cell/GlobalStyleMenuDef.java | 60 +++++++++++++------ .../com/fr/grid/selection/CellSelection.java | 4 +- .../com/fr/design/actions/UpdateAction.java | 27 +++++++++ .../src/com/fr/design/menu/MenuDef.java | 11 +++- 4 files changed, 77 insertions(+), 25 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java b/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java index 08cbf2d87d..98fde3f751 100644 --- a/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java +++ b/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java @@ -26,9 +26,8 @@ import com.fr.grid.selection.Selection; import com.fr.stable.StringUtils; import com.fr.stable.pinyin.PinyinHelper; -import java.awt.event.ActionEvent; -import java.awt.event.HierarchyEvent; -import java.awt.event.HierarchyListener; +import java.awt.*; +import java.awt.event.*; import java.util.Iterator; public class GlobalStyleMenuDef extends MenuDef { @@ -43,6 +42,36 @@ public class GlobalStyleMenuDef extends MenuDef { this.setIconPath("/com/fr/design/images/m_web/style.png"); } + protected ContainerListener getContainerListener() { + return containerListener; + } + + private ContainerListener containerListener = new ContainerListener() { + @Override + public void componentAdded(ContainerEvent e) { + + } + + @Override + public void componentRemoved(ContainerEvent e) { + Component c = e.getChild(); + c.dispatchEvent(new MenuDeleteEvent(c)); + } + }; + + private class MenuDeleteEvent extends UpdateAction.ComponentRemoveEvent { + + public MenuDeleteEvent(Component source) { + super(source); + } + + @Override + public void release(SelectionListener listener) { + ePane.removeSelectionChangeListener(listener); + } + } + + /** * 更新菜单项 */ @@ -54,9 +83,7 @@ public class GlobalStyleMenuDef extends MenuDef { while (iterator.hasNext()) { String name = (String) iterator.next(); NameStyle nameStyle = NameStyle.getInstance(name); - GlobalStyleSelection selection = new GlobalStyleSelection(ePane, nameStyle); - UpdateAction.UseMenuItem useMenuItem =selection.createUseMenuItem(); - selection.registerSelectionListener(ePane, useMenuItem); + UpdateAction.UseMenuItem useMenuItem =new GlobalStyleSelection(ePane, nameStyle).createUseMenuItem(); useMenuItem.setNameStyle(nameStyle); createdMenu.add(useMenuItem); } @@ -161,6 +188,14 @@ public class GlobalStyleMenuDef extends MenuDef { return true; } + public UseMenuItem createUseMenuItem() { + UseMenuItem useMenuItem = super.createUseMenuItem(); + SelectionListener listener = createSelectionListener(); + getEditingComponent().addSelectionChangeListener(listener); + useMenuItem.setSelectionListener(listener); + return useMenuItem; + } + private SelectionListener createSelectionListener (){ return new SelectionListener (){ @@ -178,18 +213,5 @@ public class GlobalStyleMenuDef extends MenuDef { } }; } - - - public void registerSelectionListener(final ElementCasePane ePane, UseMenuItem useMenuItem) { - - SelectionListener listener = createSelectionListener(); - ePane.addSelectionChangeListener(listener); - useMenuItem.addHierarchyListener(new HierarchyListener(){ - @Override - public void hierarchyChanged(HierarchyEvent e) { - ePane.removeSelectionChangeListener(listener); - } - }); - } } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/selection/CellSelection.java b/designer/src/com/fr/grid/selection/CellSelection.java index e7b5b493c4..daaac7e26f 100644 --- a/designer/src/com/fr/grid/selection/CellSelection.java +++ b/designer/src/com/fr/grid/selection/CellSelection.java @@ -437,9 +437,7 @@ public class CellSelection extends Selection { String name = (String) iterato.next(); name = GlobalStyleMenuDef.judgeChina(name); NameStyle nameStyle = NameStyle.getInstance(name); - GlobalStyleSelection selection = new GlobalStyleSelection(ePane, nameStyle); - UpdateAction.UseMenuItem useMenuItem = selection.createUseMenuItem(); - selection.registerSelectionListener(ePane, useMenuItem); + UpdateAction.UseMenuItem useMenuItem = new GlobalStyleSelection(ePane, nameStyle).createUseMenuItem(); useMenuItem.setNameStyle(nameStyle); styleMenu.add(useMenuItem); } diff --git a/designer_base/src/com/fr/design/actions/UpdateAction.java b/designer_base/src/com/fr/design/actions/UpdateAction.java index 72cd74c537..93a553f9ca 100644 --- a/designer_base/src/com/fr/design/actions/UpdateAction.java +++ b/designer_base/src/com/fr/design/actions/UpdateAction.java @@ -12,10 +12,13 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UICheckBoxMenuItem; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.menu.ShortCut; +import com.fr.design.selection.SelectionListener; import com.fr.stable.StringUtils; import javax.swing.*; import java.awt.*; +import java.awt.event.ComponentEvent; +import java.awt.event.ContainerEvent; import java.beans.PropertyChangeListener; import java.util.HashMap; import java.util.Iterator; @@ -321,12 +324,24 @@ public abstract class UpdateAction extends ShortCut implements Action { toolBar.add(this.createToolBarComponent()); } + public abstract static class ComponentRemoveEvent extends ComponentEvent { + + private static int EVENT_DELETE= 3001; + + public ComponentRemoveEvent(Component source) { + super(source, EVENT_DELETE); + } + + public abstract void release(SelectionListener listener); + } + /** * 全局style的菜单 */ public static class UseMenuItem extends UIMenuItem { private NameStyle nameStyle; + private SelectionListener listener; public UseMenuItem(Action action) { super(action); @@ -337,6 +352,18 @@ public abstract class UpdateAction extends ShortCut implements Action { super(text, icon); } + protected void processEvent(AWTEvent e) { + if (e instanceof ComponentRemoveEvent) { + ((ComponentRemoveEvent) e).release(listener); + return; + } + super.processEvent(e); + } + + public void setSelectionListener(SelectionListener listener) { + this.listener = listener; + } + @Override public void paintComponent(Graphics g) { super.paintComponent(g); diff --git a/designer_base/src/com/fr/design/menu/MenuDef.java b/designer_base/src/com/fr/design/menu/MenuDef.java index aeee4dfb4d..bf85652fd2 100644 --- a/designer_base/src/com/fr/design/menu/MenuDef.java +++ b/designer_base/src/com/fr/design/menu/MenuDef.java @@ -13,9 +13,7 @@ import javax.swing.*; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; import java.awt.*; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; +import java.awt.event.*; import java.util.ArrayList; import java.util.List; @@ -164,11 +162,18 @@ public class MenuDef extends ShortCut { createdJMenu.setIcon(BaseUtils.readIcon(this.iconPath)); } createdJMenu.addMenuListener(menuDefListener); + ContainerListener listener = getContainerListener(); + if(listener != null){ + createdJMenu.getPopupMenu().addContainerListener(listener); + } } return createdJMenu; } + protected ContainerListener getContainerListener() { + return null; + } /** * 生成 JPopupMenu * @return 弹出菜单 From 9548f020d731195a1d244ad354a21a16623ec3d2 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Oct 2016 16:17:07 +0800 Subject: [PATCH 4/8] import --- designer/src/com/fr/grid/selection/CellSelection.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer/src/com/fr/grid/selection/CellSelection.java b/designer/src/com/fr/grid/selection/CellSelection.java index daaac7e26f..ef7fa3e1e4 100644 --- a/designer/src/com/fr/grid/selection/CellSelection.java +++ b/designer/src/com/fr/grid/selection/CellSelection.java @@ -24,7 +24,6 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; import com.fr.design.report.RowColumnPane; import com.fr.design.selection.QuickEditor; -import com.fr.design.selection.SelectionListener; import com.fr.general.Inter; import com.fr.grid.GridUtils; import com.fr.report.cell.CellElement; @@ -37,8 +36,6 @@ import com.fr.stable.StableUtils; import javax.swing.*; import java.awt.*; -import java.awt.event.HierarchyEvent; -import java.awt.event.HierarchyListener; import java.util.ArrayList; import java.util.Iterator; import java.util.List; From 9e3fe437e286aebd904a9ec4c8f4d9649bfe8f2e Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Oct 2016 16:23:35 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/ElementCaseAction.java | 18 ++-------- .../actions/SelectionListenerAction.java | 36 +++++++++++++++++++ .../actions/cell/GlobalStyleMenuDef.java | 20 ++--------- 3 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 designer/src/com/fr/design/actions/SelectionListenerAction.java diff --git a/designer/src/com/fr/design/actions/ElementCaseAction.java b/designer/src/com/fr/design/actions/ElementCaseAction.java index be9ff9f9a8..bfc0c8b4e5 100644 --- a/designer/src/com/fr/design/actions/ElementCaseAction.java +++ b/designer/src/com/fr/design/actions/ElementCaseAction.java @@ -10,24 +10,10 @@ import com.fr.grid.selection.Selection; import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionListener; -public abstract class ElementCaseAction extends TemplateComponentAction { +public abstract class ElementCaseAction extends SelectionListenerAction { protected ElementCaseAction(ElementCasePane t) { super(t); - t.addSelectionChangeListener(new SelectionListener() { - - @Override - public void selectionChanged(SelectionEvent e) { - update(); - if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { - Selection selection = getEditingComponent().getSelection(); - if (selection instanceof CellSelection) { - CellSelection cellselection = (CellSelection) selection; - //样式处理 - getEditingComponent().setCellNeedTOFormat(cellselection); - } - } - } - }); + t.addSelectionChangeListener(createSelectionListener()); } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/SelectionListenerAction.java b/designer/src/com/fr/design/actions/SelectionListenerAction.java new file mode 100644 index 0000000000..48cd2d4f9a --- /dev/null +++ b/designer/src/com/fr/design/actions/SelectionListenerAction.java @@ -0,0 +1,36 @@ +package com.fr.design.actions; + +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.selection.SelectionEvent; +import com.fr.design.selection.SelectionListener; +import com.fr.grid.selection.CellSelection; +import com.fr.grid.selection.Selection; + +/** + * Created by daniel on 2016/10/10. + */ +public abstract class SelectionListenerAction extends TemplateComponentAction { + + protected SelectionListenerAction(ElementCasePane elementCasePane) { + super(elementCasePane); + } + + protected SelectionListener createSelectionListener () { + return new SelectionListener() { + + @Override + public void selectionChanged(SelectionEvent e) { + update(); + if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { + Selection selection = getEditingComponent().getSelection(); + if (selection instanceof CellSelection) { + CellSelection cellselection = (CellSelection) selection; + //样式处理 + getEditingComponent().setCellNeedTOFormat(cellselection); + } + } + } + }; + } +} diff --git a/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java b/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java index 98fde3f751..27adef643a 100644 --- a/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java +++ b/designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java @@ -8,6 +8,7 @@ import com.fr.base.BaseUtils; import com.fr.base.ConfigManager; import com.fr.base.NameStyle; import com.fr.design.actions.ElementCaseAction; +import com.fr.design.actions.SelectionListenerAction; import com.fr.design.actions.TemplateComponentAction; import com.fr.design.actions.UpdateAction; import com.fr.design.gui.imenu.UIMenu; @@ -151,7 +152,7 @@ public class GlobalStyleMenuDef extends MenuDef { - public static class GlobalStyleSelection extends TemplateComponentAction { + public static class GlobalStyleSelection extends SelectionListenerAction { private NameStyle nameStyle; @@ -196,22 +197,5 @@ public class GlobalStyleMenuDef extends MenuDef { return useMenuItem; } - private SelectionListener createSelectionListener (){ - return new SelectionListener (){ - - @Override - public void selectionChanged(SelectionEvent e) { - update(); - if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { - Selection selection = getEditingComponent().getSelection(); - if (selection instanceof CellSelection) { - CellSelection cellselection = (CellSelection) selection; - //样式处理 - getEditingComponent().setCellNeedTOFormat(cellselection); - } - } - } - }; - } } } \ No newline at end of file From cf87ab28afbe87c923c7f67ac8bf7ab9a5460be3 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Mon, 10 Oct 2016 17:32:21 +0800 Subject: [PATCH 6/8] =?UTF-8?q?bugfix:=E6=B2=A1=E6=9C=89qq=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=9A=84=E8=B4=A6=E5=8F=B7=E7=BB=91=E5=AE=9A=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/extra/QQLoginWebBridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/extra/QQLoginWebBridge.java b/designer_base/src/com/fr/design/extra/QQLoginWebBridge.java index a2826cd0dd..140c89748e 100644 --- a/designer_base/src/com/fr/design/extra/QQLoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/QQLoginWebBridge.java @@ -117,7 +117,7 @@ public class QQLoginWebBridge { //账号没有QQ授权 closeQQWindow(); try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.default"))); + Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding"))); }catch (Exception exp) { } } From d2e20d9f5c05f7a563da13063f702bc829c2ef7e Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 11 Oct 2016 10:50:04 +0800 Subject: [PATCH 7/8] =?UTF-8?q?REPORT-407=20=E8=8B=B1=E6=96=87=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=B8=83=E5=B1=80=E4=B8=8D=E5=90=88=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E6=96=87=E5=AD=97=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormParaWidgetPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java index 78af66a84d..8118d4da27 100644 --- a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java @@ -192,7 +192,7 @@ public class FormParaWidgetPane extends JPanel{ } labelPane.add(label,BorderLayout.CENTER); reportPane.add(labelPane,BorderLayout.SOUTH); - reportPane.setPreferredSize(new Dimension((int)jComponent.getPreferredSize().getWidth(),(int)reportPane.getPreferredSize().getHeight())); + reportPane.setPreferredSize(new Dimension((int)reportPane.getPreferredSize().getWidth(),(int)reportPane.getPreferredSize().getHeight())); return reportPane; } From 6fab8994629ac0b1491e7a034cc4018b26c2e0ee Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 11 Oct 2016 14:42:59 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=8D=A2=E4=B8=80=E4=B8=8B=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/export/AbstractExportAction.java | 3 ++- .../src/com/fr/design/actions/file/export/PDFExportAction.java | 3 ++- 2 files changed, 4 insertions(+), 2 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 a4a55ac304..0c6f0c8ed0 100644 --- a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java @@ -5,6 +5,7 @@ package com.fr.design.actions.file.export; import com.fr.base.FRContext; import com.fr.base.Parameter; +import com.fr.io.exporter.pdfstream.PDFStreamExporter; import com.fr.page.PageSetProvider; import com.fr.design.actions.JWorkBookAction; import com.fr.design.gui.iprogressbar.FRProgressBar; @@ -139,7 +140,7 @@ public abstract class AbstractExportAction extends JWorkBookAction { if (exporter instanceof AppExporter) { AppExporter appExporter = (AppExporter) exporter; if (exporter instanceof ExcelExporter || exporter instanceof CSVExporter - || exporter instanceof PDFExporter || exporter instanceof WordExporter) { + || exporter instanceof PDFExporter || exporter instanceof PDFStreamExporter || exporter instanceof WordExporter) { ReportHelper.clearFormulaResult(tpl);// 清空rpt中的公式计算结果 appExporter.export(fileOutputStream, tpl.execute(parameterMap, ActorFactory.getActor(ActorConstants.TYPE_PAGE) diff --git a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java index 68fdd783f8..64cf5dabf5 100644 --- a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java @@ -10,6 +10,7 @@ import com.fr.file.filter.ChooseFileFilter; import com.fr.general.Inter; import com.fr.io.exporter.Exporter; import com.fr.io.exporter.PDFExporter; +import com.fr.io.exporter.pdfstream.PDFStreamExporter; /** * Export pdf @@ -28,7 +29,7 @@ public class PDFExportAction extends AbstractExportAction { @Override protected Exporter getExporter() { - return new PDFExporter(); + return new PDFStreamExporter(); } @Override