Browse Source

Merge pull request #4065 in DESIGN/design from bugfix/10.0 to release/10.0

* commit 'a5328e9e28628d4cf3076dd9ca190bc145e4f3b6':
  REPORT-50908 填报-填报属性设置-填报属性中对表查询定位的问题
  REPORT-47952 公式编辑器中数据集参数获取问题
  REPORT-50908 填报-填报属性设置-填报属性中对表查询定位的问题
  REPORT-51199 模版数据集预览图标偏移
zheng-1641779399395
superman 4 years ago
parent
commit
9954537d47
  1. 3
      designer-base/src/main/java/com/fr/design/DesignModelAdapter.java
  2. 22
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  3. 8
      designer-base/src/main/java/com/fr/design/gui/icombobox/SearchPreTaskTreeComboBox.java
  4. 14
      designer-base/src/main/resources/com/fr/design/images/m_file/preview_disabled.svg

3
designer-base/src/main/java/com/fr/design/DesignModelAdapter.java

@ -283,6 +283,9 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
TableData tableData,
Map<String, ParameterProvider> map,
Filter<ParameterProvider> filter) {
// 兼容下通过老数据集参数获取
tableDataParameters = getLatestTableDataParameters();
// 处理初始化添加
if (tableDataParametersMap.isEmpty()) {

22
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -1,7 +1,6 @@
package com.fr.design.data.datapane;
import com.fr.base.TableData;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.core.db.DBUtils;
import com.fr.data.core.db.TableProcedure;
@ -18,7 +17,7 @@ import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icombobox.SearchPreTaskTreeComboBox;
import com.fr.design.gui.icombobox.FRTreeComboBox;
import com.fr.design.gui.icombobox.FilterableComboBoxModel;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxEditor;
@ -60,10 +59,6 @@ import java.util.Collection;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
/**
* @author zhou
@ -85,25 +80,20 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
/**
* 表名
*/
protected SearchPreTaskTreeComboBox tableNameComboBox;
protected FRTreeComboBox tableNameComboBox;
private SwingWorker populateWorker;
private static final ExecutorService SERVICE = Executors.newSingleThreadExecutor(new NamedThreadFactory("ChoosePaneThread"));
private PopupMenuListener popupMenuListener = new PopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
FutureTask<Void> task = new FutureTask<Void>(new Callable() {
new Thread() {
@Override
public Object call() {
public void run() {
calculateTableDataNames();
return null;
}
});
SERVICE.submit(task);
tableNameComboBox.setPreSearchTask(task);
}.start();
}
@Override
@ -167,7 +157,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
schemaBox = new StringUIComboBox();
schemaBox.setEditor(new ComboBoxEditor());
tableNameComboBox = new SearchPreTaskTreeComboBox(new JTree(new DefaultMutableTreeNode()), tableNameTreeRenderer, false);
tableNameComboBox = new FRTreeComboBox(new JTree(new DefaultMutableTreeNode()), tableNameTreeRenderer, false);
tableNameComboBox.setEditable(true);
tableNameComboBox.setRenderer(listCellRenderer);
registerDSChangeListener();

8
designer-base/src/main/java/com/fr/design/gui/icombobox/SearchPreTaskTreeComboBox.java

@ -1,5 +1,6 @@
package com.fr.design.gui.icombobox;
import com.fr.design.ui.util.UIUtil;
import com.fr.log.FineLoggerFactory;
import javax.swing.JTree;
@ -64,7 +65,12 @@ public class SearchPreTaskTreeComboBox extends FRTreeComboBox {
// 任务执行后置空,否则会被别的操作重复触发
setPreSearchTask(null);
}
search();
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
search();
}
});
return null;
}
}.execute();

14
designer-base/src/main/resources/com/fr/design/images/m_file/preview_disabled.svg

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 12 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon_报表web属性_打印预览_normal</title>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.3">
<g id="工具栏/导入数据集" transform="translate(-116.000000, -7.000000)" fill="#333334">
<g id="icon_报表web属性_打印预览_normal" transform="translate(114.000000, 6.000000)">
<path d="M9.5,7 C11.432875,7 13,8.567125 13,10.5 C13,11.1075915 12.845147,11.679042 12.5727578,12.1770349 C12.6203353,12.2075319 12.6650188,12.2450114 12.7069,12.287 L13.7129,13.293 C14.1039,13.684 14.1039,14.316 13.7129,14.707 C13.5179,14.902 13.2619,15 13.0059,15 C12.7499,15 12.4939,14.902 12.2989,14.707 L11.2929,13.701 C11.251507,13.6597129 11.2144961,13.6157024 11.1818672,13.5695439 C10.6844106,13.8436886 10.110446,14 9.5,14 C7.567125,14 6,12.432875 6,10.5 C6,8.567125 7.567125,7 9.5,7 Z M10,1 L14,5 L14,8 L13,8 L13,6 L9,6 L9,2 L3,2 L3,14 L7,14 L7,15 L2,15 L2,1 L10,1 Z M9.5,8 C10.8783333,8 12,9.12166667 12,10.5 C12,11.8783333 10.8783333,13 9.5,13 C8.12166667,13 7,11.8783333 7,10.5 C7,9.12166667 8.12166667,8 9.5,8 Z M12.587,5 L10,2.414 L10,5 L12.587,5 Z" id="Combined-Shape"></path>
</g>
</g>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon_预览_disabled</title>
<g id="icon_预览_disabled" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.3">
<path d="M9.5,7 C11.432875,7 13,8.567125 13,10.5 C13,11.1075915 12.845147,11.679042 12.5727578,12.1770349 C12.6203353,12.2075319 12.6650188,12.2450114 12.7069,12.287 L13.7129,13.293 C14.1039,13.684 14.1039,14.316 13.7129,14.707 C13.5179,14.902 13.2619,15 13.0059,15 C12.7499,15 12.4939,14.902 12.2989,14.707 L11.2929,13.701 C11.251507,13.6597129 11.2144961,13.6157024 11.1818672,13.5695439 C10.6844106,13.8436886 10.110446,14 9.5,14 C7.567125,14 6,12.432875 6,10.5 C6,8.567125 7.567125,7 9.5,7 Z M10,1 L14,5 L14,8 L13,8 L13,6 L9,6 L9,2 L3,2 L3,14 L7,14 L7,15 L2,15 L2,1 L10,1 Z M9.5,8 C10.8783333,8 12,9.12166667 12,10.5 C12,11.8783333 10.8783333,13 9.5,13 C8.12166667,13 7,11.8783333 7,10.5 C7,9.12166667 8.12166667,8 9.5,8 Z M12.587,5 L10,2.414 L10,5 L12.587,5 Z" id="Combined-Shape" fill="#333334"></path>
</g>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Loading…
Cancel
Save