forked from fanruan/design
Browse Source
* commit 'bebd51531702a1ba8b915e8b1b57fde24709946c': (261 commits) REPORT-27647 模板组件的安装下载-模板组件复用插件 调整暴露的接口,返回合适的接口 去掉多余接口 REPORT-27647 模板组件的安装下载-模板组件复用插件 删掉多余的设计 REPORT-27647 模板组件的安装下载-模板组件复用插件 1、抽出一个更通用的接口来添加面板 2、为共享加载器添加插件实现 REPORT-27647 模板组件的安装下载-模板组件复用插件 1、空字符串 2、判空 3、接口 xml 去掉 main 函数 REPORT-27647 模板组件的安装下载-模板组件复用插件 ui 界面 1、 本地组件库界面 2、 小圆点设计 方法名修改 设计器启动后,对初始环境做一次检测 无任务,编译失败 REPORT-27280 程序数据集支持刷新出所需参数 支持在选中 class 后,刷新出参数 无jira任务,import需要依赖third REPORT-27189 切换到单机环境,鼠标悬停在版本管理上,提示错误 无jira任务, 冲突修复 MOBILE-25614 && MOBILE-25605 REPORT-27138 && REPORT-27137 && REPORT-27109 && REPORT-27140 ct ct ct ct ...persist/11.0
richie
5 years ago
487 changed files with 12982 additions and 3487 deletions
@ -0,0 +1,94 @@
|
||||
package com.fr.design.dialog; |
||||
|
||||
import com.fr.design.gui.ibutton.UIButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.FRFont; |
||||
|
||||
import javax.swing.JDialog; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.JTextArea; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Dimension; |
||||
import java.awt.FlowLayout; |
||||
import java.awt.Font; |
||||
import java.awt.Frame; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2020/1/8 |
||||
*/ |
||||
public abstract class ErrorDialog extends JDialog implements ActionListener { |
||||
|
||||
private UIButton okButton; |
||||
private UIButton restartButton; |
||||
|
||||
|
||||
public ErrorDialog(Frame parent, String message, String title, String detail) { |
||||
super(parent, true); |
||||
JPanel northPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
JPanel messagePane = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); |
||||
UILabel boldFontLabel = new UILabel(message); |
||||
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Send_Report_To_Us")); |
||||
Font font = FRFont.getInstance("Dialog", Font.BOLD, 20); |
||||
boldFontLabel.setFont(font); |
||||
messagePane.add(boldFontLabel); |
||||
messagePane.add(label); |
||||
northPane.add(messagePane); |
||||
|
||||
JTextArea area = new JTextArea(detail); |
||||
area.setPreferredSize(new Dimension(400, 100)); |
||||
area.setEnabled(true); |
||||
area.setEditable(false); |
||||
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
UILabel detailLabel = new UILabel(Toolkit.i18nText("Fine-Design_Problem_Detail_Message")); |
||||
centerPane.add(detailLabel, BorderLayout.NORTH); |
||||
centerPane.add(area, BorderLayout.CENTER); |
||||
|
||||
JPanel southPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
JPanel buttonPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); |
||||
okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Ok")); |
||||
okButton.addActionListener(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
okEvent(); |
||||
} |
||||
}); |
||||
buttonPane.add(okButton); |
||||
restartButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Restart")); |
||||
restartButton.addActionListener(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
restartEvent(); |
||||
} |
||||
}); |
||||
buttonPane.add(restartButton); |
||||
controlPane.add(buttonPane, BorderLayout.EAST); |
||||
southPane.add(controlPane); |
||||
|
||||
this.setTitle(title); |
||||
this.setResizable(false); |
||||
this.add(northPane, BorderLayout.NORTH); |
||||
this.add(centerPane, BorderLayout.CENTER); |
||||
this.add(southPane, BorderLayout.SOUTH); |
||||
this.setSize(new Dimension(600, 500)); |
||||
GUICoreUtils.centerWindow(this); |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
dispose(); |
||||
} |
||||
|
||||
protected abstract void okEvent(); |
||||
|
||||
protected abstract void restartEvent(); |
||||
|
||||
} |
@ -0,0 +1,290 @@
|
||||
package com.fr.design.dialog; |
||||
|
||||
import com.fr.invoke.Reflect; |
||||
|
||||
import javax.swing.Icon; |
||||
import javax.swing.JDialog; |
||||
import javax.swing.JOptionPane; |
||||
import java.awt.Component; |
||||
import java.awt.HeadlessException; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author Joe |
||||
* @version 10.0 |
||||
* Created by Joe on 12/5/2019 |
||||
*/ |
||||
public class FineJOptionPane extends JOptionPane { |
||||
|
||||
public final static String[] OPTION_DEFAULT = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_OK") }; |
||||
public final static String[] OPTION_YES_NO = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes"), |
||||
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No") }; |
||||
public final static String[] OPTION_YES_NO_CANCEL = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes"), |
||||
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No"), |
||||
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Cancel") }; |
||||
public final static String[] OPTION_OK_CANCEL = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_OK"), |
||||
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Cancel") }; |
||||
|
||||
//选项类型optionType 和 选项字符串数组 一一对应
|
||||
private final static Map<Integer, String[]> OPTION_MAP = new HashMap<>(); |
||||
|
||||
static { |
||||
OPTION_MAP.put(DEFAULT_OPTION, OPTION_DEFAULT); |
||||
OPTION_MAP.put(YES_NO_OPTION, OPTION_YES_NO); |
||||
OPTION_MAP.put(YES_NO_CANCEL_OPTION, OPTION_YES_NO_CANCEL); |
||||
OPTION_MAP.put(OK_CANCEL_OPTION, OPTION_OK_CANCEL); |
||||
} |
||||
|
||||
private final static String MESSAGE_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Message"); |
||||
private final static String CONFIRM_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"); |
||||
private final static String INPUT_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"); |
||||
|
||||
/** |
||||
* 使用默认 标题 和 消息类型 的消息提示弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static void showMessageDialog(Component parentComponent, Object message) |
||||
throws HeadlessException { |
||||
showMessageDialog(parentComponent, message, MESSAGE_DIALOG_TITLE, |
||||
INFORMATION_MESSAGE); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 Icon 的消息提示弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param messageType 消息类型 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static void showMessageDialog(Component parentComponent, Object message, |
||||
String title, int messageType) |
||||
throws HeadlessException { |
||||
showMessageDialog(parentComponent, message, title, messageType, null); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 选项类型、选项 和 初始选项 的消息提示弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param messageType 消息类型 |
||||
* @param icon 图标 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static void showMessageDialog(Component parentComponent, Object message, |
||||
String title, int messageType, Icon icon) |
||||
throws HeadlessException { |
||||
showMessageDialog(parentComponent, message, title, DEFAULT_OPTION, |
||||
messageType, icon, OPTION_DEFAULT, null); |
||||
} |
||||
|
||||
/** |
||||
* 自定义的消息提示弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param optionType 选项类型 |
||||
* @param messageType 消息类型 |
||||
* @param icon 图标 |
||||
* @param options 选项 |
||||
* @param initialValue 初始选项 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static void showMessageDialog(Component parentComponent, Object message, |
||||
String title, int optionType, int messageType, |
||||
Icon icon, Object[] options, Object initialValue) |
||||
throws HeadlessException { |
||||
showOptionDialog(parentComponent, message, title, optionType, |
||||
messageType, icon, options, initialValue); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 标题 和 选项类型 的确认弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static int showConfirmDialog(Component parentComponent, Object message) |
||||
throws HeadlessException { |
||||
return showConfirmDialog(parentComponent, message, |
||||
CONFIRM_DIALOG_TITLE, |
||||
YES_NO_CANCEL_OPTION); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 消息类型 的确认弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param optionType 选项类型 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static int showConfirmDialog(Component parentComponent, Object message, |
||||
String title, int optionType) throws HeadlessException { |
||||
return showConfirmDialog(parentComponent, message, title, optionType, |
||||
QUESTION_MESSAGE); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 Icon 的确认弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param optionType 选项类型 |
||||
* @param messageType 消息类型 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static int showConfirmDialog(Component parentComponent, Object message, |
||||
String title, int optionType, int messageType) |
||||
throws HeadlessException { |
||||
return showConfirmDialog(parentComponent, message, title, optionType, |
||||
messageType, null); |
||||
} |
||||
|
||||
/** |
||||
* 根据 选项类型 获取对应 选项 ,且使用默认 初始选项 的确认弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param optionType 选项类型 |
||||
* @param messageType 消息类型 |
||||
* @param icon 图标 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static int showConfirmDialog(Component parentComponent, Object message, |
||||
String title, int optionType, int messageType, Icon icon) |
||||
throws HeadlessException { |
||||
String[] options = OPTION_MAP.get(optionType); |
||||
return showConfirmDialog(parentComponent, message, title, optionType, |
||||
messageType, icon, options, options[0]); |
||||
} |
||||
|
||||
/** |
||||
* 自定义的确认弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 具体的提示消息 |
||||
* @param title 标题 |
||||
* @param optionType 选项类型 |
||||
* @param messageType 消息类型 |
||||
* @param icon 图标 |
||||
* @param options 选项 |
||||
* @param initialValue 初始选项 |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static int showConfirmDialog(Component parentComponent, Object message, |
||||
String title, int optionType, int messageType, Icon icon, |
||||
Object[] options, Object initialValue) |
||||
throws HeadlessException { |
||||
return showOptionDialog(parentComponent, message, title, optionType, |
||||
messageType, icon, options, initialValue); |
||||
} |
||||
|
||||
/** |
||||
* 指定消息内容的输入弹出框 |
||||
* @param message 消息内容 |
||||
* @return |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static String showInputDialog(Object message) |
||||
throws HeadlessException { |
||||
return showInputDialog(null, message); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 标题 和 消息类型 的输入弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 消息内容 |
||||
* @return |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static String showInputDialog(Component parentComponent, |
||||
Object message) throws HeadlessException { |
||||
return showInputDialog(parentComponent, message, INPUT_DIALOG_TITLE, QUESTION_MESSAGE); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 标题、消息类型、Icon 和 选项 的输入弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 消息类型 |
||||
* @param initialSelectionValue 初始选项 |
||||
* @return |
||||
*/ |
||||
public static String showInputDialog(Component parentComponent, Object message, |
||||
Object initialSelectionValue) { |
||||
return (String)showInputDialog(parentComponent, message, |
||||
INPUT_DIALOG_TITLE, QUESTION_MESSAGE, null, null, |
||||
initialSelectionValue); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 父容器、消息内容 和 初始选项 的输入弹出框 |
||||
* @param message 消息内容 |
||||
* @param initialSelectionValue 初始选项 |
||||
* @return |
||||
*/ |
||||
public static String showInputDialog(Object message, Object initialSelectionValue) { |
||||
return showInputDialog(null, message, initialSelectionValue); |
||||
} |
||||
|
||||
/** |
||||
* 使用默认 Icon、选项 和 初始选项 的输入弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 消息内容 |
||||
* @param title 标题 |
||||
* @param messageType 消息类型 |
||||
* @return |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static String showInputDialog(Component parentComponent, |
||||
Object message, String title, int messageType) |
||||
throws HeadlessException { |
||||
return (String)showInputDialog(parentComponent, message, title, |
||||
messageType, null, null, null); |
||||
} |
||||
|
||||
/** |
||||
* 自定义的输入弹出框 |
||||
* @param parentComponent 父容器 |
||||
* @param message 消息内容 |
||||
* @param title 标题 |
||||
* @param messageType 消息类型 |
||||
* @param icon 图标 |
||||
* @param selectionValues 选项 |
||||
* @param initialSelectionValue 初始选项 |
||||
* @return |
||||
* @throws HeadlessException |
||||
*/ |
||||
public static Object showInputDialog(Component parentComponent, |
||||
Object message, String title, int messageType, Icon icon, |
||||
Object[] selectionValues, Object initialSelectionValue) |
||||
throws HeadlessException { |
||||
JOptionPane pane = new JOptionPane(message, messageType, |
||||
OK_CANCEL_OPTION, icon, |
||||
OPTION_OK_CANCEL, null); |
||||
|
||||
pane.setWantsInput(true); |
||||
pane.setSelectionValues(selectionValues); |
||||
pane.setInitialSelectionValue(initialSelectionValue); |
||||
pane.setComponentOrientation(((parentComponent == null) ? |
||||
getRootFrame() : parentComponent).getComponentOrientation()); |
||||
|
||||
int style = Reflect.on(JOptionPane.class).call("styleFromMessageType", messageType).get(); |
||||
JDialog dialog = Reflect.on(pane).call("createDialog", parentComponent, title, style).get(); |
||||
|
||||
pane.selectInitialValue(); |
||||
dialog.show(); |
||||
dialog.dispose(); |
||||
|
||||
Object value = pane.getInputValue(); |
||||
|
||||
if (value == UNINITIALIZED_VALUE) { |
||||
return null; |
||||
} |
||||
return value; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,90 @@
|
||||
package com.fr.design.dialog; |
||||
|
||||
import com.fr.design.gui.ibutton.UIButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.IOUtils; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Dimension; |
||||
import java.awt.FlowLayout; |
||||
import java.awt.Frame; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2020/1/8 |
||||
*/ |
||||
public abstract class TipDialog extends JDialog implements ActionListener { |
||||
|
||||
private UIButton endButton; |
||||
private UIButton cancelButton; |
||||
|
||||
public TipDialog(Frame parent, String type, String tip, String endText, String cancelText) { |
||||
super(parent, true); |
||||
JPanel northPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
JPanel iconPane = new JPanel(); |
||||
UILabel iconLabel = new UILabel(); |
||||
iconLabel.setIcon(IOUtils.readIcon("com/fr/design/images/error/error2.png")); |
||||
iconPane.add(iconLabel); |
||||
iconPane.setPreferredSize(new Dimension(50, 50)); |
||||
JPanel tipPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
UILabel tipLabel = new UILabel(tip); |
||||
tipPane.add(tipLabel); |
||||
northPane.add(iconPane, BorderLayout.WEST); |
||||
northPane.add(tipPane, BorderLayout.CENTER); |
||||
|
||||
JTextArea area = new JTextArea(type); |
||||
area.setPreferredSize(new Dimension(400, 100)); |
||||
area.setEnabled(true); |
||||
area.setEditable(false); |
||||
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
centerPane.add(area); |
||||
|
||||
JPanel southPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
JPanel buttonPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); |
||||
endButton = new UIButton(endText); |
||||
endButton.addActionListener(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
endEvent(); |
||||
} |
||||
}); |
||||
buttonPane.add(endButton); |
||||
cancelButton = new UIButton(cancelText); |
||||
cancelButton.addActionListener(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
cancelEvent(); |
||||
} |
||||
}); |
||||
buttonPane.add(cancelButton); |
||||
controlPane.add(buttonPane, BorderLayout.EAST); |
||||
southPane.add(controlPane); |
||||
|
||||
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Error_Tittle")); |
||||
this.setResizable(false); |
||||
this.add(northPane, BorderLayout.NORTH); |
||||
this.add(centerPane, BorderLayout.CENTER); |
||||
this.add(southPane, BorderLayout.SOUTH); |
||||
this.setSize(new Dimension(600, 500)); |
||||
GUICoreUtils.centerWindow(this); |
||||
|
||||
} |
||||
|
||||
protected abstract void endEvent(); |
||||
|
||||
protected abstract void cancelEvent(); |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
dispose(); |
||||
} |
||||
|
||||
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,57 @@
|
||||
package com.fr.design.formula; |
||||
|
||||
import com.fr.stable.StringUtils; |
||||
|
||||
/** |
||||
* @author Joe |
||||
* @version 10.0 |
||||
* Created by Joe on 10/30/2019 |
||||
*/ |
||||
public enum FormulaConstants { |
||||
|
||||
PAGE_NUMBER("$$page_number", "Page_Number"), |
||||
TOTAL_PAGE_NUMBER("$$totalPage_number", "Total_Page_Number"), |
||||
FINE_USERNAME("$fine_username", "Fine_Username"), |
||||
FINE_ROLE("$fine_role", "Fine_Role"), |
||||
FINE_POSITION("$fine_position", "Fine_Position"), |
||||
NULL("NULL", "Null"), |
||||
NOFILTER("NOFILTER", "No_Filter"), |
||||
REPORT_NAME("reportName", "Report_Name"), |
||||
FORMLET_NAME("formletName", "Formlet_Name"), |
||||
SERVLET_URL("servletURL", "Servlet_URL"), |
||||
SERVER_SCHEMA("serverSchema", "Server_Schema"), |
||||
SERVER_NAME("serverName", "Server_Name"), |
||||
SERVER_PORT("serverPort", "Server_Port"), |
||||
SERVER_URL("serverURL", "Server_URL"), |
||||
CONTEXT_PATH("contextPath", "Context_Path"), |
||||
SESSION_ID("sessionID", "SessionID"); |
||||
|
||||
private String key; |
||||
private String value; |
||||
private static final String KEY_PREFIX = "Fine-Design_CurReport_Variable_"; |
||||
|
||||
private FormulaConstants(String key, String value) { |
||||
this.key = key; |
||||
this.value = KEY_PREFIX + value; |
||||
} |
||||
|
||||
public String getKey() { |
||||
return key; |
||||
} |
||||
|
||||
public String getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public static String getValueByKey(String key) { |
||||
for (FormulaConstants formulaConstant : values()) { |
||||
if (formulaConstant.getKey().equals(key)) { |
||||
return formulaConstant.getValue(); |
||||
} |
||||
} |
||||
return StringUtils.EMPTY; |
||||
} |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.form.ui.mobile.MobileBookMarkStyle; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
/** |
||||
* 移动端书签样式扩展接口 |
||||
* |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2019/12/23 |
||||
*/ |
||||
public interface MobileBookMarkStyleProvider extends Mutable { |
||||
|
||||
String XML_TAG = "MobileBookMarkStyleProvider"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
/** |
||||
* 书签样式 |
||||
* @return |
||||
*/ |
||||
Class<? extends MobileBookMarkStyle> classForMobileBookMarkStyle(); |
||||
|
||||
/** |
||||
* 书签样式面板 |
||||
* @return |
||||
*/ |
||||
Class<? extends BasicBeanPane<MobileBookMarkStyle>> classForMobileBookMarkStyleAppearance(); |
||||
|
||||
String displayName(); |
||||
|
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.common.annotations.Open; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Created by kerry on 2019-11-11 |
||||
*/ |
||||
@Open |
||||
public interface MultiStyleUIConfigProvider extends Mutable { |
||||
String XML_TAG = "MultiStyleUIConfigProvider"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
/** |
||||
* 获取配置项list |
||||
* |
||||
* @return 配置项list |
||||
*/ |
||||
List<StyleUIConfigProvider> getConfigList(); |
||||
} |
@ -0,0 +1,46 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.mainframe.PaneHolder; |
||||
import com.fr.design.mainframe.PropertyItemBean; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
import org.jetbrains.annotations.Nullable; |
||||
|
||||
/** |
||||
* created by Harrison on 2020/03/23 |
||||
**/ |
||||
public interface PropertyItemPaneProvider<T> extends Mutable { |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
String XML_TAG = "PropertyItemPaneProvider"; |
||||
|
||||
/** |
||||
* 独一无二的标志 |
||||
* |
||||
* @return 标志 |
||||
*/ |
||||
String key(); |
||||
|
||||
/** |
||||
* 配置属性 |
||||
* |
||||
* @return 熟悉 |
||||
*/ |
||||
PropertyItemBean getItem(); |
||||
|
||||
/** |
||||
* 面板持有者 |
||||
* |
||||
* @param clazz 类型 |
||||
* @return 持有者 |
||||
*/ |
||||
@Nullable |
||||
PaneHolder<T> getPaneHolder(Class<?> clazz); |
||||
|
||||
/** |
||||
* 想要替代的类型 |
||||
* |
||||
* @return 替代类型 |
||||
*/ |
||||
String replaceKey(); |
||||
} |
@ -0,0 +1,39 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.base.Style; |
||||
import com.fr.common.annotations.Open; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.event.ChangeListener; |
||||
|
||||
/** |
||||
* Created by kerry on 2019-11-11 |
||||
*/ |
||||
@Open |
||||
public interface StyleUIConfigProvider extends Mutable { |
||||
String XML_TAG = "CustomStyleUIConfigProvider"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
/** |
||||
* @return 配置名 |
||||
*/ |
||||
String configName(); |
||||
|
||||
/** |
||||
* @param changeListener 需要添加的listener |
||||
* @return 对应的component |
||||
*/ |
||||
JComponent uiComponent(ChangeListener changeListener); |
||||
|
||||
/** |
||||
* @return 更新后的样式 |
||||
*/ |
||||
Style updateConfig(); |
||||
|
||||
/** |
||||
* @param style 待渲染的样式 |
||||
*/ |
||||
void populateConfig(Style style); |
||||
} |
@ -0,0 +1,24 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.MobileBookMarkStyleProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2019/12/24 |
||||
*/ |
||||
@API(level = MobileBookMarkStyleProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractMobileBookMarkStyleProvider extends AbstractProvider implements MobileBookMarkStyleProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.StyleUIConfigProvider; |
||||
import com.fr.design.fun.MultiStyleUIConfigProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Created by kerry on 2019-11-11 |
||||
*/ |
||||
@API(level = MultiStyleUIConfigProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractMultiStyleUIConfigProvider extends AbstractProvider implements MultiStyleUIConfigProvider { |
||||
@Override |
||||
public List<StyleUIConfigProvider> getConfigList() { |
||||
return new ArrayList<StyleUIConfigProvider>(); |
||||
} |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.PropertyItemPaneProvider; |
||||
import com.fr.design.mainframe.PaneHolder; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* created by Harrison on 2020/03/23 |
||||
**/ |
||||
@API(level = PropertyItemPaneProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractPropertyItemPaneProvider<T> extends AbstractProvider implements PropertyItemPaneProvider<T> { |
||||
|
||||
@Override |
||||
public PaneHolder<T> getPaneHolder(Class<?> clazz) { |
||||
|
||||
if (sign().equals(clazz)) { |
||||
return getPathHolder0(); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
protected abstract PaneHolder<T> getPathHolder0(); |
||||
|
||||
protected abstract Class<T> sign(); |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return PropertyItemPaneProvider.CURRENT_LEVEL; |
||||
} |
||||
} |
@ -0,0 +1,41 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.base.Style; |
||||
import com.fr.design.fun.StyleUIConfigProvider; |
||||
import com.fr.stable.StringUtils; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.event.ChangeListener; |
||||
|
||||
/** |
||||
* Created by kerry on 2019-11-11 |
||||
*/ |
||||
@API(level = StyleUIConfigProvider.CURRENT_LEVEL) |
||||
public class AbstractStyleUIConfigProvider extends AbstractProvider implements StyleUIConfigProvider { |
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String configName() { |
||||
return StringUtils.EMPTY; |
||||
} |
||||
|
||||
@Override |
||||
public JComponent uiComponent(ChangeListener changeListener) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public Style updateConfig() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public void populateConfig(Style style) { |
||||
|
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue