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

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
Class SimpleContentProposalProvider

java.lang.Object
  extended by 
org.eclipse.jface.fieldassist.SimpleContentProposalProvider
All Implemented Interfaces:
IContentProposalProvider

public class SimpleContentProposalProvider
extends Object
implements IContentProposalProvider

SimpleContentProposalProvider is a class designed to map a static list of Strings to content proposals.

Since:
3.2
See Also:
IContentProposalProvider

Constructor Summary
SimpleContentProposalProvider ( String[] proposals)
          Construct a SimpleContentProposalProvider whose content proposals are always the specified array of Objects.
 
Method Summary
  IContentProposal[] getProposals ( String contents, int position)
          Return an array of Objects representing the valid content proposals for a field.
 void setFiltering (boolean filterProposals)
          Set the boolean that controls whether proposals are filtered according to the current field content.
 void setProposals ( String[] items)
          Set the Strings to be used as content proposals.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContentProposalProvider

public SimpleContentProposalProvider(
String[] proposals)
Construct a SimpleContentProposalProvider whose content proposals are always the specified array of Objects.

Parameters:
proposals - the array of Strings to be returned whenever proposals are requested.
Method Detail

getProposals

public 
IContentProposal[] getProposals(
String contents,
                                       int position)
Return an array of Objects representing the valid content proposals for a field.

Specified by:
getProposals in interface IContentProposalProvider
Parameters:
contents - the current contents of the field (only consulted if filtering is set to true)
position - the current cursor position within the field (ignored)
Returns:
the array of Objects that represent valid proposals for the field given its current content.

setProposals

public void setProposals(
String[] items)
Set the Strings to be used as content proposals.

Parameters:
items - the array of Strings to be used as proposals.

setFiltering

public void setFiltering(boolean filterProposals)
Set the boolean that controls whether proposals are filtered according to the current field content.

Parameters:
filterProposals - true if the proposals should be filtered to show only those that match the current contents of the field, and false if the proposals should remain the same, ignoring the field content.
Since:
3.3

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