1 19 20 package org.netbeans.editor; 21 22 import javax.swing.text.Element ; 23 import javax.swing.text.JTextComponent ; 24 import javax.swing.text.View ; 25 import javax.swing.text.ViewFactory ; 26 import org.netbeans.api.editor.fold.Fold; 27 28 34 public class DrawEngineFakeDocView extends DrawEngineDocView{ 35 36 private boolean useCollapsing = true; 37 private int fakeStartOffset; 38 private int fakeEndOffset; 39 40 DrawEngineFakeDocView(Element elem, int startOffset, int endOffset, boolean useCollapsing){ 41 super(elem); 42 43 this.useCollapsing = useCollapsing; 44 this.fakeStartOffset = startOffset; 45 this.fakeEndOffset = endOffset; 46 setEstimatedSpan(false); 47 48 } 49 50 public int getStartOffset(){ 51 return fakeStartOffset; 52 } 53 54 public int getEndOffset(){ 55 return fakeEndOffset; 56 } 57 58 protected Fold nextCollapsedFold() { 59 return null; } 61 62 protected void attachListeners(){ 63 } 64 65 } 66 | Popular Tags |