Browse Source

Pull request #9838: REPORT-78757 移动弹窗,无匹配结果交互问题等

Merge in DESIGN/design from ~ROGER.CHEN/design:feature/x to feature/x

* commit 'e3f43c5dedb9a6423b808536dc10b36bbdb79f8c':
  REPORT-78757 移动弹窗,无匹配结果交互问题等
feature/x
Roger.Chen 2 years ago
parent
commit
3697a03957
  1. 9
      designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java
  2. 10
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  4. 7
      designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirSearchRemindPane.java

9
designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java

@ -24,6 +24,7 @@ import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.collections.CollectionUtils; import com.fr.stable.collections.CollectionUtils;
@ -244,7 +245,7 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
if (pasteNodes.isEmpty()) { if (pasteNodes.isEmpty()) {
//提示:复制的文件都不能黏贴 //提示:复制的文件都不能黏贴
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Unable_Delete_Locked_File"), Toolkit.i18nText("Fine-Design_Basic_Confirm_Paste_Unlock_File"),
Toolkit.i18nText("Fine-Design_Basic_Alert"), Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE); WARNING_MESSAGE);
return; return;
@ -508,6 +509,10 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
private void copyDir(String sourceDir, String targetDir) { private void copyDir(String sourceDir, String targetDir) {
FileNode[] fileNodes = getFileTree().listFile(sourceDir); FileNode[] fileNodes = getFileTree().listFile(sourceDir);
if (ArrayUtils.isEmpty(fileNodes)) {
//空目录:相当于新建一个目录
DesignerFrameFileDealerPane.getInstance().getSelectedOperation().mkdir(targetDir);
}
for (FileNode fileNode : fileNodes) { for (FileNode fileNode : fileNodes) {
if (fileNode.isDirectory()) { if (fileNode.isDirectory()) {
copyDir(StableUtils.pathJoin(fileNode.getParent(), fileNode.getName()), StableUtils.pathJoin(targetDir, fileNode.getName())); copyDir(StableUtils.pathJoin(fileNode.getParent(), fileNode.getName()), StableUtils.pathJoin(targetDir, fileNode.getName()));
@ -520,7 +525,7 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
//检查源文件是不是还存在 //检查源文件是不是还存在
if (!WorkContext.getWorkResource().exist(sourcePath)) { if (!WorkContext.getWorkResource().exist(sourcePath)) {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Source_File_Not_Exist"), Toolkit.i18nText("Fine-Design_Basic_Source_File_Not_Exist", sourcePath),
Toolkit.i18nText("Fine-Design_Basic_Alert"), Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE); WARNING_MESSAGE);
} else { } else {

10
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -207,6 +207,16 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
selectedOperation.refresh(); selectedOperation.refresh();
} }
/**
* 刷新根目录并退出搜索模式
*/
public void refreshAndOutOfSearch() {
if (TemplateTreeSearchManager.getInstance().isInSearchMode()) {
TemplateTreeSearchManager.getInstance().outOfSearchMode();
}
refresh();
}
private JPanel createUpToolBarPane() { private JPanel createUpToolBarPane() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(toolBar, BorderLayout.CENTER); panel.add(toolBar, BorderLayout.CENTER);

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -1787,7 +1787,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().template.getTemplateID())) { HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().template.getTemplateID())) {
refreshToolArea(); refreshToolArea();
} }
DesignerFrameFileDealerPane.getInstance().refresh(); DesignerFrameFileDealerPane.getInstance().refreshAndOutOfSearch();
DesignerFrameFileDealerPane.getInstance().stateChange(); DesignerFrameFileDealerPane.getInstance().stateChange();
} }
}); });

7
designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirSearchRemindPane.java

@ -99,18 +99,17 @@ public class TemplateDirSearchRemindPane extends JPanel implements TreeSearchSta
scrollPane = new UIScrollPane(templateFileTree); scrollPane = new UIScrollPane(templateFileTree);
scrollPane.setBorder(null); scrollPane.setBorder(null);
notFoundPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); notFoundPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(false, FlowLayout.CENTER, 0, 5);
UILabel emptyPicLabel = new UILabel(); UILabel emptyPicLabel = new UILabel();
emptyPicLabel.setIcon(IconUtils.readIcon("com/fr/base/images/share/no_match_icon.png")); emptyPicLabel.setIcon(IconUtils.readIcon("com/fr/base/images/share/no_match_icon.png"));
emptyPicLabel.setHorizontalAlignment(SwingConstants.CENTER); emptyPicLabel.setHorizontalAlignment(SwingConstants.CENTER);
emptyPicLabel.setPreferredSize(new Dimension(240, 100)); emptyPicLabel.setPreferredSize(new Dimension(570, 100));
UILabel textLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tree_Search_Not_Match"), SwingConstants.CENTER); UILabel textLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tree_Search_Not_Match"), SwingConstants.CENTER);
textLabel.setForeground(Color.gray); textLabel.setForeground(Color.gray);
textLabel.setHorizontalAlignment(SwingConstants.CENTER); textLabel.setHorizontalAlignment(SwingConstants.CENTER);
textLabel.setPreferredSize(new Dimension(240, 20)); textLabel.setPreferredSize(new Dimension(570, 20));
notFoundPane.add(emptyPicLabel); notFoundPane.add(emptyPicLabel);
notFoundPane.add(textLabel); notFoundPane.add(textLabel);
notFoundPane.setBorder(BorderFactory.createEmptyBorder(80, 0, 0, 0));
cardLayout = new CardLayout(); cardLayout = new CardLayout();
this.setLayout(cardLayout); this.setLayout(cardLayout);

Loading…
Cancel
Save