예제 #1
0
  public void unfold(boolean programmaticaly) {
    if (!isFolded()) {
      return;
    }
    setFolded(false);
    if (!isUnderFolded()) {
      removeUnfoldingListener();
      addUnfoldingListenerForChildren();
    }

    if (!programmaticaly) {
      getContext().flushEvents();
      getEditor().relayout();
      adjustSelectionToFoldingState(getEditor());
    }
  }
예제 #2
0
 public void fold(boolean programmaticaly) {
   if (!canBePossiblyFolded()) return;
   if (isFolded()) {
     // updating editor's myFoldedCells set (sometimes this method is called from Memento)
     getEditor().setFolded(this, true);
     return;
   }
   setFolded(true);
   if (!isUnderFolded()) {
     addUnfoldingListener();
     removeFoldingListenerForChildren();
   }
   if (!programmaticaly) {
     getContext().flushEvents();
     getEditor().relayout();
     adjustSelectionToFoldingState(getEditor());
   }
 }