Browse Source

todo update tree

master
yaoh.wu 7 years ago
parent
commit
89e0532df1
  1. 4
      designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  2. 4
      designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java
  3. 3
      designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java
  4. 2
      designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java
  5. 10
      designer-base/src/com/fr/design/remote/ui/tree/FileAuthorityTree.java

4
designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -48,7 +48,7 @@ public class EnvFileTree extends RefreshableJTree {
this.setFileNodeFilter(filter); this.setFileNodeFilter(filter);
this.setSubPathes(subPathes); this.setSubPathes(subPathes);
this.init(); this.initi();
} }
private void setTreeRootPath(String path) { private void setTreeRootPath(String path) {
@ -63,7 +63,7 @@ public class EnvFileTree extends RefreshableJTree {
this.filter = filter; this.filter = filter;
} }
protected void init() { protected void initi() {
this.putClientProperty("JTree.lineStyle", "Angled"); this.putClientProperty("JTree.lineStyle", "Angled");
this.setCellRenderer(fileTreeCellRenderer); this.setCellRenderer(fileTreeCellRenderer);

4
designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java

@ -24,7 +24,7 @@ public class RemoteDesignAuthorityManagerAction extends UpdateAction {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
AuthorityManagerPane managerPane = new AuthorityManagerPane(); final AuthorityManagerPane managerPane = new AuthorityManagerPane();
BasicDialog dialog = managerPane.showWindow(DesignerContext.getDesignerFrame()); BasicDialog dialog = managerPane.showWindow(DesignerContext.getDesignerFrame());
@ -34,7 +34,7 @@ public class RemoteDesignAuthorityManagerAction extends UpdateAction {
dialog.addDialogActionListener(new DialogActionAdapter() { dialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
//todo save contents into database by hibernate managerPane.update();
} }
@Override @Override

3
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 javax.swing.BorderFactory;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.util.Arrays;
public class AuthorityEditorPane extends BasicBeanPane<RemoteDesignAuthority> { public class AuthorityEditorPane extends BasicBeanPane<RemoteDesignAuthority> {
@ -24,6 +25,7 @@ public class AuthorityEditorPane extends BasicBeanPane<RemoteDesignAuthority> {
this.setBorder(BorderFactory.createEmptyBorder()); this.setBorder(BorderFactory.createEmptyBorder());
this.add(label, BorderLayout.NORTH); this.add(label, BorderLayout.NORTH);
IOFileNodeFilter filter = new IOFileNodeFilter(new String[]{".cpt", ".class", ".frm", ".form"}); IOFileNodeFilter filter = new IOFileNodeFilter(new String[]{".cpt", ".class", ".frm", ".form"});
tree.setDigIn(true);
tree.setFileNodeFilter(filter); tree.setFileNodeFilter(filter);
this.add(new UIScrollPane(tree), BorderLayout.CENTER); this.add(new UIScrollPane(tree), BorderLayout.CENTER);
tree.refreshEnv(FRContext.getCurrentEnv()); tree.refreshEnv(FRContext.getCurrentEnv());
@ -43,6 +45,7 @@ public class AuthorityEditorPane extends BasicBeanPane<RemoteDesignAuthority> {
@Override @Override
public RemoteDesignAuthority updateBean() { public RemoteDesignAuthority updateBean() {
// todo 更新权限信息 // todo 更新权限信息
System.out.println(Arrays.toString(tree.getCheckBoxTreeSelectionModel().getSelectionPaths()));
return new RemoteDesignAuthority(); return new RemoteDesignAuthority();
} }
} }

2
designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java

@ -30,7 +30,7 @@ public class AuthorityManagerPane extends BasicPane {
list.populate(authorities); list.populate(authorities);
} }
private RemoteDesignAuthority[] update() { public RemoteDesignAuthority[] update() {
return list.update(); return list.update();
} }

10
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 com.fr.design.gui.itree.filetree.TemplateFileTree;
import javax.swing.tree.TreePath;
public class FileAuthorityTree extends TemplateFileTree { public class FileAuthorityTree extends TemplateFileTree {
@Override
public boolean isCheckBoxVisible(TreePath path) {
// return super.isCheckBoxVisible(path);
return true;
}
} }

Loading…
Cancel
Save