1 19 20 package org.netbeans.api.editor.fold; 21 22 38 39 public final class FoldHierarchyEvent extends java.util.EventObject { 40 41 private Fold[] removedFolds; 42 43 private Fold[] addedFolds; 44 45 private FoldStateChange[] foldStateChanges; 46 47 private int affectedStartOffset; 48 49 private int affectedEndOffset; 50 51 64 FoldHierarchyEvent(FoldHierarchy source, 65 Fold[] removedFolds, Fold[] addedFolds, 66 FoldStateChange[] foldStateChanges, int affectedStartOffset, int affectedEndOffset) { 67 68 super(source); 69 70 this.removedFolds = removedFolds; 71 this.addedFolds = addedFolds; 72 this.foldStateChanges = foldStateChanges; 73 this.affectedStartOffset = affectedStartOffset; 74 this.affectedEndOffset = affectedEndOffset; 75 } 76 77 82 public int getRemovedFoldCount() { 83 return removedFolds.length; 84 } 85 86 93 public Fold getRemovedFold(int removedFoldIndex) { 94 return removedFolds[removedFoldIndex]; 95 } 96 97 102 public int getAddedFoldCount() { 103 return addedFolds.length; 104 } 105 106 113 public Fold getAddedFold(int addedFoldIndex) { 114 return addedFolds[addedFoldIndex]; 115 } 116 117 122 public int getFoldStateChangeCount() { 123 return foldStateChanges.length; 124 } 125 126 132 public FoldStateChange getFoldStateChange(int index) { 133 return foldStateChanges[index]; 134 } 135 136 142 public int getAffectedStartOffset() { 143 return affectedStartOffset; 144 } 145 146 153 public int getAffectedEndOffset() { 154 return affectedEndOffset; 155 } 156 157 public String toString() { 158 return org.netbeans.modules.editor.fold.FoldUtilitiesImpl.foldHierarchyEventToString(this); 159 } 160 161 } 162 | Popular Tags |