|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.biltmore.tools.fileeditor.Position
public class Position
This represents a position in a text file by line number and column. The origin is at 1,1 not 0,0! Trying to set a value less than 1 will set it to 1.
Constructor Summary | |
---|---|
Position()
Creates a new instance of Position. |
|
Position(int column,
int line)
Creates a new instance of Position. |
Method Summary | |
---|---|
void |
adjustLimits(int maxLines,
int maxColumns)
Adjusts the position to be withing limits. |
Position |
clone()
Returns a clone of this Position. |
void |
decrementColumnm()
Decrements the column. |
void |
decrementLine()
Decrements the line number. |
int |
getColumn()
Returns the current column number. |
int |
getLine()
Returns the number of current line. |
void |
incrementColumn()
Increments the column. |
void |
incrementLine()
Increments the line number. |
void |
setColumn(int column)
Sets the current column. |
void |
setColumn(int column,
int maxColumn)
Sets the current column. |
void |
setLine(int line)
Sets the line of the position. |
void |
setLine(int line,
int maxLine)
Sets the line of the position. |
String |
toString()
Returns a String representation of the position. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Position()
public Position(int column, int line)
line
- The line this position points to.column
- The column this position points to.Method Detail |
---|
public void adjustLimits(int maxLines, int maxColumns)
maxLines
- maxColumns
- public void setLine(int line)
line
- The line to set.public void setLine(int line, int maxLine)
line
- The line to set.maxLine
- The maximul line that can be set.public int getLine()
public void setColumn(int column)
column
- The colum to set.public void setColumn(int column, int maxColumn)
column
- The colum to set.maxColumn
- the max column that can be set.public int getColumn()
public void incrementLine()
public void decrementLine()
public void incrementColumn()
public void decrementColumnm()
public Position clone()
clone
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |