From e681fde3c279cf9253638b25a1817c1b36962a6d Mon Sep 17 00:00:00 2001 From: fr_shine Date: Thu, 26 May 2016 14:22:46 +0800 Subject: [PATCH 1/3] api level --- .../src/com/fr/design/chart/fun/IndependentChartUIProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java index e2afed9948..a919143967 100644 --- a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java +++ b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java @@ -22,7 +22,7 @@ public interface IndependentChartUIProvider extends Level { String XML_TAG = "IndependentChartUIProvider"; - int CURRENT_API_LEVEL = 2; + int CURRENT_API_LEVEL = 3; /** * 图表的类型定义界面类型,就是属性表的第一个界面 From e4588625d90632b435a89b3c29df6151fa51f2b9 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Thu, 26 May 2016 19:36:12 +0800 Subject: [PATCH 2/3] old plugin level --- .../fun/impl/AbstractIndependentChartUIWithAPILevel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java index b1361b21f6..ffe91cd0d0 100644 --- a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java @@ -15,9 +15,13 @@ import com.fr.general.ComparatorUtils; * Created by Mitisky on 16/3/7. */ public abstract class AbstractIndependentChartUIWithAPILevel implements IndependentChartUIProvider { + private static final int OLD_PLUGIN_LEVEL = -2; + @Override + //以前的插件没有覆写这个方法,所以始终获取到-2,比当前level低,提示更新. + //新的插件编译进去的是当前LEVEL,当之后LEVEL增加,会比编译进去的LEVEL大,提示更新. public int currentAPILevel() { - return CURRENT_API_LEVEL; + return OLD_PLUGIN_LEVEL; } public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){ From 3594600c0d11175ac1c646af5a11423b6ebb0d37 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 9 Jun 2016 09:57:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=89=93=E9=96=8B=E5=A4=9A=E7=A8=AE?= =?UTF-8?q?=E4=BD=88=E5=B1=80=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/ibutton/UIButtonGroup.java | 10 ++-------- .../src/com/fr/design/gui/ibutton/UITabGroup.java | 7 ++----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index f12eec0cb2..8a266a2a1e 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -1,12 +1,6 @@ package com.fr.design.gui.ibutton; -import java.awt.BorderLayout; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.GridLayout; -import java.awt.Insets; -import java.awt.RenderingHints; -import java.awt.Shape; +import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -174,7 +168,7 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { return BorderFactory.createEmptyBorder(1, 1, 1, 1); } - protected GridLayout getGridLayout(int number) { + protected LayoutManager getGridLayout(int number) { return new GridLayout(0, number, 1, 0); } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java index 7f6ec850a2..406dc8bff7 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java @@ -1,9 +1,6 @@ package com.fr.design.gui.ibutton; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.GridLayout; -import java.awt.RenderingHints; +import java.awt.*; import javax.swing.BorderFactory; import javax.swing.Icon; @@ -38,7 +35,7 @@ public class UITabGroup extends UIButtonGroup { } @Override - protected GridLayout getGridLayout(int number) { + protected LayoutManager getGridLayout(int number) { if (number < BUTTON_NUMBER || isOneLineTab) { return super.getGridLayout(number); } else if (number == BUTTON_NUMBER || number == SEVEN_NUMBER) {