コード例 #1
0
 public void readExternal(Element element) throws InvalidDataException {
   List<Element> subPanes = element.getChildren(ELEMENT_SUBPANE);
   for (Element subPane : subPanes) {
     String subId = subPane.getAttributeValue(ATTRIBUTE_SUBID);
     TreeState treeState = new TreeState();
     treeState.readExternal(subPane);
     myReadTreeState.put(subId, treeState);
   }
 }
コード例 #2
0
 public void writeExternal(Element element) throws WriteExternalException {
   saveExpandedPaths();
   for (String subId : myReadTreeState.keySet()) {
     TreeState treeState = myReadTreeState.get(subId);
     Element subPane = new Element(ELEMENT_SUBPANE);
     if (subId != null) {
       subPane.setAttribute(ATTRIBUTE_SUBID, subId);
     }
     treeState.writeExternal(subPane);
     element.addContent(subPane);
   }
 }
コード例 #3
0
 private void restoreState() {
   myTreeState.applyTo(this, (ChangesBrowserNode) getModel().getRoot());
 }
コード例 #4
0
 private void storeState() {
   myTreeState = TreeState.createOn(this, (ChangesBrowserNode) getModel().getRoot());
 }
コード例 #5
0
 public final void restoreExpandedPaths() {
   TreeState treeState = myReadTreeState.get(getSubId());
   if (treeState != null) {
     treeState.applyTo(myTree);
   }
 }
コード例 #6
0
 protected void saveExpandedPaths() {
   if (myTree != null) {
     TreeState treeState = TreeState.createOn(myTree);
     myReadTreeState.put(getSubId(), treeState);
   }
 }