Browse Source
* commit '1f7ef2189f1a048172afea3b90fbc222ea212da3': (108 commits) CHART-3956 【CHART】图表属性-设计界面-数据集配置界面不对 CHART-3956 数据配置界面显示'数据集' CHART-3954 改善设计器的自定义区间值使用公式时,其邻值背景颜色显示逻辑 REPORT-15027 两个自定义按钮设置,第一个的提交入库会显示在第二个上 REPORT-14624 Rename 方式导出 大屏插件jartime更新 顺便解决之前的一些代码质量 REPORT-14526 【0123回归】文件控件,只支持单文件上传设置文字被遮挡 REPORT-14981 按钮控件自定义图标预览后无法显示 REPORT-14668 设计器语言切换成英文后的显示问题 REPORT-14661 设计器界面 服务器-服务器数据集界面显示问题 REPORT-14661 设计器界面 服务器-服务器数据集界面显示问题 REPORT-14908 启动设计器后,非reportlets文件夹下的模板,无法双击打开 CHART-3865 '位置'改为显示'布局' REPORT-14790 填报问题 1、修改算子关于当前格子位置的俩接口命名问题,提取出CalculatorLocator 2、不小心改大了,把所有的FRContext.getLogger都改了,赶紧传到release和feature。。 REPORT-14790 填报问题 先重构一下,删了一些没用的分支和逻辑,把代码弄清晰明天再继续定位bug原因- - REPORT-14624【0123回归】输出内置数据集到设计器工作目录覆盖原文件,导出失败 这里转OutputStream时,需要保留原文件,否则覆盖自身时会找不到文件 CHART-3017 为区域段图例面板指定Parent 传FR10 代码质量:从源头返回空list REPORT-14465 【10.0冒烟】 数字控件“双精度型” 全部展开显示,最底端文字被遮挡 REPORT-14569 10.0release的alphafine显示问题 定位到是多线程的bug,某些情况下list里放入了之前的线程搜索的结果。目前策略是各线程各自维护一个列表,获取结果后再赋给全局变量 ...persist/10.0
Kara
6 years ago
259 changed files with 2950 additions and 1626 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,10 @@
|
||||
package com.fr.design.gui.core; |
||||
|
||||
/** |
||||
* 这个接口说明一个基本组件可以设置文本 |
||||
* Created by plough on 2019/1/11. |
||||
*/ |
||||
public interface UITextComponent { |
||||
String getText(); |
||||
void setText(String text); |
||||
} |
@ -1 +1,24 @@
|
||||
package com.fr.design.parameter;
import com.fr.base.Parameter;
public interface ParaDefinitePane {
public Parameter[] getNoRepeatParas(Parameter[] paras);
public void setParameterArray(Parameter[] ps);
public Parameter[] getParameterArray();
public void refreshParameter();
public boolean isWithQueryButton();
public void addingParameter2Editor(Parameter p);
public void addingParameter2EditorWithQueryButton(Parameter p);
public void addingAllParameter2Editor();
} |
||||
package com.fr.design.parameter; |
||||
|
||||
import com.fr.base.Parameter; |
||||
|
||||
|
||||
public interface ParaDefinitePane { |
||||
|
||||
Parameter[] getNoRepeatParas(Parameter[] paras); |
||||
|
||||
void setParameterArray(Parameter[] ps); |
||||
|
||||
Parameter[] getParameterArray(); |
||||
|
||||
void refreshParameter(); |
||||
|
||||
boolean isWithQueryButton(); |
||||
|
||||
void addingParameter2Editor(Parameter p); |
||||
|
||||
void addingParameter2EditorWithQueryButton(Parameter p); |
||||
|
||||
void addingAllParameter2Editor(); |
||||
|
||||
} |
@ -0,0 +1,91 @@
|
||||
package com.fr.design.utils.gui; |
||||
|
||||
import com.fr.design.gui.core.UITextComponent; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.JPanel; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Component; |
||||
import java.awt.Dimension; |
||||
import java.util.Locale; |
||||
|
||||
/** |
||||
* 包含 UI 组件相关的工具方法 |
||||
* Created by plough on 2019/1/11. |
||||
*/ |
||||
|
||||
// Noninstantiable utility class
|
||||
public class UIComponentUtils { |
||||
private static final String HTML_TAG_TPL = "<html><body style='width: %dpx'>"; |
||||
private static final String HTML_BODY_TAG = "<html><body>"; |
||||
private static final String HTML_TAG = "<html>"; |
||||
private static final int MIN_WIDTH = 10; |
||||
|
||||
// 覆盖缺省构造器,不可实例化
|
||||
private UIComponentUtils() { |
||||
throw new AssertionError(); |
||||
} |
||||
|
||||
/** |
||||
* 到达指定宽度后换行 |
||||
*/ |
||||
public static void setLineWrap(UITextComponent comp, int width) { |
||||
if (width < MIN_WIDTH) { |
||||
width = MIN_WIDTH; |
||||
} |
||||
insertPrefixToText(comp, String.format(HTML_TAG_TPL, width)); |
||||
} |
||||
|
||||
/** |
||||
* 自动换行 |
||||
*/ |
||||
public static void setLineWrap(UITextComponent comp) { |
||||
insertPrefixToText(comp, HTML_BODY_TAG); |
||||
} |
||||
|
||||
private static void insertPrefixToText(UITextComponent comp, String prefix) { |
||||
if (comp == null || ComparatorUtils.equals(Locale.CHINA, GeneralContext.getLocale())) { |
||||
// 最初是为了解决日文国际化显示不全,而增加的换行功能。中文不需要换行。
|
||||
// windows 下,字体为宋体时,对于 JLabel、JCheckBox、JButton 等控件,使用<html>换行后,文字会下移,可能导致文字下半部分被截断。
|
||||
// 因此中文直接返回,不加换行逻辑。
|
||||
return; |
||||
} |
||||
|
||||
String text = comp.getText(); |
||||
if (StringUtils.isEmpty(text) || text.startsWith(HTML_TAG)) { |
||||
return; |
||||
} |
||||
comp.setText(prefix + text); |
||||
} |
||||
|
||||
/** |
||||
* 将一个组件包装到 BorderLayout 布局的面板中 |
||||
* @param comp,待包装的组件 |
||||
* @param layoutConstraint,添加的方向,如 BorderLayout.NORTH |
||||
* @return 包装好的 JPanel |
||||
*/ |
||||
public static JPanel wrapWithBorderLayoutPane(Component comp, String layoutConstraint) { |
||||
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
panel.add(comp, layoutConstraint); |
||||
return panel; |
||||
} |
||||
|
||||
/** |
||||
* 将一个组件包装到 BorderLayout 布局的面板中 |
||||
* @param comp,待包装的组件 |
||||
* @return 包装好的 JPanel(布局方向为 BorderLayout.NORTH) |
||||
*/ |
||||
public static JPanel wrapWithBorderLayoutPane(Component comp) { |
||||
return wrapWithBorderLayoutPane(comp, BorderLayout.NORTH); |
||||
} |
||||
|
||||
public static void setPreferedWidth(JComponent comp, int width) { |
||||
Dimension dim = comp.getPreferredSize(); |
||||
dim.setSize(width, dim.getHeight()); |
||||
comp.setPreferredSize(dim); |
||||
} |
||||
} |
@ -0,0 +1,51 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.utils.gui.UIComponentUtils; |
||||
|
||||
/** |
||||
* 创建 widget 的静态工厂 |
||||
* Created by plough on 2019/1/15. |
||||
*/ |
||||
public class FRWidgetFactory { |
||||
// 不可实例化
|
||||
private FRWidgetFactory() { |
||||
throw new AssertionError(); |
||||
} |
||||
|
||||
/** |
||||
* 创建一个可换行的 UILabel |
||||
* @param text 标签文字 |
||||
* @return com.fr.design.gui.ilable.UILabel |
||||
*/ |
||||
public static UILabel createLineWrapLabel(String text) { |
||||
UILabel label = new UILabel(text); |
||||
UIComponentUtils.setLineWrap(label); |
||||
return label; |
||||
} |
||||
|
||||
/** |
||||
* 创建一个可换行的 UILabel |
||||
* @param text 标签文字 |
||||
* @param lineWidth 最大行宽 |
||||
* @return com.fr.design.gui.ilable.UILabel |
||||
*/ |
||||
public static UILabel createLineWrapLabel(String text, int lineWidth) { |
||||
UILabel label = new UILabel(text); |
||||
UIComponentUtils.setLineWrap(label, lineWidth); |
||||
return label; |
||||
} |
||||
|
||||
/** |
||||
* 创建一个可换行可调整水平对齐的 UILabel |
||||
* @param text |
||||
* @param lineWidth |
||||
* @param horizontalAlignment |
||||
* @return com.fr.design.gui.ilable.UILabel |
||||
*/ |
||||
public static UILabel createLineWrapLabel(String text, int lineWidth, int horizontalAlignment) { |
||||
UILabel label = createLineWrapLabel(text, lineWidth); |
||||
label.setHorizontalAlignment(horizontalAlignment); |
||||
return label; |
||||
} |
||||
} |
@ -0,0 +1,93 @@
|
||||
package com.fr.file; |
||||
|
||||
import javax.swing.Icon; |
||||
import java.io.InputStream; |
||||
import java.io.OutputStream; |
||||
|
||||
public abstract class AbstractFILE implements FILE { |
||||
|
||||
@Override |
||||
public String prefix() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean isDirectory() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public String getName() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public Icon getIcon() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public String getPath() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public void setPath(String path) { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public FILE getParent() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public FILE[] listFiles() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean createFolder(String name) { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean mkfile() throws Exception { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean exists() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public void closeTemplate() throws Exception { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public InputStream asInputStream() throws Exception { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public OutputStream asOutputStream() throws Exception { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public String getEnvFullName() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean isMemFile() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean isEnvFile() { |
||||
throw new UnsupportedOperationException(); |
||||
} |
||||
} |
@ -0,0 +1,102 @@
|
||||
package com.fr.file; |
||||
|
||||
import com.fr.stable.StableUtils; |
||||
import com.fr.stable.StringUtils; |
||||
import com.fr.third.org.apache.commons.io.FileUtils; |
||||
import com.fr.web.session.SessionLocalManager; |
||||
|
||||
import javax.swing.Icon; |
||||
import java.io.File; |
||||
import java.io.FileOutputStream; |
||||
import java.io.IOException; |
||||
import java.io.OutputStream; |
||||
|
||||
public class RenameExportFILE extends AbstractFILE { |
||||
|
||||
private static final String EXPORT_SUFFIX = ".FRExportTmp"; |
||||
|
||||
private FILE file; |
||||
|
||||
private RenameExportFILE(FILE file) { |
||||
this.file = new FileFILE(new File(file.getPath() + EXPORT_SUFFIX)); |
||||
} |
||||
|
||||
public static RenameExportFILE create(FILE file) { |
||||
return new RenameExportFILE(file); |
||||
} |
||||
|
||||
public static String recoverFileName(String fileName) { |
||||
if (StringUtils.isEmpty(fileName) || !fileName.endsWith(EXPORT_SUFFIX)) { |
||||
return fileName; |
||||
} |
||||
return fileName.substring(0, fileName.lastIndexOf(EXPORT_SUFFIX)); |
||||
} |
||||
|
||||
@Override |
||||
public String prefix() { |
||||
return file.prefix(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean isDirectory() { |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public String getName() { |
||||
return file.getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Icon getIcon() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public String getPath() { |
||||
return file.getPath(); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public FILE getParent() { |
||||
return file.getParent(); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public boolean mkfile() throws Exception { |
||||
return file.mkfile(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean exists() { |
||||
return file.exists(); |
||||
} |
||||
|
||||
@Override |
||||
public OutputStream asOutputStream() throws Exception { |
||||
|
||||
final File localeFile = new File(file.getPath()); |
||||
OutputStream out; |
||||
try { |
||||
StableUtils.makesureFileExist(localeFile); |
||||
out = new FileOutputStream(localeFile, false) { |
||||
@Override |
||||
public void close() throws IOException { |
||||
super.close(); |
||||
String path = file.getPath(); |
||||
if (localeFile.exists()) { |
||||
FileUtils.copyFile(localeFile, new File(recoverFileName(path))); |
||||
if (localeFile.getPath().endsWith(EXPORT_SUFFIX)) { |
||||
FileUtils.forceDelete(localeFile); |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
} catch (Exception e) { |
||||
throw SessionLocalManager.createLogPackedException(e); |
||||
} |
||||
return out; |
||||
} |
||||
} |
@ -1 +1 @@
|
||||
contextPath是指绝对路径的服务器别名,即虚拟目录.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,contextPath是/WebReport |
||||
contextPath是指绝对路径的服务器别名,即虚拟目录.假如访问:http://localhost:8075/webroot/decision/view/report?viewlet=workbook1.cpt,contextPath是/webroot/decision/view |
@ -1 +1 @@
|
||||
表单名字假如访问:http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,formName就是Form1.frm |
||||
表单名字假如访问:http://localhost:8075/webroot/decision/view/form?viewlet=Form1.frm,formName就是Form1.frm |
@ -1 +1 @@
|
||||
报表名字假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,reportName就是WorkBook1.cpt |
||||
报表名字假如访问:http://localhost:8075/webroot/decision/view/report?viewlet=workbook1.cpt,reportName就是WorkBook1.cpt |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue