Browse Source

REPORT-82112 模板锁定,超管强制解锁的按钮没了

newui
John.Ying 2 years ago
parent
commit
a1e3c00270
  1. 21
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java

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

@ -172,8 +172,8 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
tooBarPane.add(new UIMenuHighLight(), BorderLayout.SOUTH);
searchToolbarPane = new TemplateTreeSearchToolbarPane(toolBar);
searchToolbarPane.add(createUpToolBarPane(), BorderLayout.EAST);
searchToolbarPane.setPreferredSize(new Dimension(this.getWidth(), 23));
add(searchToolbarPane, BorderLayout.NORTH);
CardLayout card;
JPanel cardPane = new JPanel(card = new CardLayout());
@ -183,7 +183,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
card.show(cardPane, FILE);
TemplateTreePane.getInstance().setToolbarStateChangeListener(this);
add(cardPane, BorderLayout.CENTER);
stateChange();
}
@ -219,7 +218,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
private JPanel createUpToolBarPane() {
JPanel panel = new JPanel(new BorderLayout());
panel.add(toolBar, BorderLayout.CENTER);
if (WorkContext.getCurrent().isRoot()) {
rightToolBar = new UIToolbar(FlowLayout.RIGHT);
rightToolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR));
@ -461,6 +459,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public void actionPerformed(ActionEvent e) {
// 交换层级
searchToolbarPane.switchPane(TemplateTreeSearchToolbarPane.SEARCH_PANE);
refreshRightToolBarByContentPaneType();
TemplateTreePane.getInstance().refreshDockingView();
TemplateTreeSearchManager.getInstance().switchToSearch(TemplateTreePane.getInstance().getTemplateFileTree());
}
@ -595,8 +594,24 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
}
}
/**
* 搜索状态下不显示rightToolBar
*/
public void refreshRightToolBarByContentPaneType() {
if (rightToolBar != null) {
if (StringUtils.equals(TemplateTreeSearchToolbarPane.CONTENT_PANE_TYPE, TemplateTreeSearchToolbarPane.SEARCH_PANE)) {
rightToolBar.setVisible(false);
}
}
}
public void refreshRightToolBarBy(FileNode fileNode) {
if (rightToolBar != null) {
if (StringUtils.equals(TemplateTreeSearchToolbarPane.CONTENT_PANE_TYPE, TemplateTreeSearchToolbarPane.SEARCH_PANE)) {
rightToolBar.setVisible(false);
return;
}
boolean locked = fileNode != null
&& StringUtils.isNotEmpty(fileNode.getLock())
&& !ComparatorUtils.equals(fileNode.getLock(), fileNode.getUserID());

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

@ -39,6 +39,11 @@ public class TemplateTreeSearchToolbarPane extends JPanel implements TreeSearchS
public static final String SEARCH_PANE = "searchPane";
/**
* 判断工具栏是处于搜索栏还是非搜索栏
*/
public static String CONTENT_PANE_TYPE = "toolbarPane";
/**
* 工具栏
*/
@ -187,6 +192,7 @@ public class TemplateTreeSearchToolbarPane extends JPanel implements TreeSearchS
*/
public void switchPane(String name) {
cardLayout.show(contentPane, name);
CONTENT_PANE_TYPE = name;
}
public void setPlaceHolder(String placeHolder) {

Loading…
Cancel
Save