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.fieldassist
Interface IControlContentAdapter2

All Known Implementing Classes:
ComboContentAdapter, TextContentAdapter

public interface IControlContentAdapter2

This interface is used by a ContentProposalAdapter in order to retrieve and set the selection range in a control.

Since:
3.4

Method Summary
  Point getSelection ( Control control)
          Get the current selection range in the control.
 void setSelection ( Control control, Point range)
          Set the current selection range in the control.
 

Method Detail

getSelection


Point getSelection(
Control control)
Get the current selection range in the control. The x coordinate of the returned point is the position of the first selected character and the y coordinate of the returned point is the position of the last selected character. The positions are specified as a zero-based index into the string. Valid ranges are from 0 to N, where N is the size of the contents string. A value of N indicates that the last character is in the selection.

Parameters:
control - the control whose position is to be retrieved.
Returns:
a point representing the selection start and end

setSelection

void setSelection(
Control control,
                  
Point range)
Set the current selection range in the control. The x coordinate of the provided point is the position of the first selected character and the y coordinate of the point is the position of the last selected character. The positions are specified as a zero-based index into the string. Valid ranges are from 0 to N, where N is the size of the contents string. A value of N indicates that the last character is in the selection. If the x and y coordinates are the same, then there is no selection.

Parameters:
control - the control whose position is to be retrieved.
range - a point representing the selection start and end

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