1 19 package org.netbeans.api.editor.guards; 20 21 import java.beans.PropertyVetoException ; 22 import javax.swing.text.Position ; 23 import org.netbeans.modules.editor.guards.GuardedSectionImpl; 24 25 28 public class GuardedSection { 29 30 private final GuardedSectionImpl impl; 31 32 36 GuardedSection(GuardedSectionImpl impl) { 37 assert impl != null; 38 this.impl = impl; 39 impl.attach(this); 40 } 41 42 46 public String getName() { 47 return impl.getName(); 48 } 49 50 55 public void setName(String name) throws PropertyVetoException { 56 impl.setName(name); 57 } 58 59 64 public void deleteSection() { 65 impl.deleteSection(); 66 } 67 68 72 public boolean isValid() { 73 return impl.isValid(); 74 } 75 76 81 public void removeSection() { 82 impl.removeSection(); 83 } 84 85 90 public Position getCaretPosition() { 91 return impl.getCaretPosition(); 92 } 93 94 98 public String getText() { 99 return impl.getText(); 100 } 101 102 111 public boolean contains(Position pos, boolean permitHoles) { 112 return impl.contains(pos, permitHoles); 113 } 114 115 119 public Position getEndPosition() { 120 return impl.getEndPosition(); 121 } 122 123 127 public Position getStartPosition() { 128 return impl.getStartPosition(); 129 } 130 131 GuardedSectionImpl getImpl() { 132 return impl; 133 } 134 135 } 136 | Popular Tags |