Browse Source

Merge pull request #1483 in BA/design from ~MOMEAK/design9.0:feature/9.0 to feature/9.0

* commit 'b77d5e65a77353c96647751a6c9f5b3dd8ee4ace':
  REPORT-5794 DesignerFrame和HistoryTemplateListPane的改动, release里有, feature里没有, 合代码冲突了, 需要手动patch
  REPORT-5794 DesignerFrame和HistoryTemplateListPane的改动, release里有, feature里没有, 合代码冲突了, 需要手动patch
master
superman 7 years ago
parent
commit
b877d4fa27
  1. 15
      designer_base/src/com/fr/design/file/HistoryTemplateListPane.java
  2. 1808
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java

15
designer_base/src/com/fr/design/file/HistoryTemplateListPane.java

@ -9,6 +9,7 @@ import java.util.logging.Level;
import javax.swing.*; import javax.swing.*;
import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
@ -25,7 +26,6 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.UIList; import com.fr.design.gui.ilist.UIList;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JVirtualTemplate;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -36,7 +36,7 @@ import com.fr.stable.Constants;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.design.utils.gui.GUIPaintUtils;
public class HistoryTemplateListPane extends JPanel implements FileOperations { public class HistoryTemplateListPane extends JPanel implements FileOperations, CallbackEvent {
//最大保存内存中面板数,为0时关闭优化内存 //最大保存内存中面板数,为0时关闭优化内存
private static final int DEAD_LINE = 5; private static final int DEAD_LINE = 5;
private static final int LIST_BORDER = 4; private static final int LIST_BORDER = 4;
@ -104,7 +104,8 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
} }
/** /**
*关闭选择的文件 * 关闭选择的文件
*
* @param selected 选择的 * @param selected 选择的
*/ */
public void closeSelectedReport(JTemplate<?, ?> selected) { public void closeSelectedReport(JTemplate<?, ?> selected) {
@ -129,6 +130,7 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
/** /**
* 临时关闭选择的文件 * 临时关闭选择的文件
*
* @param selected 选择的 * @param selected 选择的
*/ */
public void closeVirtualSelectedReport(JTemplate<?, ?> selected) { public void closeVirtualSelectedReport(JTemplate<?, ?> selected) {
@ -235,6 +237,7 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
/** /**
* 判断是否打开过该模板 * 判断是否打开过该模板
*
* @param filename 文件名 * @param filename 文件名
* @return 文件位置 * @return 文件位置
*/ */
@ -250,6 +253,7 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
/** /**
* 是否是当前编辑的文件 * 是否是当前编辑的文件
*
* @param filename 文件名 * @param filename 文件名
* @return 是则返回TRUE * @return 是则返回TRUE
*/ */
@ -258,6 +262,10 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
return ComparatorUtils.equals(filename, editingFileName); return ComparatorUtils.equals(filename, editingFileName);
} }
@Override
public void callback() {
getCurrentEditingTemplate().repaint();
}
private class HistoryListCellRender extends DefaultListCellRenderer { private class HistoryListCellRender extends DefaultListCellRenderer {
@ -388,6 +396,7 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
/** /**
* 路径 * 路径
*
* @return 路径 * @return 路径
*/ */
public String getSelectedTemplatePath() { public String getSelectedTemplatePath() {

1808
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save