public void treeCollapsed (TreeExpansionEvent ev) { String evPathString = ev.getPath().toString(); evPathString = evPathString.substring(evPathString.indexOf("[")+1,evPathString.lastIndexOf("]")); evPathString = evPathString.substring(getTitle().length()+2,evPathString.length()); String rootPath = getRootPath().toString(); rootPath = rootPath.substring(rootPath.indexOf("[")+1,rootPath.lastIndexOf("]")); String path = "["+rootPath +", "+evPathString+"]"; pcp.unsetExpandedStateProperty(path); }
public void treeCollapsed (TreeExpansionEvent ev) { String evPathString = ev.getPath().toString(); evPathString = evPathString.substring(evPathString.indexOf("[")+1,evPathString.lastIndexOf("]")); evPathString = evPathString.substring(getTitle().length()+2,evPathString.length()); String rootPath = getRootPath().toString(); rootPath = rootPath.substring(rootPath.indexOf("[")+1,rootPath.lastIndexOf("]")); String path = "["+rootPath +", "+evPathString+"]"; pcp.unsetExpandedStateProperty(path); }
public void treeExpanded(TreeExpansionEvent ev) { TreePath evPath = ev.getPath(); //DefaultMutableTreeNode node = (DefaultMutableTreeNode)evPath.getLastPathComponent(); String evPathString = ev.getPath().toString(); evPathString = pcp.pStr2Key(evPathString); evPathString = evPathString.substring(getTitle().length()+1,evPathString.length()); String rootPath = getRootPath().toString(); rootPath = pcp.pStr2Key(rootPath); //String path = rootPath+"."+evPathString; String path = rootPath+"."+evPathString; if (pcp.hasPanelShowingProperty(path)) { Hashtable panels = pcp.getPanels(); TreePanel p = (TreePanel)panels.get(path); if(p!=null) p.close(); } pcp.setExpandedStateProperty(path); }
public void treeExpanded(TreeExpansionEvent ev) { TreePath evPath = ev.getPath(); //DefaultMutableTreeNode node = (DefaultMutableTreeNode)evPath.getLastPathComponent(); String evPathString = ev.getPath().toString(); evPathString = pcp.pStr2Key(evPathString); evPathString = evPathString.substring(getTitle().length()+1,evPathString.length()); String rootPath = getRootPath().toString(); rootPath = pcp.pStr2Key(rootPath); //String path = rootPath+"."+evPathString; String path = rootPath+"."+evPathString; if (pcp.hasPanelShowingProperty(path)) { Hashtable panels = pcp.getPanels(); TreePanel p = (TreePanel)panels.get(path); if(p!=null) p.close(); } pcp.setExpandedStateProperty(path); }