PageRenderTime 116ms CodeModel.GetById 111ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre3/org/gjt/sp/jedit/buffer/LineElement.java

#
Java | 111 lines | 53 code | 14 blank | 44 comment | 0 complexity | b6c8dbb8f7427dee8cc3b4ff70b44232 MD5 | raw file
  1/*
  2 * LineElement.java - For compatibility with Swing document API
  3 * :tabSize=8:indentSize=8:noTabs=false:
  4 * :folding=explicit:collapseFolds=1:
  5 *
  6 * Copyright (C) 2001 Slava Pestov
  7 *
  8 * This program is free software; you can redistribute it and/or
  9 * modify it under the terms of the GNU General Public License
 10 * as published by the Free Software Foundation; either version 2
 11 * of the License, or any later version.
 12 *
 13 * This program is distributed in the hope that it will be useful,
 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16 * GNU General Public License for more details.
 17 *
 18 * You should have received a copy of the GNU General Public License
 19 * along with this program; if not, write to the Free Software
 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 21 */
 22
 23package org.gjt.sp.jedit.buffer;
 24
 25//{{{ Imports
 26import javax.swing.text.*;
 27import org.gjt.sp.jedit.Buffer;
 28//}}}
 29
 30/**
 31 * A class internal to jEdit's document model. You should not use it
 32 * directly.
 33 *
 34 * @author Slava Pestov
 35 * @version $Id: LineElement.java 3843 2001-10-20 09:32:23Z spestov $
 36 * @since jEdit 4.0pre1
 37 */
 38public class LineElement implements Element
 39{
 40	//{{{ LineElement constructor
 41	public LineElement(Buffer buffer, int line)
 42	{
 43		this.buffer = buffer;
 44		this.line = line;
 45	} //}}}
 46
 47	//{{{ getDocument() method
 48	public Document getDocument()
 49	{
 50		return null;
 51	} //}}}
 52
 53	//{{{ getParentElement() method
 54	public Element getParentElement()
 55	{
 56		return null;
 57	} //}}}
 58
 59	//{{{ getName() method
 60	public String getName()
 61	{
 62		return null;
 63	} //}}}
 64
 65	//{{{ getAttributes() method
 66	public AttributeSet getAttributes()
 67	{
 68		return null;
 69	} //}}}
 70
 71	//{{{ getStartOffset() method
 72	public int getStartOffset()
 73	{
 74		return buffer.getLineStartOffset(line);
 75	} //}}}
 76
 77	//{{{ getEndOffset() method
 78	public int getEndOffset()
 79	{
 80		return buffer.getLineEndOffset(line);
 81	} //}}}
 82
 83	//{{{ getElementIndex() method
 84	public int getElementIndex(int offset)
 85	{
 86		return 0;
 87	} //}}}
 88
 89	//{{{ getElementCount() method
 90	public int getElementCount()
 91	{
 92		return 0;
 93	} //}}}
 94
 95	//{{{ getElement() method
 96	public Element getElement(int line)
 97	{
 98		return null;
 99	} //}}}
100
101	//{{{ isLeaf() method
102	public boolean isLeaf()
103	{
104		return true;
105	} //}}}
106
107	//{{{ Private members
108	private Buffer buffer;
109	private int line;
110	//}}}
111} //}}}