Browse Source
Merge in DESIGN/design from ~ZONGYU.WANG/design:newui to newui * commit '2e9a4c6ee102f7efe0c3bd9a2d6cb4e64babbe9e': REPORT-127437 feat:响应插件安装卸载事件 REPORT-127437 fix:【fvs 适配】根据 mr 意见调整 REPORT-127437 fix:纸张背景布局调整 REPORT-127437 feat:翻新预览界面 & 纸张背景,渐变色布局调整 REPORT-127437 fix: 解决 fvs 适配的 UI 问题 & 适配 TemplateTabStoryBoard REPORT-127437 feat: 增加工具按钮插件适配抽象类 REPORT-127437 feat: fvs 适配newui
18 changed files with 301 additions and 77 deletions
@ -0,0 +1,31 @@
|
||||
package com.fr.design.actions.template; |
||||
|
||||
import com.fine.theme.icon.LazyIcon; |
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.design.mainframe.DesignerContext; |
||||
|
||||
import javax.swing.Icon; |
||||
import java.awt.event.ActionEvent; |
||||
|
||||
/** |
||||
* 工具按钮 - 新建报表文件 |
||||
* |
||||
* @author lemon |
||||
* @since |
||||
* Created on |
||||
*/ |
||||
public class NewWorkBookToolButtonAction extends UpdateAction { |
||||
public NewWorkBookToolButtonAction() { |
||||
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_New_WorkBook")); |
||||
this.setSmallIcon(icon()); |
||||
} |
||||
|
||||
protected Icon icon() { |
||||
return new LazyIcon("add_worksheet"); |
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
DesignerContext.getDesignerFrame().addAndActivateJTemplate(); |
||||
} |
||||
} |
@ -0,0 +1,47 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.menu.ShortCut; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
/** |
||||
* 设计器 Multi_template 按钮插件接口 |
||||
* |
||||
* @author lemon |
||||
* @since |
||||
* Created on |
||||
*/ |
||||
public interface MultiTemplateTabPaneHandler extends Mutable { |
||||
|
||||
String MARK_STRING = "MultiTemplateToolButtonHandler"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
|
||||
int LAST = -1; |
||||
int HIDE =-2; |
||||
|
||||
String LEADING_LOCATION = "leading_location"; |
||||
String TRAILING_LOCATION = "trailing_location"; |
||||
|
||||
/** |
||||
* 插入工具按钮的位置 |
||||
* |
||||
* @param total 插入的位置 |
||||
* @return 插入位置,如果想放到最后,则返回-1 |
||||
*/ |
||||
int insertPosition(int total); |
||||
|
||||
/** |
||||
* 所属的工具按钮分类 |
||||
* |
||||
* @return 分类工具按钮名 |
||||
*/ |
||||
String category(); |
||||
|
||||
/** |
||||
* 具体的工具按钮项内容 |
||||
* |
||||
* @return 工具按钮项内容 |
||||
*/ |
||||
ShortCut shortcut(); |
||||
} |
@ -0,0 +1,38 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.MultiTemplateTabPaneHandler; |
||||
import com.fr.design.menu.ShortCut; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* 多模板工具按钮插件适配抽象类 |
||||
* |
||||
* @author lemon |
||||
* @since |
||||
* Created on |
||||
*/ |
||||
@API(level = MultiTemplateTabPaneHandler.CURRENT_LEVEL) |
||||
public abstract class AbstractMultiTemplateTabPaneHandler extends AbstractProvider implements MultiTemplateTabPaneHandler { |
||||
/** |
||||
* 当前接口的API等级,用于判断是否需要升级插件 |
||||
* @return API等级 |
||||
*/ |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return this.getClass().getName(); |
||||
} |
||||
|
||||
/** |
||||
* 获取当前工具按钮对应的Action |
||||
* |
||||
* @return 工具按钮 Action |
||||
*/ |
||||
public ShortCut shortcut() { |
||||
return null; |
||||
} |
||||
} |
Loading…
Reference in new issue