Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Class MarkSelection


java.lang.Object
  extended by 
org.eclipse.jface.text.MarkSelection
All Implemented Interfaces:
IMarkSelection, ISelection

public class MarkSelection
extends Object
implements IMarkSelection

Default implementation of IMarkSelection.

Since:
2.0

Constructor Summary
MarkSelection ( IDocument document, int offset, int length)
          Creates a MarkSelection.
 
Method Summary
  IDocument getDocument ()
          Returns the marked document.
 int getLength ()
          Returns the length of the mark selection.
 int getOffset ()
          Returns the mark position.
 boolean isEmpty ()
          Returns whether this selection is empty.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkSelection

public MarkSelection(
IDocument document,
                     int offset,
                     int length)
Creates a MarkSelection.

Parameters:
document - the marked document
offset - the offset of the mark
length - the length of the mark, may be negative if caret before offset
Method Detail

getDocument

public 
IDocument getDocument()
Description copied from interface: IMarkSelection
Returns the marked document.

Specified by:
getDocument in interface IMarkSelection
Returns:
the marked document

getOffset

public int getOffset()
Description copied from interface: IMarkSelection
Returns the mark position. The offset may be -1 if there's no marked region.

Specified by:
getOffset in interface IMarkSelection
Returns:
the mark position or -1 if there is no marked region

getLength

public int getLength()
Description copied from interface: IMarkSelection
Returns the length of the mark selection. The length may be negative, if the caret is before the mark position. The length has no meaning if getOffset() returns -1.

Specified by:
getLength in interface IMarkSelection
Returns:
the length of the mark selection. Result is undefined for getOffset == -1

isEmpty

public boolean isEmpty()
Description copied from interface: ISelection
Returns whether this selection is empty.

Specified by:
isEmpty in interface ISelection
Returns:
true if this selection is empty, and false otherwise

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire