From 7dbe35bb7ab7f923bdf94d6c69be41f370435e47 Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 27 Aug 2016 09:32:11 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=9C=A8=E5=AE=89=E8=A3=85=E6=8F=92=E4=BB=B6=E6=97=B6=E5=81=9A?= =?UTF-8?q?=E7=9A=84=E5=85=B6=E4=BB=96=E6=93=8D=E4=BD=9C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginHelper.java | 7 +++++++ .../fun/PluginInstallOptionProcessor.java | 19 ++++++++++++++++++ .../AbstractPluginInstallOptionProcessor.java | 20 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 8bab17e68e..c5fa5fcfb7 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -3,6 +3,8 @@ package com.fr.design.extra; import com.fr.base.Env; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.fun.PluginInstallOptionProcessor; import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.plugin.Plugin; @@ -192,6 +194,11 @@ public class PluginHelper { if (plugin == null) { throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Illegal_Plugin_Zip_Cannot_Be_Install")); } + PluginInstallOptionProcessor processor = ExtraDesignClassManager.getInstance().getSingle(PluginInstallOptionProcessor.MARK_STRING); + if (processor != null) { + processor.pluginInstallOption(); + } + if (PluginLoader.getLoader().isInstalled(plugin)) { throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Has_Been_Installed")); } diff --git a/designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java b/designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java new file mode 100644 index 0000000000..6302fe5c35 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java @@ -0,0 +1,19 @@ +package com.fr.design.fun; + +import com.fr.stable.fun.mark.Immutable; + +/** + * Created by Administrator on 2016/8/26. + */ +public interface PluginInstallOptionProcessor extends Immutable { + + String MARK_STRING = "PluginInstallOptionProcessor"; + + int CURRENT_LEVEL = 1; + + /** + * 安裝插件時的其他操作 + */ + void pluginInstallOption() throws Exception; +} + diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java new file mode 100644 index 0000000000..385da7252a --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java @@ -0,0 +1,20 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.PluginInstallOptionProcessor; +import com.fr.stable.fun.mark.API; + +/** + * Created by Administrator on 2016/8/26. + */ +@API(level = PluginInstallOptionProcessor.CURRENT_LEVEL) +public abstract class AbstractPluginInstallOptionProcessor implements PluginInstallOptionProcessor{ + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } + + +} From 89ce432aaa1ec6182e1b0bce53a867bec47ef055 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 29 Aug 2016 10:05:35 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginHelper.java | 7 ------- .../fun/PluginInstallOptionProcessor.java | 19 ------------------ .../AbstractPluginInstallOptionProcessor.java | 20 ------------------- 3 files changed, 46 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java delete mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index c5fa5fcfb7..8bab17e68e 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -3,8 +3,6 @@ package com.fr.design.extra; import com.fr.base.Env; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; -import com.fr.design.ExtraDesignClassManager; -import com.fr.design.fun.PluginInstallOptionProcessor; import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.plugin.Plugin; @@ -194,11 +192,6 @@ public class PluginHelper { if (plugin == null) { throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Illegal_Plugin_Zip_Cannot_Be_Install")); } - PluginInstallOptionProcessor processor = ExtraDesignClassManager.getInstance().getSingle(PluginInstallOptionProcessor.MARK_STRING); - if (processor != null) { - processor.pluginInstallOption(); - } - if (PluginLoader.getLoader().isInstalled(plugin)) { throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Has_Been_Installed")); } diff --git a/designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java b/designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java deleted file mode 100644 index 6302fe5c35..0000000000 --- a/designer_base/src/com/fr/design/fun/PluginInstallOptionProcessor.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.fr.design.fun; - -import com.fr.stable.fun.mark.Immutable; - -/** - * Created by Administrator on 2016/8/26. - */ -public interface PluginInstallOptionProcessor extends Immutable { - - String MARK_STRING = "PluginInstallOptionProcessor"; - - int CURRENT_LEVEL = 1; - - /** - * 安裝插件時的其他操作 - */ - void pluginInstallOption() throws Exception; -} - diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java deleted file mode 100644 index 385da7252a..0000000000 --- a/designer_base/src/com/fr/design/fun/impl/AbstractPluginInstallOptionProcessor.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.fr.design.fun.impl; - -import com.fr.design.fun.PluginInstallOptionProcessor; -import com.fr.stable.fun.mark.API; - -/** - * Created by Administrator on 2016/8/26. - */ -@API(level = PluginInstallOptionProcessor.CURRENT_LEVEL) -public abstract class AbstractPluginInstallOptionProcessor implements PluginInstallOptionProcessor{ - public int currentAPILevel() { - return CURRENT_LEVEL; - } - - public int layerIndex() { - return DEFAULT_LAYER_INDEX; - } - - -} From aeb14505debbf2f4113060123f6fe07f69c956f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=94=80?= Date: Wed, 14 Sep 2016 15:56:12 +0800 Subject: [PATCH 03/15] =?UTF-8?q?bugfix=EF=BC=9A=E4=BB=8E=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=AE=A1=E7=90=86=E9=87=8C=E9=9D=A2=E7=99=BB=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E6=88=B7=E5=90=8D=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/extra/LoginWebBridge.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index c1c32b11fd..482dde4903 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -254,7 +254,7 @@ public class LoginWebBridge { String loginResult = login(username, password); if (loginResult.equals(LOGININ)) { updateUserInfo(username, password); - loginSuccess(username); + loginSuccess(username, uiLabel); setUserName(username, uiLabel); } return loginResult; @@ -287,7 +287,7 @@ public class LoginWebBridge { * 关闭窗口并且重新赋值 * @param username */ - public void loginSuccess(String username) { + public void loginSuccess(String username, UILabel uiLabel) { closeWindow(); uiLabel.setText(username); } From 0af416d3cdcd1d5bc500c160121e6acd84e78361 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Wed, 14 Sep 2016 16:49:26 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_chart/src/com/fr/design/chart/ChartTypePane.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index 5cc09a3b4e..dcff11869a 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -35,6 +35,9 @@ public class ChartTypePane extends ChartCommonWizardPane { charts4Icon[i] = new Chart[rowChartsCount]; for (int j = 0; j < rowChartsCount; j++) { try { + //此时,为图片生成模型数据 + rowCharts[j].createSlotImage(); + //获取图片模型 charts4Icon[i][j] = (Chart) rowCharts[j].clone(); charts4Icon[i][j].setTitle(null); if(charts4Icon[i][j].getPlot() != null){ From c0675ef3f738d14023c8bc07e956c7feeefd23af Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Wed, 14 Sep 2016 17:17:58 +0800 Subject: [PATCH 05/15] update --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 12 ++++++++++++ .../src/com/fr/design/chart/ChartTypePane.java | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 1d5cd101a8..2dfb2b8cdd 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -94,6 +94,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if(rowChart == null) { continue; } + + //初始化图表模型图片 + initChartsDemoImage(rowChart); + String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); @@ -101,6 +105,14 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return child; } + private static void initChartsDemoImage(Chart[] rowChart) { + int rowChartsCount = rowChart.length; + for (int j = 0; j < rowChartsCount; j++) { + //此时,为图片生成模型数据 + rowChart[j].createSlotImage(); + } + } + private synchronized static void envChanged() { classManager = null; } diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index dcff11869a..9ef53f9bf0 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -35,8 +35,6 @@ public class ChartTypePane extends ChartCommonWizardPane { charts4Icon[i] = new Chart[rowChartsCount]; for (int j = 0; j < rowChartsCount; j++) { try { - //此时,为图片生成模型数据 - rowCharts[j].createSlotImage(); //获取图片模型 charts4Icon[i][j] = (Chart) rowCharts[j].clone(); charts4Icon[i][j].setTitle(null); From 650d29a1f40bfde51f456f814cedaafdd2922c20 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Wed, 14 Sep 2016 17:19:32 +0800 Subject: [PATCH 06/15] update --- designer_chart/src/com/fr/design/chart/ChartTypePane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index 9ef53f9bf0..5cc09a3b4e 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -35,7 +35,6 @@ public class ChartTypePane extends ChartCommonWizardPane { charts4Icon[i] = new Chart[rowChartsCount]; for (int j = 0; j < rowChartsCount; j++) { try { - //获取图片模型 charts4Icon[i][j] = (Chart) rowCharts[j].clone(); charts4Icon[i][j].setTitle(null); if(charts4Icon[i][j].getPlot() != null){ From 34c7a1b08027645289d200754892c98f0717e350 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Sun, 18 Sep 2016 11:57:49 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E7=9A=84=E6=97=B6=E5=80=99=E6=B2=A1=E6=9C=89=E5=80=BC?= =?UTF-8?q?=EF=BC=8C=E5=9C=A8=E8=B0=83=E7=94=A8=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=8E=BB=E5=8F=96=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/extra/ucenter/Client.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/extra/ucenter/Client.java b/designer_base/src/com/fr/design/extra/ucenter/Client.java index eeb6cd57eb..9f7d27b225 100644 --- a/designer_base/src/com/fr/design/extra/ucenter/Client.java +++ b/designer_base/src/com/fr/design/extra/ucenter/Client.java @@ -19,7 +19,7 @@ import java.util.Map; public class Client extends PHPFunctions{ public static String UC_IP = "211.149.195.54"; - public static String UC_API = SiteCenter.getInstance().acquireUrlByKind("bbs.ucapi"); + public static String UC_API = ""; public static String UC_CONNECT = ""; public static String UC_KEY = "Rc85U37411p4zdvcedm8D4t4D3l9Sa42H0kd98Gbd82aA99a61S2Z5LbQ9u430M0"; public static String UC_APPID = "4"; @@ -86,6 +86,7 @@ public class Client extends PHPFunctions{ sep = "&"; } String $postdata = uc_api_requestdata(module, action, str.toString(), ""); + UC_API = SiteCenter.getInstance().acquireUrlByKind("bbs.ucapi"); return uc_fopen2(UC_API + "/index.php", 500000, $postdata, "", true, UC_IP, 20, true); } From c1e3dbf04eb7a3efe92b1a840d243ec1b9bdf69d Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Sun, 18 Sep 2016 16:58:44 +0800 Subject: [PATCH 08/15] =?UTF-8?q?ip=E9=83=A8=E5=88=86=20sitecenter?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bugfix:按钮初始化内容 --- designer_base/src/com/fr/design/extra/QQLoginWebPane.java | 3 +-- designer_base/src/com/fr/design/extra/ucenter/Client.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/QQLoginWebPane.java b/designer_base/src/com/fr/design/extra/QQLoginWebPane.java index 2d950bb112..5861bb9ed1 100644 --- a/designer_base/src/com/fr/design/extra/QQLoginWebPane.java +++ b/designer_base/src/com/fr/design/extra/QQLoginWebPane.java @@ -150,7 +150,6 @@ public class QQLoginWebPane extends JFXPanel { final BooleanProperty confirmationResult = new SimpleBooleanProperty(); // initialize the confirmation dialog final Stage dialog = new Stage(StageStyle.UTILITY); - dialog.setTitle(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")); dialog.setX(Toolkit.getDefaultToolkit().getScreenSize().getWidth()/2 - DEFAULT_CONFIRM_WIDTH / 2 + DEFAULT_OFFEST); dialog.setY(Toolkit.getDefaultToolkit().getScreenSize().getHeight()/2 + DEFAULT_OFFEST); dialog.setHeight(DEFAULT_CONFIRM_HEIGHT); @@ -162,7 +161,7 @@ public class QQLoginWebPane extends JFXPanel { new Scene( HBoxBuilder.create().styleClass("modal-dialog").children( LabelBuilder.create().text(msg).build(), - ButtonBuilder.create().text(Inter.getLocText("")).defaultButton(true).onAction(new EventHandler() { + ButtonBuilder.create().text(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")).defaultButton(true).onAction(new EventHandler() { @Override public void handle(ActionEvent actionEvent) { // take action and close the dialog. confirmationResult.set(true); diff --git a/designer_base/src/com/fr/design/extra/ucenter/Client.java b/designer_base/src/com/fr/design/extra/ucenter/Client.java index 9f7d27b225..d63d48bd6f 100644 --- a/designer_base/src/com/fr/design/extra/ucenter/Client.java +++ b/designer_base/src/com/fr/design/extra/ucenter/Client.java @@ -18,7 +18,7 @@ import java.util.Map; */ public class Client extends PHPFunctions{ - public static String UC_IP = "211.149.195.54"; + public static String UC_IP = ""; public static String UC_API = ""; public static String UC_CONNECT = ""; public static String UC_KEY = "Rc85U37411p4zdvcedm8D4t4D3l9Sa42H0kd98Gbd82aA99a61S2Z5LbQ9u430M0"; @@ -87,6 +87,7 @@ public class Client extends PHPFunctions{ } String $postdata = uc_api_requestdata(module, action, str.toString(), ""); UC_API = SiteCenter.getInstance().acquireUrlByKind("bbs.ucapi"); + UC_IP = SiteCenter.getInstance().acquireUrlByKind("bbs.ip"); return uc_fopen2(UC_API + "/index.php", 500000, $postdata, "", true, UC_IP, 20, true); } From b07345407484dca0b4794a29eb71888d0735950b Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 19 Sep 2016 16:18:35 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E6=97=A5=E6=96=87=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E6=8A=A5=E8=A1=A8Web=E5=B1=9E=E6=80=A7=5F?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E9=A1=B5=E9=9D=A2=E8=AE=BE=E7=BD=AE=E6=8E=92?= =?UTF-8?q?=E7=89=88=E9=97=AE=E9=A2=98=EF=BC=8C=E6=8A=8A=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E6=8E=92=E6=8C=89=E9=92=AE=E9=81=AE=E4=BD=8F=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E7=8E=B0=E8=AE=BE=E7=BD=AE=E6=B0=B4=E5=B9=B3=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/icontainer/UIScrollPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIScrollPane.java b/designer_base/src/com/fr/design/gui/icontainer/UIScrollPane.java index 62a580c385..5c71efc7a0 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIScrollPane.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIScrollPane.java @@ -15,7 +15,7 @@ public class UIScrollPane extends JScrollPane { private static final long serialVersionUID = 1L; public UIScrollPane(Component c) { - super(c, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + super(c, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); this.setHorizontalScrollBar(createHorizontalScrollBar()); this.getVerticalScrollBar().setUnitIncrement(30); this.getVerticalScrollBar().setBlockIncrement(30); From 56e4b211a3dd76abfa19b8c8e44a497e9f5290db Mon Sep 17 00:00:00 2001 From: loy Date: Tue, 20 Sep 2016 09:49:13 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E5=B0=86=E2=80=9C=E8=BD=BB=E9=87=8F?= =?UTF-8?q?=E9=87=8D=E8=BE=93=E5=87=BA=E2=80=9D=E5=86=99=E6=88=90=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=8E=9F=E6=9D=A5=E7=9A=84?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/webattr/PageToolBarPane.java | 6 ------ .../src/com/fr/design/webattr/PageWebSettingPane.java | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/designer/src/com/fr/design/webattr/PageToolBarPane.java b/designer/src/com/fr/design/webattr/PageToolBarPane.java index 105d17353c..b9e8c2bf72 100644 --- a/designer/src/com/fr/design/webattr/PageToolBarPane.java +++ b/designer/src/com/fr/design/webattr/PageToolBarPane.java @@ -34,7 +34,6 @@ public class PageToolBarPane extends AbstractEditToolBarPane { private UICheckBox isShowAsImageBox; private UICheckBox isAutoScaleBox; private UICheckBox isTDHeavyBox; - private UICheckBox isTDHeavyUseLightBox; private EventPane eventPane; private UILabel showLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":"); @@ -60,8 +59,6 @@ public class PageToolBarPane extends AbstractEditToolBarPane { north.add(GUICoreUtils.createFlowPane(isAutoScaleBox, FlowLayout.LEFT)); isTDHeavyBox = new UICheckBox(Inter.getLocText("FR-Designer_IS_TD_HEAVY_EXPORT"), false); north.add(GUICoreUtils.createFlowPane(isTDHeavyBox, FlowLayout.LEFT)); - isTDHeavyUseLightBox = new UICheckBox(Inter.getLocText("FR-Designer_USE_TD_HEAVY_LIGHT"), false); - north.add(GUICoreUtils.createFlowPane(isTDHeavyUseLightBox, FlowLayout.LEFT)); editToolBarButton.addActionListener(editBtnListener); isUseToolBarCheckBox.setSelected(true); @@ -96,7 +93,6 @@ public class PageToolBarPane extends AbstractEditToolBarPane { this.centerRadioButton.setEnabled(isEnabled); this.eventPane.setEnabled(isEnabled); this.isTDHeavyBox.setEnabled(isEnabled); - this.isTDHeavyUseLightBox.setEnabled(isEnabled); this.isAutoScaleBox.setEnabled(isEnabled); this.isShowAsImageBox.setEnabled(isEnabled); this.leftRadioButton.setEnabled(isEnabled); @@ -126,7 +122,6 @@ public class PageToolBarPane extends AbstractEditToolBarPane { isShowAsImageBox.setSelected(webPage.isShowAsImage()); isAutoScaleBox.setSelected(webPage.isAutoScaleWhenEmbeddedInIframe()); isTDHeavyBox.setSelected(webPage.isTDHeavy()); - isTDHeavyUseLightBox.setSelected(webPage.isLightTDHeavy()); if (webPage.isUseToolBar()) { this.toolBarManagers = webPage.getToolBarManagers(); this.isUseToolBarCheckBox.setSelected(true); @@ -161,7 +156,6 @@ public class PageToolBarPane extends AbstractEditToolBarPane { webPage.setShowAsImage(isShowAsImageBox.isSelected()); webPage.setAutoScaleWhenEmbeddedInIframe(isAutoScaleBox.isSelected()); webPage.setTDHeavy(isTDHeavyBox.isSelected()); - webPage.setLightTDHeavy(isTDHeavyUseLightBox.isSelected()); return webPage; } diff --git a/designer/src/com/fr/design/webattr/PageWebSettingPane.java b/designer/src/com/fr/design/webattr/PageWebSettingPane.java index e38240c366..504687e891 100644 --- a/designer/src/com/fr/design/webattr/PageWebSettingPane.java +++ b/designer/src/com/fr/design/webattr/PageWebSettingPane.java @@ -29,7 +29,6 @@ public class PageWebSettingPane extends WebSettingPane { private UICheckBox isShowAsImageBox; private UICheckBox isAutoScaleBox; private UICheckBox isTDHeavyBox; - private UICheckBox isTDHeavyUseLightBox; public PageWebSettingPane() { super(); @@ -49,14 +48,13 @@ public class PageWebSettingPane extends WebSettingPane { isShowAsImageBox = new UICheckBox(Inter.getLocText("Is_Paint_Page")); isAutoScaleBox = new UICheckBox(Inter.getLocText("IS_Auto_Scale")); isTDHeavyBox = new UICheckBox(Inter.getLocText("IS_TD_HEAVY_EXPORT"), false); - isTDHeavyUseLightBox = new UICheckBox(Inter.getLocText("USE_TD_HEAVY_LIGHT"), false); double p = TableLayout.PREFERRED; double[] columnSize = { p,p,p}; double[] rowSize = { p, p,p,p }; Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Report_Show_Location") + ":", UILabel.RIGHT), buttonpane,null}, new Component[]{new UILabel(Inter.getLocText("PageSetup-Page") + ":", UILabel.RIGHT), isShowAsImageBox, isAutoScaleBox}, - new Component[]{null, isTDHeavyBox, isTDHeavyUseLightBox} + new Component[]{null, isTDHeavyBox, null} }; return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); @@ -71,7 +69,6 @@ public class PageWebSettingPane extends WebSettingPane { isShowAsImageBox.setEnabled(isSelected); isAutoScaleBox.setEnabled(isSelected); isTDHeavyBox.setEnabled(isSelected); - isTDHeavyUseLightBox.setEnabled(isSelected); } protected void setDefault(){ super.setDefault(); @@ -79,7 +76,6 @@ public class PageWebSettingPane extends WebSettingPane { isShowAsImageBox.setSelected(false); isAutoScaleBox.setSelected(false); isTDHeavyBox.setSelected(false); - isTDHeavyUseLightBox.setSelected(false); } @Override protected void populateSubWebSettingrBean(WebPage webPage) { @@ -95,7 +91,6 @@ public class PageWebSettingPane extends WebSettingPane { isShowAsImageBox.setSelected(webPage.isShowAsImage()); isAutoScaleBox.setSelected(webPage.isAutoScaleWhenEmbeddedInIframe()); isTDHeavyBox.setSelected(webPage.isTDHeavy()); - isTDHeavyUseLightBox.setSelected(webPage.isLightTDHeavy()); } @Override @@ -105,7 +100,6 @@ public class PageWebSettingPane extends WebSettingPane { webPage.setShowAsImage(isShowAsImageBox.isSelected()); webPage.setAutoScaleWhenEmbeddedInIframe(isAutoScaleBox.isSelected()); webPage.setTDHeavy(isTDHeavyBox.isSelected()); - webPage.setLightTDHeavy(isTDHeavyUseLightBox.isSelected()); return webPage; } From 7afeb646a28a9367cac208a582af43004d992ed1 Mon Sep 17 00:00:00 2001 From: zhouping Date: Wed, 21 Sep 2016 17:31:17 +0800 Subject: [PATCH 11/15] =?UTF-8?q?REPORT-341:=E8=A1=A8=E5=8D=95=E4=B8=8B?= =?UTF-8?q?=E8=BE=B9=E8=B7=9D=E8=AE=BE=E7=BD=AE=E6=AF=94=E8=BE=83=E5=A4=A7?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99,=20=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=BA=8C=E5=88=86=E5=87=BA=E6=9D=A5=E6=95=88=E6=9E=9C=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/designer/creator/XWFitLayout.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java index 8f4df6e749..20b12d8881 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java @@ -53,6 +53,8 @@ public class XWFitLayout extends XLayoutContainer { super(widget, initSize); initPercent(); + + widget.setResolutionScaling(containerPercent); } //根据屏幕大小来确定显示的百分比, 1440*900默认100%, 1366*768缩放90% From 8ac23ad7c7c318f3062a93190e3ba8f02014ed43 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 22 Sep 2016 16:02:14 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DownLoadDependenceUI.java | 71 +++++++++++++++++-- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 5b0de740c7..67d3a03544 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -20,12 +20,14 @@ import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; +import java.io.*; import java.net.HttpURLConnection; -import java.util.ArrayList; +import java.util.Enumeration; import java.util.List; + +import org.apache.tools.zip.ZipEntry; +import org.apache.tools.zip.ZipFile; + /** * Created by hufan on 2016/9/5. */ @@ -198,7 +200,7 @@ public class DownLoadDependenceUI implements ActionListener { } //安装文件 - IOUtils.unzip(new File(temp), FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); + unZipFiles(temp, FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); } else { result = false; @@ -254,14 +256,12 @@ public class DownLoadDependenceUI implements ActionListener { int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Plugin_Plugin") + Inter.getLocText("FR-Designer-Need") + Inter.getLocText("FR-Designer-Dependence") + Inter.getLocText("FR-Designer-Support") + "," + Inter.getLocText("FR-Designer-Dependence_Need_Install") + "(" + showFileLength() + " m)?", "install tooltip", JOptionPane.YES_NO_OPTION); if (choose == 0) {//下载安装 if (!connectToServer()) { - //JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error"), "alert", JOptionPane.ERROR_MESSAGE); throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error")); } //安装依赖环境 if (install()) { JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Succeed") + "!!"); } else { - //JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Failed") + "!!", "alert", JOptionPane.ERROR_MESSAGE); throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Install_Failed")); } }else {//不选择下载,则不安装图标插件 @@ -272,4 +272,61 @@ public class DownLoadDependenceUI implements ActionListener { private String showFileLength() { return totalSize == -1 ? "NAN" : totalSize / Math.pow(10, 6) + ""; } + + + @SuppressWarnings("unchecked") + public static boolean unZipFiles(String zipFileName, String extPlace) throws Exception { + System.setProperty("sun.zip.encoding", System.getProperty("sun.jnu.encoding")); + try { + (new File(extPlace)).mkdirs(); + File f = new File(zipFileName); + ZipFile zipFile = new ZipFile(zipFileName,"GBK"); //处理中文文件名乱码的问题 + if((!f.exists()) && (f.length() <= 0)) { + throw new Exception("no zip file!"); + } + String strPath, gbkPath, strtemp; + File tempFile = new File(extPlace); + strPath = tempFile.getAbsolutePath(); + Enumeration e = zipFile.getEntries(); + while(e.hasMoreElements()){ + ZipEntry zipEnt = (ZipEntry) e.nextElement(); + gbkPath=zipEnt.getName(); + if(zipEnt.isDirectory()){ + strtemp = strPath + File.separator + gbkPath; + File dir = new File(strtemp); + dir.mkdirs(); + continue; + } else { + //读写文件 + InputStream is = zipFile.getInputStream(zipEnt); + BufferedInputStream bis = new BufferedInputStream(is); + gbkPath=zipEnt.getName(); + strtemp = strPath + File.separator + gbkPath; + + //建目录 + String strsubdir = gbkPath; + for(int i = 0; i < strsubdir.length(); i++) { + if(strsubdir.substring(i, i + 1).equalsIgnoreCase("/")) { + String temp = strPath + File.separator + strsubdir.substring(0, i); + File subdir = new File(temp); + if(!subdir.exists()) + subdir.mkdir(); + } + } + FileOutputStream fos = new FileOutputStream(strtemp); + BufferedOutputStream bos = new BufferedOutputStream(fos); + int c; + while((c = bis.read()) != -1) { + bos.write((byte) c); + } + bos.close(); + fos.close(); + } + } + return true; + } catch(Exception e) { + FRContext.getLogger().info(e.getMessage()); + return false; + } + } } From 3ace747624f84006b0ff2d932e284160bdf87ab5 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 22 Sep 2016 16:18:23 +0800 Subject: [PATCH 13/15] update --- .../DownLoadDependenceUI.java | 59 +------------------ 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 67d3a03544..9edfc21fe7 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -200,7 +200,7 @@ public class DownLoadDependenceUI implements ActionListener { } //安装文件 - unZipFiles(temp, FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); + IOUtils.unZipFilesGBK(temp, FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); } else { result = false; @@ -272,61 +272,4 @@ public class DownLoadDependenceUI implements ActionListener { private String showFileLength() { return totalSize == -1 ? "NAN" : totalSize / Math.pow(10, 6) + ""; } - - - @SuppressWarnings("unchecked") - public static boolean unZipFiles(String zipFileName, String extPlace) throws Exception { - System.setProperty("sun.zip.encoding", System.getProperty("sun.jnu.encoding")); - try { - (new File(extPlace)).mkdirs(); - File f = new File(zipFileName); - ZipFile zipFile = new ZipFile(zipFileName,"GBK"); //处理中文文件名乱码的问题 - if((!f.exists()) && (f.length() <= 0)) { - throw new Exception("no zip file!"); - } - String strPath, gbkPath, strtemp; - File tempFile = new File(extPlace); - strPath = tempFile.getAbsolutePath(); - Enumeration e = zipFile.getEntries(); - while(e.hasMoreElements()){ - ZipEntry zipEnt = (ZipEntry) e.nextElement(); - gbkPath=zipEnt.getName(); - if(zipEnt.isDirectory()){ - strtemp = strPath + File.separator + gbkPath; - File dir = new File(strtemp); - dir.mkdirs(); - continue; - } else { - //读写文件 - InputStream is = zipFile.getInputStream(zipEnt); - BufferedInputStream bis = new BufferedInputStream(is); - gbkPath=zipEnt.getName(); - strtemp = strPath + File.separator + gbkPath; - - //建目录 - String strsubdir = gbkPath; - for(int i = 0; i < strsubdir.length(); i++) { - if(strsubdir.substring(i, i + 1).equalsIgnoreCase("/")) { - String temp = strPath + File.separator + strsubdir.substring(0, i); - File subdir = new File(temp); - if(!subdir.exists()) - subdir.mkdir(); - } - } - FileOutputStream fos = new FileOutputStream(strtemp); - BufferedOutputStream bos = new BufferedOutputStream(fos); - int c; - while((c = bis.read()) != -1) { - bos.write((byte) c); - } - bos.close(); - fos.close(); - } - } - return true; - } catch(Exception e) { - FRContext.getLogger().info(e.getMessage()); - return false; - } - } } From b9e4c576f49232ef8d344cb25276be32239afa8e Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 22 Sep 2016 16:19:16 +0800 Subject: [PATCH 14/15] update --- .../design/extra/plugindependence/DownLoadDependenceUI.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 9edfc21fe7..eb7af116bf 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -22,12 +22,8 @@ import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import java.io.*; import java.net.HttpURLConnection; -import java.util.Enumeration; import java.util.List; -import org.apache.tools.zip.ZipEntry; -import org.apache.tools.zip.ZipFile; - /** * Created by hufan on 2016/9/5. */ From 5ec25e6264a8e582dffcc36c10fec37ed207a457 Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 22 Sep 2016 20:19:01 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E5=85=B1?= =?UTF-8?q?=E4=BA=AB=E6=8C=89=E9=92=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fun/DesignerFrameUpButtonProvider.java | 24 +++++++++++++++++++ .../AbstractDsinFrameUpButtonProvider.java | 23 ++++++++++++++++++ .../fr/design/mainframe/DesignerFrame.java | 19 +++++++++++++++ .../com/fr/design/mainframe/JTemplate.java | 24 ++++++++++++++++++- 4 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/fun/DesignerFrameUpButtonProvider.java create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java diff --git a/designer_base/src/com/fr/design/fun/DesignerFrameUpButtonProvider.java b/designer_base/src/com/fr/design/fun/DesignerFrameUpButtonProvider.java new file mode 100644 index 0000000000..b6a86ae81c --- /dev/null +++ b/designer_base/src/com/fr/design/fun/DesignerFrameUpButtonProvider.java @@ -0,0 +1,24 @@ +package com.fr.design.fun; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.stable.fun.mark.Mutable; + +/** + * 设计器面板最上方的按钮接口(保存,赋值,撤销同级) + * Coder: zack + * Date: 2016/9/22 + * Time: 15:40 + */ +public interface DesignerFrameUpButtonProvider extends Mutable { + + int CURRENT_LEVEL = 1; + + String XML_TAG = "DesignerFrameUpButtonProvider"; + + /** + * 根据当前的设计状态返回最上层工具按钮 + * @param menuState 现在设计器的设计状态 + * @return 按钮 + */ + UIButton[] getUpButtons(int menuState); +} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java new file mode 100644 index 0000000000..bd1f70829b --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java @@ -0,0 +1,23 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.DesignerFrameUpButtonProvider; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.stable.fun.mark.API; + +/** + * Coder: zack + * Date: 2016/9/22 + * Time: 15:50 + */ +@API(level = DesignerFrameUpButtonProvider.CURRENT_LEVEL) +public abstract class AbstractDsinFrameUpButtonProvider implements DesignerFrameUpButtonProvider { + @Override + public UIButton[] getUpButtons(int menuState) { + return new UIButton[0]; + } + + @Override + public String mark4Provider() { + return getClass().getName(); + } +} diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index a1f5f16a4b..329b631552 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -464,9 +464,28 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta //添加分享按钮 addShareButton(); + + //添加插件中的按钮 + addExtraButtons(); return combineUp; } + + private void addExtraButtons(){ + JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if(jt == null){ + return; + } + + + UIButton[] extraButtons = jt.createExtraButtons(); + for (int i = 0; i < extraButtons.length; i++) { + combineUp.add(extraButtons[i]); + } + if (extraButtons.length > 0) { + combineUp.addSeparator(new Dimension(2, 16)); + } + } private void addShareButton(){ JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 8478e2500d..58060d91a9 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -8,8 +8,8 @@ import com.fr.base.io.IOFile; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.TableDataSourceAction; -import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.edit.RedoAction; import com.fr.design.actions.edit.UndoAction; import com.fr.design.actions.file.SaveAsTemplateAction; @@ -19,6 +19,7 @@ import com.fr.design.designer.TargetComponent; import com.fr.design.dialog.InformationWarnPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.TemplateTreePane; +import com.fr.design.fun.DesignerFrameUpButtonProvider; import com.fr.design.fun.MenuHandler; import com.fr.design.fun.PreviewProvider; import com.fr.design.gui.frpane.HyperlinkGroupPane; @@ -37,9 +38,12 @@ import com.fr.file.FILE; import com.fr.file.FILEChooserPane; import com.fr.file.FileNodeFILE; import com.fr.file.MemFILE; +import com.fr.form.ui.NoneWidget; +import com.fr.form.ui.Widget; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; @@ -51,6 +55,7 @@ import java.awt.*; import java.io.File; import java.util.ArrayList; import java.util.Arrays; +import java.util.Set; import java.util.regex.Pattern; /** @@ -505,6 +510,9 @@ public abstract class JTemplate> ex public boolean saveShareFile(){ return true; } + public Widget getSelectElementCase(){ + return new NoneWidget(); + } protected FILEChooserPane getFILEChooserPane(boolean isShowLoc){ return new FILEChooserPane(true, isShowLoc); @@ -957,4 +965,18 @@ public abstract class JTemplate> ex public boolean acceptToolbarItem(Class clazz) { return true; } + + /** + * 加载插件中的按钮 + * @return 按钮组 + */ + public UIButton[] createExtraButtons() { + Set providers = ExtraDesignClassManager.getInstance().getArray(DesignerFrameUpButtonProvider.XML_TAG); + UIButton[] uiButtons = new UIButton[0]; + for (DesignerFrameUpButtonProvider provider : providers) { + uiButtons = ArrayUtils.addAll(uiButtons, provider.getUpButtons(getMenuState())); + } + + return uiButtons; + } } \ No newline at end of file