diff --git a/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java b/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java index 9bbd53616b..eecd623004 100644 --- a/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java +++ b/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java @@ -48,7 +48,7 @@ public class EnvFileTree extends RefreshableJTree { this.setFileNodeFilter(filter); this.setSubPathes(subPathes); - this.init(); + this.initi(); } private void setTreeRootPath(String path) { @@ -63,7 +63,7 @@ public class EnvFileTree extends RefreshableJTree { this.filter = filter; } - protected void init() { + protected void initi() { this.putClientProperty("JTree.lineStyle", "Angled"); this.setCellRenderer(fileTreeCellRenderer); diff --git a/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java b/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java index a68e840bb1..2326bcbf59 100644 --- a/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java +++ b/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java @@ -24,7 +24,7 @@ public class RemoteDesignAuthorityManagerAction extends UpdateAction { @Override public void actionPerformed(ActionEvent e) { - AuthorityManagerPane managerPane = new AuthorityManagerPane(); + final AuthorityManagerPane managerPane = new AuthorityManagerPane(); BasicDialog dialog = managerPane.showWindow(DesignerContext.getDesignerFrame()); @@ -34,7 +34,7 @@ public class RemoteDesignAuthorityManagerAction extends UpdateAction { dialog.addDialogActionListener(new DialogActionAdapter() { @Override public void doOk() { - //todo save contents into database by hibernate + managerPane.update(); } @Override diff --git a/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java b/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java index b61f9250ce..f74cc504e6 100644 --- a/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java +++ b/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java @@ -11,6 +11,7 @@ import com.fr.file.filetree.IOFileNodeFilter; import javax.swing.BorderFactory; import java.awt.BorderLayout; +import java.util.Arrays; public class AuthorityEditorPane extends BasicBeanPane { @@ -24,6 +25,7 @@ public class AuthorityEditorPane extends BasicBeanPane { this.setBorder(BorderFactory.createEmptyBorder()); this.add(label, BorderLayout.NORTH); IOFileNodeFilter filter = new IOFileNodeFilter(new String[]{".cpt", ".class", ".frm", ".form"}); + tree.setDigIn(true); tree.setFileNodeFilter(filter); this.add(new UIScrollPane(tree), BorderLayout.CENTER); tree.refreshEnv(FRContext.getCurrentEnv()); @@ -43,6 +45,7 @@ public class AuthorityEditorPane extends BasicBeanPane { @Override public RemoteDesignAuthority updateBean() { // todo 更新权限信息 + System.out.println(Arrays.toString(tree.getCheckBoxTreeSelectionModel().getSelectionPaths())); return new RemoteDesignAuthority(); } } diff --git a/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java b/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java index 877d7fe157..46943677a7 100644 --- a/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java +++ b/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java @@ -30,7 +30,7 @@ public class AuthorityManagerPane extends BasicPane { list.populate(authorities); } - private RemoteDesignAuthority[] update() { + public RemoteDesignAuthority[] update() { return list.update(); } diff --git a/designer-base/src/com/fr/design/remote/ui/tree/FileAuthorityTree.java b/designer-base/src/com/fr/design/remote/ui/tree/FileAuthorityTree.java index 7389049cb1..5d3203eeb5 100644 --- a/designer-base/src/com/fr/design/remote/ui/tree/FileAuthorityTree.java +++ b/designer-base/src/com/fr/design/remote/ui/tree/FileAuthorityTree.java @@ -2,5 +2,15 @@ package com.fr.design.remote.ui.tree; import com.fr.design.gui.itree.filetree.TemplateFileTree; +import javax.swing.tree.TreePath; + public class FileAuthorityTree extends TemplateFileTree { + + @Override + public boolean isCheckBoxVisible(TreePath path) { +// return super.isCheckBoxVisible(path); + return true; + } + + }