From cfeb76c4eee69c61aa72e1bfc82e0165557f294c Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 11 Jul 2019 14:37:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-18422=20=E5=9B=BE=E7=89=87=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=8F=92=E4=BB=B6=E9=97=AE=E9=A2=98=20=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=83=A8=E5=88=86=E6=BC=8F=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/report/SelectImagePane.java | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/SelectImagePane.java b/designer-realize/src/main/java/com/fr/design/report/SelectImagePane.java index ba57676ec..bcad15c76 100644 --- a/designer-realize/src/main/java/com/fr/design/report/SelectImagePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/SelectImagePane.java @@ -1,21 +1,18 @@ package com.fr.design.report; -import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.frpane.ImgChooseWrapper; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.style.background.image.ImageFileChooser; import com.fr.design.style.background.image.ImagePreviewPane; -import com.fr.design.utils.ImageUtils; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.ImageWithSuffix; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.report.cell.painter.CellImagePainter; import com.fr.stable.Constants; -import com.fr.stable.CoreGraphHelper; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; @@ -27,7 +24,6 @@ import java.awt.GridLayout; import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.image.BufferedImage; import java.io.File; /** @@ -44,8 +40,6 @@ public class SelectImagePane extends BasicPane { private Style imageStyle = null; - private Image previewImage = null; - private File imageFile; public SelectImagePane() { @@ -119,21 +113,8 @@ public class SelectImagePane extends BasicPane { .showOpenDialog(SelectImagePane.this); if (returnVal != JFileChooser.CANCEL_OPTION) { File selectedFile = imageFileChooser.getSelectedFile(); - - if (selectedFile != null && selectedFile.isFile()) { - String filePath = selectedFile.getPath(); - BufferedImage image = BaseUtils.readImage(filePath); - CoreGraphHelper.waitForImage(image); - - imageFile = selectedFile; - setImageStyle(); - previewPane.setImageWithSuffix(ImageWithSuffix.build(image, ImageUtils.getImageType(selectedFile))); - previewPane.setImageStyle(imageStyle); - previewImage = image; - } else { - previewPane.setImage(null); - } - previewPane.repaint(); + imageFile = selectedFile; + ImgChooseWrapper.getInstance(previewPane, imageFileChooser, imageStyle, null).dealWithImageFile(returnVal); } } }; @@ -202,7 +183,6 @@ public class SelectImagePane extends BasicPane { public void setImage(Image image) { previewPane.setImage(image); - this.previewImage = image; } public CellImage update() { From aa50c2eaa3d91e6562f3f1aca54f4201006a3fdb Mon Sep 17 00:00:00 2001 From: richie Date: Thu, 11 Jul 2019 19:36:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=94=B6=E9=9B=86=EF=BC=8C=E4=B8=BA=E4=BA=86=E8=A7=84?= =?UTF-8?q?=E9=81=BF=E8=8E=B7=E5=8F=96username=E8=A6=81=E5=9C=A8=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E4=B9=8B=E5=90=8E=EF=BC=8C=E5=86=99=E4=BA=86=E4=B8=AA?= =?UTF-8?q?=E4=B8=AD=E8=BD=AC=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/start/module/DesignerActivator.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index f360f24b9..fe423131d 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -3,8 +3,12 @@ package com.fr.start.module; import com.fr.base.BaseFormula; import com.fr.base.Formula; import com.fr.base.MultiFieldParameter; +import com.fr.base.passport.FinePassportListenerAdapter; +import com.fr.base.passport.FinePassportManager; import com.fr.base.process.ProcessOperator; import com.fr.chart.chartattr.ChartCollection; +import com.fr.config.MarketConfig; +import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.NewFormAction; import com.fr.design.actions.core.ActionFactory; @@ -129,6 +133,7 @@ public class DesignerActivator extends Activator { loadLogAppender(); DesignerSocketIO.update(); UserInfoPane.getInstance().updateBBSUserInfo(); + storePassport(); } private void loadLogAppender() { @@ -392,6 +397,16 @@ public class DesignerActivator extends Activator { StableFactory.registerMarkedObject(ElementCaseThumbnailProcessor.MARK_STRING, new ElementCaseThumbnail()); } + private static void storePassport() { + FinePassportManager.getInstance().storePassport(MarketConfig.getInstance().getBbsUsername(), DesignerEnvManager.getEnvManager().getActivationKey()); + FinePassportManager.getInstance().addPassportListener(new FinePassportListenerAdapter() { + @Override + public void onLoginSuccess() { + FinePassportManager.getInstance().storePassport(MarketConfig.getInstance().getBbsUsername(), DesignerEnvManager.getEnvManager().getActivationKey()); + } + }); + } + @Override public void stop() { unloadLogAppender();