1 package bluej.editor; 9 10 import java.awt.Rectangle ; 11 import java.awt.print.PrinterJob ; 12 import java.io.IOException ; 13 14 import javax.swing.text.BadLocationException ; 15 16 17 24 public interface Editor 25 { 26 35 boolean showFile(String filename, boolean compiled, String docFilename, Rectangle bounds); 36 37 41 void reloadFile(); 42 43 48 void clear(); 49 50 58 void insertText(String text, boolean caretBack); 59 60 68 void setSelection(int lineNumber, int column, int len); 69 70 78 void setSelection(int firstlineNumber, int firstColumn, 79 int secondLineNumber, int SecondColumn); 80 81 82 88 void setVisible(boolean vis); 89 90 95 boolean isShowing(); 96 97 105 void save() throws IOException ; 106 107 110 void close(); 111 112 115 void refresh(); 116 117 130 void displayMessage(String message, int lineNumber, int column, 131 boolean beep, boolean setStepMark, String help); 132 133 139 public void writeMessage(String msg); 140 141 142 147 void removeStepMark(); 148 149 155 void changeName(String title, String filename); 156 157 162 void setCompiled(boolean compiled); 163 164 167 void removeBreakpoints(); 168 169 174 boolean isModified(); 175 176 179 void print(PrinterJob printerJob); 180 181 185 void setReadOnly(boolean readOnly); 186 187 191 boolean isReadOnly(); 192 193 194 199 void showInterface(boolean interfaceStatus); 200 201 206 boolean isShowingInterface(); 207 208 214 Rectangle getBounds(); 215 216 217 222 public LineColumn getCaretLocation(); 223 224 230 public void setCaretLocation(LineColumn location); 231 232 233 238 public LineColumn getSelectionBegin(); 239 240 245 public LineColumn getSelectionEnd(); 246 247 255 public String getText( LineColumn begin, LineColumn end ); 256 257 268 public void setText( LineColumn begin, LineColumn end, String newText ) 269 throws BadLocationException ; 270 271 279 public void setSelection(LineColumn begin, LineColumn end); 280 281 286 public LineColumn getLineColumnFromOffset(int offset); 287 288 296 public int getOffsetFromLineColumn( LineColumn location ); 297 298 304 public Object getProperty(String propertyKey); 305 306 313 public void setProperty(String propertyKey, Object value); 314 315 321 public int getLineLength(int line); 322 323 326 public int numberOfLines(); 327 328 337 public int getTextLength (); 338 339 340 } | Popular Tags |