1 19 20 package org.netbeans.lib.editor.view; 21 22 import javax.swing.text.Element ; 23 import javax.swing.text.View ; 24 25 33 34 public class GapMultiLineView extends GapBoxView { 35 36 private Element lastLineElement; 37 38 public GapMultiLineView(Element firstLineElement, Element lastLineElement) { 39 super(firstLineElement, View.X_AXIS); 41 42 setLastLineElement(lastLineElement); 43 } 44 45 public GapMultiLineView(Element firstLineElement) { 46 this(firstLineElement, firstLineElement); 47 } 48 49 protected final void setLastLineElement(Element lastLineElement) { 50 this.lastLineElement = lastLineElement; 51 } 52 53 protected Element getLastLineElement() { 54 return lastLineElement; 55 } 56 57 public int getEndOffset() { 58 return lastLineElement.getEndOffset(); 59 } 60 61 } 62 | Popular Tags |