1 19 20 package org.openharmonise.him.displaycomponents; 21 22 import org.openharmonise.him.displaycomponents.table.*; 23 import org.openharmonise.him.dnd.*; 24 import org.openharmonise.him.swing.resourcetree.*; 25 import org.openharmonise.him.window.*; 26 import org.openharmonise.vfs.*; 27 import org.openharmonise.vfs.servers.*; 28 29 37 public abstract class AbstractTreeTableDisplayComponent 38 extends AbstractDisplayComponent implements TreeViewListener, TableListener { 39 40 43 protected ResourceTree m_resourceTree = null; 44 45 48 protected TableView m_tableView = null; 49 50 55 public AbstractTreeTableDisplayComponent(DisplayManager displayManager) { 56 super(displayManager); 57 this.setup(); 58 } 59 60 67 public AbstractTreeTableDisplayComponent(DisplayManager displayManager, Server server, String sPath) { 68 super(displayManager); 69 this.setup(); 70 this.addServerAndPath(server, sPath); 71 } 72 73 80 public void addServerAndPath(Server server, String sPath) { 81 this.m_resourceTree.addCollection(server.getVFS().getVirtualFile(sPath).getResource()); 82 } 83 84 88 private void setup() { 89 this.m_resourceTree = new ResourceTree(); 90 this.m_resourceTree.setShowLeafNodes(false); 91 this.m_resourceTree.addListener(this); 92 TreeDropTarget treeTarget = new TreeDropTarget(this.m_resourceTree); 93 this.m_tableView = new TableView(this); 94 } 95 96 101 public ResourceTree getTreeView() { 102 return this.m_resourceTree; 103 } 104 105 110 public TableView getTableView() { 111 return this.m_tableView; 112 } 113 114 119 public void openPathInTree(String sPath) { 120 this.m_resourceTree.openPath(sPath); 121 } 122 123 126 abstract public void virtualFileSelected(AbstractVirtualFileSystem vfs, String sPath); 127 128 131 abstract public void fileSelection(TableEntry entry); 132 133 139 abstract public void fileSelection(VersionEntry entry); 140 141 } 142
| Popular Tags
|