1 19 20 21 package org.netbeans.modules.i18n; 22 23 24 import javax.swing.text.Position ; 25 26 27 31 public class HardCodedString extends Object { 32 33 34 private String text; 35 36 37 private Position startPosition; 38 39 40 private Position endPosition; 41 42 43 44 public HardCodedString(String text, Position startPosition, Position endPosition) { 45 this.text = text; 46 this.startPosition = startPosition; 47 this.endPosition = endPosition; 48 } 49 50 51 52 public String getText() { 53 return text; 54 } 55 56 57 public Position getStartPosition() { 58 return startPosition; 59 } 60 61 62 public Position getEndPosition() { 63 return endPosition; 64 } 65 66 67 public int getLength() { 68 return endPosition.getOffset() - startPosition.getOffset(); 69 } 70 } 71 | Popular Tags |