Browse Source

Merge pull request #788 in DESIGN/design from ~NEIL/design:release/10.0 to release/10.0

* commit 'ef77e35524c88b8ed342cb1e60cdb43fa4c6ab9c':
  git
  git
  REPORT-14840 权限细粒度退出后, 角色树清除选中项.
bugfix/10.0
neil 6 years ago
parent
commit
bf0fed8f38
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/DesignAuthorityEventType.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  3. 28
      designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java

11
designer-base/src/main/java/com/fr/design/mainframe/DesignAuthorityEventType.java

@ -0,0 +1,11 @@
package com.fr.design.mainframe;
import com.fr.event.Event;
public enum DesignAuthorityEventType implements Event<DesignerFrame> {
// 退出权限编辑
StartEdit,
// 进入权限编辑
StopEdit;
}

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

@ -39,6 +39,7 @@ import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.MenuManager; import com.fr.design.menu.MenuManager;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.EventDispatcher;
import com.fr.exception.DecryptTemplateException; import com.fr.exception.DecryptTemplateException;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEFactory; import com.fr.file.FILEFactory;
@ -333,6 +334,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
needToAddAuhtorityPaint(); needToAddAuhtorityPaint();
refreshDottedLine(); refreshDottedLine();
fireAuthorityStateToNomal(); fireAuthorityStateToNomal();
EventDispatcher.fire(DesignAuthorityEventType.StopEdit, DesignerFrame.this);
} }
/** /**

28
designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -11,18 +11,29 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignAuthorityEventType;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.DockingView; import com.fr.design.mainframe.DockingView;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import javax.swing.*; import com.fr.event.Listener;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTree;
import javax.swing.ScrollPaneConstants;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionEvent;
import javax.swing.tree.DefaultTreeSelectionModel;
import javax.swing.tree.TreeNode; import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -40,6 +51,15 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
private static ReportAndFSManagePane singleton = new ReportAndFSManagePane(); private static ReportAndFSManagePane singleton = new ReportAndFSManagePane();
private static RoleTree roleTree; private static RoleTree roleTree;
static {
EventDispatcher.listen(DesignAuthorityEventType.StopEdit, new Listener<DesignerFrame>() {
public void on(Event event, DesignerFrame param) {
DefaultTreeSelectionModel model = roleTree.getCheckBoxTreeSelectionModel();
model.removeSelectionPaths(model.getSelectionPaths());
}
});
}
private RefreshAction refreshAction = new RefreshAction(); private RefreshAction refreshAction = new RefreshAction();
private UIHeadGroup buttonGroup; private UIHeadGroup buttonGroup;
private RoleSourceOP op; private RoleSourceOP op;

Loading…
Cancel
Save