Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.text 6.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openide.text
Class PositionRef

    java.lang.Object
      org.openide.text.PositionRef

All Implemented Interfaces:
  Serializable

    public final class PositionRef

extends Object
implements Serializable

Reference to one position in a document. This position is held as an integer offset, or as a `Position` object. There is also support for serialization of positions.

See Also:
  Serialized Form

Method Summary
`CloneableEditorSupport` | `getCloneableEditorSupport()`
`int` | `getColumn()` Get the column number where this position points to.
`int` | `getLine()` Get the line number where this position points to.
`int` | `getOffset()`
`Position` | `getPosition()`
`Position.Bias` | `getPositionBias()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getCloneableEditorSupport

    public CloneableEditorSupport getCloneableEditorSupport()

  Returns:
    the appropriate manager for this position ref.

### getPositionBias

    public Position.Bias getPositionBias()

  Returns:
    the bias of the position

### getPosition

    public Position getPosition()
                         throws IOException

  Returns:
    the position as swing.text.Position object.
  Throws:
    `IOException` - when an exception occured during reading the file.

### getOffset

    public int getOffset()

  Returns:
    the position as offset index in the file.

### getLine

    public int getLine()
                throws IOException

  Get the line number where this position points to.

  Returns:
    the line number for this position
  Throws:
    `IOException` - if the document could not be opened to check the line number

### getColumn

    public int getColumn()
                  throws IOException

  Get the column number where this position points to.

  Returns:
    the column number within a line (counting starts from zero)
  Throws:
    `IOException` - if the document could not be opened to check the column number

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.text 6.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.