From abc43081b68f73186b1015b5fad4832555e01f31 Mon Sep 17 00:00:00 2001 From: hugh Date: Thu, 11 May 2017 12:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=94=AF=E6=8C=81=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/style/BackgroundSpecialPane.java | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/style/BackgroundSpecialPane.java b/designer_base/src/com/fr/design/gui/style/BackgroundSpecialPane.java index 43c1d133c..ca538e944 100644 --- a/designer_base/src/com/fr/design/gui/style/BackgroundSpecialPane.java +++ b/designer_base/src/com/fr/design/gui/style/BackgroundSpecialPane.java @@ -1,6 +1,12 @@ package com.fr.design.gui.style; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import com.fr.design.ExtraDesignClassManager; import com.fr.design.event.UIObserverListener; +import com.fr.design.fun.BackgroundQuickUIProvider; import com.fr.design.mainframe.backgroundpane.*; /** @@ -40,11 +46,26 @@ public class BackgroundSpecialPane extends BackgroundPane{ fireStateChanged(); } }); - return new BackgroundQuickPane[] { - new NullBackgroundQuickPane(), - colorBackgroundPane, - imageBackgroundPane, - gradientPane - }; + //hugh:表单支持背景接口 + List kinds = new ArrayList(); + + kinds.add(new NullBackgroundQuickPane()); + kinds.add(colorBackgroundPane); + kinds.add(imageBackgroundPane); + kinds.add(gradientPane); + + Set providers = ExtraDesignClassManager.getInstance().getArray(BackgroundQuickUIProvider.MARK_STRING); + for (BackgroundQuickUIProvider provider : providers) { + BackgroundQuickPane newTypePane = provider.appearanceForBackground(); + newTypePane.registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + fireStateChanged(); + } + }); + kinds.add(newTypePane); + } + + return kinds.toArray(new BackgroundQuickPane[kinds.size()]); } } \ No newline at end of file