From 34d8785d70fb6beb930d9f5c552eaebc292bc5e9 Mon Sep 17 00:00:00 2001 From: richie Date: Thu, 29 Nov 2018 17:55:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E6=95=B4?= =?UTF-8?q?=E7=90=86=E5=BC=80=E6=94=BE=E6=8E=A5=E5=8F=A3=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/fun/HyperlinkProvider.java | 31 ++++++++++++++++--- .../fun/impl/AbstractHyperlinkProvider.java | 24 ++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/HyperlinkProvider.java b/designer-base/src/main/java/com/fr/design/fun/HyperlinkProvider.java index 448a120fea..9b58b96898 100644 --- a/designer-base/src/main/java/com/fr/design/fun/HyperlinkProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/HyperlinkProvider.java @@ -1,21 +1,44 @@ package com.fr.design.fun; +import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameableCreator; -import com.fr.stable.fun.Level; +import com.fr.js.Hyperlink; import com.fr.stable.fun.mark.Mutable; /** * Created by zack on 2016/1/20. */ -public interface HyperlinkProvider extends Mutable { +public interface HyperlinkProvider extends Mutable { String XML_TAG = "HyperlinkProvider"; int CURRENT_LEVEL = 2; /** - * 创建一个超级连接类型 - * @return NameableCreator + * 超级链接的描述信息,如果是实现类中重载了这个方法,就不需要再实现下面的三个方法: + * @see HyperlinkProvider#text() + * @see HyperlinkProvider#target() + * @see HyperlinkProvider#appearance() + * 如果并不重载,就需要分别实现上面的三个方法,不推荐重载这个方法 + * @return 描述信息 */ NameableCreator createHyperlinkCreator(); + + /** + * 超级链接的名字 + * @return 名字 + */ + String text(); + + /** + * 超级链接的实现类 + * @return 实现类 + */ + Class target(); + + /** + * 超级链接的界面配置类 + * @return 配置类 + */ + Class> appearance(); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java index bc5d5115a8..9c74795d8e 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java @@ -1,6 +1,10 @@ package com.fr.design.fun.impl; +import com.fr.design.beans.BasicBeanPane; import com.fr.design.fun.HyperlinkProvider; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.stable.StringUtils; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -18,4 +22,24 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme public String mark4Provider() { return getClass().getName(); } + + @Override + public NameableCreator createHyperlinkCreator() { + return new NameObjectCreator(text(), target(), appearance()); + } + + @Override + public String text() { + return StringUtils.EMPTY; + } + + @Override + public Class target() { + return null; + } + + @Override + public Class appearance() { + return null; + } } \ No newline at end of file