001: /*
002: * Line.java
003: *
004: * Copyright (C) 1998-2002 Peter Graves
005: * $Id: Line.java,v 1.1.1.1 2002/09/24 16:08:10 piso Exp $
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License
009: * as published by the Free Software Foundation; either version 2
010: * of the License, or (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
020: */
021:
022: package org.armedbear.j;
023:
024: import java.io.UnsupportedEncodingException;
025:
026: public interface Line {
027: Line previous();
028:
029: void setPrevious(Line line);
030:
031: Line next();
032:
033: void setNext(Line line);
034:
035: void insertAfter(Line line);
036:
037: String getText();
038:
039: void setText(String s);
040:
041: String getOriginalText();
042:
043: void setOriginalText(String s);
044:
045: boolean isModified();
046:
047: boolean isNew();
048:
049: void setNew(boolean b);
050:
051: boolean isSaved();
052:
053: void setSaved(boolean b);
054:
055: void unmodified();
056:
057: int lineNumber();
058:
059: void setLineNumber(int n);
060:
061: int originalLineNumber();
062:
063: void setOriginalLineNumber(int n);
064:
065: int getHeight();
066:
067: int getWidth();
068:
069: int flags();
070:
071: void setFlags(int flags);
072:
073: char charAt(int i);
074:
075: String substring(int beginIndex);
076:
077: String substring(int beginIndex, int endIndex);
078:
079: String trim();
080:
081: int length();
082:
083: byte[] getBytes(String encoding)
084: throws UnsupportedEncodingException;
085:
086: boolean isBlank();
087:
088: int getIndentation();
089:
090: boolean isHidden();
091:
092: void hide();
093:
094: void unhide();
095:
096: void show();
097:
098: int getHidden();
099:
100: void setHidden(int hidden);
101:
102: Line previousVisible();
103:
104: Line nextVisible();
105:
106: boolean isBefore(Line line);
107:
108: Line copy();
109:
110: void copy(Line line);
111:
112: Annotation getAnnotation();
113:
114: void setAnnotation(Annotation annotation);
115: }
|