1 21 22 package org.armedbear.j; 23 24 public final class PlainTextFormatter extends Formatter 25 { 26 private static final byte FORMAT_TEXT = 0; 27 28 public PlainTextFormatter(Buffer buffer) 29 { 30 this.buffer = buffer; 31 } 32 33 public LineSegmentList formatLine(Line line) 34 { 35 clearSegmentList(); 36 addSegment(getDetabbedText(line), FORMAT_TEXT); 37 return segmentList; 38 } 39 40 public FormatTable getFormatTable() 41 { 42 if (formatTable == null) { 43 formatTable = new FormatTable(null); 44 formatTable.addEntryFromPrefs(FORMAT_TEXT, "text"); 45 } 46 return formatTable; 47 } 48 } 49 | Popular Tags |