Browse Source

Merge pull request #15987 in DESIGN/design from fbp/release to fbp/feature

* commit '7b6e5a975e026cba9c3c96f52dc1a8cdb02aa721':
  Revert "REPORT-145379 远程设计调试工具适配gzip"
  REPORT-145379 远程设计调试工具适配gzip
  REPORT-145372 修复设计器双击模板tab栏后台NPE的问题
  Revert "REPORT-145338 修复远程切换大量exist操作的问题"
  REPORT-145338 修复远程切换大量exist操作的问题
fbp/feature
superman 1 month ago
parent
commit
30f54e3c47
  1. 23
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java
  2. 3
      designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java

23
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -116,7 +116,6 @@ public class MultiTemplateTabPane extends Row {
private boolean hoverMoreAction = false;
private Icon clodeIcon = new LazyIcon("clear");
private boolean isShowList = false;
private JButton leadingActionButton;
private final UIToolbar leadingToolBar = new UIToolbar();
//自动新建的模板B若没有进行任何编辑,切换到其他
@ -203,17 +202,6 @@ public class MultiTemplateTabPane extends Row {
updateLeadingToolBar();
}
/**
* 为前导动作添加监听
*
* @param l 监听器
*/
public void addLeadingAction(ActionListener l) {
newTemplateAction = l;
leadingActionButton.removeActionListener(newTemplateAction);
leadingActionButton.addActionListener(newTemplateAction);
}
public void setToolBarEnable(boolean enable) {
leadingToolBar.setEnabled(enable);
}
@ -787,7 +775,9 @@ public class MultiTemplateTabPane extends Row {
public void mouseClicked(MouseEvent e) {
// 双击添加模板
if (e.getClickCount() == DOUBLE_CLICK
&& isOverBlank(e.getX())) {
&& isOverBlank(e.getX())
&& newTemplateAction != null
) {
newTemplateAction.actionPerformed(null);
}
}
@ -1003,6 +993,7 @@ public class MultiTemplateTabPane extends Row {
/**
* 创建新建模板的前导区工具按钮
*
* @return
*/
private ToolBarDef createLeadingToolBarDef() {
@ -1013,17 +1004,21 @@ public class MultiTemplateTabPane extends Row {
/**
* 创建新建文件的按钮数组
*
* @return
*/
public ShortCut[] createNewTemplateShortCuts() {
ArrayList<ShortCut> shortCuts = new ArrayList<ShortCut>();
shortCuts.add(new NewWorkBookToolButtonAction());
NewWorkBookToolButtonAction action = new NewWorkBookToolButtonAction();
shortCuts.add(action);
newTemplateAction = action;
return shortCuts.toArray(new ShortCut[0]);
}
/**
* 插入插件中的按钮
*
* @return
*/
protected void insertLeadingToolButton(ToolBarDef toolBarDef, String anchor) {

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

@ -98,8 +98,7 @@ public class CenterRegionContainerPane extends JPanel {
}
private MultiTemplateTabPane initTemplateTabPane() {
MultiTemplateTabPane templateTabPane = MultiTemplateTabPane.getInstance();
return templateTabPane;
return MultiTemplateTabPane.getInstance();
}
public ToolBarMenuDock getToolBarMenuDock() {

Loading…
Cancel
Save