本文整理汇总了Java中org.eclipse.jface.fieldassist.IControlContentAdapter类的典型用法代码示例。如果您正苦于以下问题:Java IControlContentAdapter类的具体用法?Java IControlContentAdapter怎么用?Java IControlContentAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IControlContentAdapter类属于org.eclipse.jface.fieldassist包,在下文中一共展示了IControlContentAdapter类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TrpAutoCompleteField
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
public TrpAutoCompleteField(Control control, IControlContentAdapter controlContentAdapter, String[] proposals,
KeyStroke keyStroke, char[] autoActivationCharacters)
{
assert(proposals != null);
this.proposals = proposals;
proposalProvider = new SimpleContentProposalProvider(proposals);
proposalProvider.setFiltering(true);
adapter = new MyContentProposalAdapter(control, controlContentAdapter,
proposalProvider, keyStroke, autoActivationCharacters);
adapter.setPropagateKeys(false);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
adapter.setAutoActivateOnLetter(true);
adapter.setAutoCloseOnSpace(true);
adapter.setPopupSize(new Point(300, 150));
}
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:17,代码来源:TrpAutoCompleteField.java
示例2: recordCursorPosition
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
private void recordCursorPosition() {
if (isValid()) {
IControlContentAdapter adapter = getControlContentAdapter();
insertionPos = adapter.getCursorPosition(control);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=139063
if (adapter instanceof IControlContentAdapter2) {
selectionRange = ((IControlContentAdapter2) adapter)
.getSelection(control);
}
}
}
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:13,代码来源:MyContentProposalAdapter.java
示例3: OpenableContentProposal
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
public OpenableContentProposal(Control control,
IControlContentAdapter controlContentAdapter,
IContentProposalProvider proposalProvider, KeyStroke keyStroke,
char[] autoActivationCharacters) {
super(control, controlContentAdapter, proposalProvider, keyStroke,
autoActivationCharacters);
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:ManualyOpenedAutocomplete.java
示例4: installContentProposalAdapter
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* @param control
* @param contentAdapter
* @param values
*/
public void installContentProposalAdapter( Control control,
IControlContentAdapter contentAdapter, String[] values )
{
IPreferenceStore store = getPreferenceStore( );
boolean propagate = store.getBoolean( PreferenceConstants.PREF_CONTENTASSISTKEY_PROPAGATE );
KeyStroke keyStroke = null;
char[] autoActivationCharacters = null;
int autoActivationDelay = store.getInt( PreferenceConstants.PREF_CONTENTASSISTDELAY );
String triggerKey = getTriggerKey( );
if ( triggerKey == null )
{
keyStroke = null;
}
else
{
keyStroke = getKeyStroke( triggerKey );
}
ContentProposalAdapter adapter = new ContentProposalAdapter( control,
contentAdapter,
getContentProposalProvider( values ),
keyStroke,
autoActivationCharacters );
adapter.setAutoActivationDelay( autoActivationDelay );
adapter.setPropagateKeys( propagate );
adapter.setFilterStyle( getContentAssistFilterStyle( ) );
adapter.setProposalAcceptanceStyle( getContentAssistAcceptance( ) );
}
开发者ID:eclipse,项目名称:birt,代码行数:34,代码来源:FieldAssistHelper.java
示例5: MyContentProposalAdapter
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* Construct a content proposal adapter that can assist the user with
* choosing content for the field.
*
* @param control
* the control for which the adapter is providing content assist.
* May not be <code>null</code>.
* @param controlContentAdapter
* the <code>IControlContentAdapter</code> used to obtain and
* update the control's contents as proposals are accepted. May
* not be <code>null</code>.
* @param proposalProvider
* the <code>IContentProposalProvider</code> used to obtain
* content proposals for this control, or <code>null</code> if
* no content proposal is available.
* @param keyStroke
* the keystroke that will invoke the content proposal popup. If
* this value is <code>null</code>, then proposals will be
* activated automatically when any of the auto activation
* characters are typed.
* @param autoActivationCharacters
* An array of characters that trigger auto-activation of content
* proposal. If specified, these characters will trigger
* auto-activation of the proposal popup, regardless of whether
* an explicit invocation keyStroke was specified. If this
* parameter is <code>null</code>, then only a specified
* keyStroke will invoke content proposal. If this parameter is
* <code>null</code> and the keyStroke parameter is
* <code>null</code>, then all alphanumeric characters will
* auto-activate content proposal.
*/
public MyContentProposalAdapter(Control control,
IControlContentAdapter controlContentAdapter,
IContentProposalProvider proposalProvider, KeyStroke keyStroke,
char[] autoActivationCharacters) {
super();
// We always assume the control and content adapter are valid.
Assert.isNotNull(control);
Assert.isNotNull(controlContentAdapter);
this.control = control;
this.controlContentAdapter = controlContentAdapter;
// The rest of these may be null
this.proposalProvider = proposalProvider;
this.triggerKeyStroke = keyStroke;
if (autoActivationCharacters != null) {
this.autoActivateString = new String(autoActivationCharacters);
}
addControlListener(control);
}
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:52,代码来源:MyContentProposalAdapter.java
示例6: VersionContentProposalAdapter
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
public VersionContentProposalAdapter(Control control, IControlContentAdapter controlContentAdapter,
IContentProposalProvider proposalProvider, KeyStroke keyStroke, char[] autoActivationCharacters) {
super(control, controlContentAdapter, proposalProvider, keyStroke, autoActivationCharacters);
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:5,代码来源:NpmInstallWidget.java
示例7: getProposalControlAdapter
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
public IControlContentAdapter getProposalControlAdapter() {
return proposalControlAdapter;
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:4,代码来源:ContentProposalHandler.java
示例8: PgStatementAutoCompleteField
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* Construct an AutoComplete field on the specified control, whose
* completions are characterized by the specified array of Strings.
*
* @param control
* the control for which autocomplete is desired. May not be
* <code>null</code>.
* @param controlContentAdapter
* the <code>IControlContentAdapter</code> used to obtain and
* update the control's contents. May not be <code>null</code>.
* @param proposals
* the array of Strings representing valid content proposals for
* the field.
*/
public PgStatementAutoCompleteField(Control control,
IControlContentAdapter controlContentAdapter, List<IContentProposal> proposals) {
adapter = new ContentProposalAdapter(control, controlContentAdapter,
new PgStatementProposalProvider(proposals), null, null);
adapter.setPropagateKeys(true);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
}
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:22,代码来源:PgStatementAutoCompleteField.java
示例9: ManualyOpenedAutocomplete
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* Construct an AutoComplete field on the specified control, whose
* completions are characterized by the specified array of Strings.
*
* @param control
* the control for which autocomplete is desired. May not be
* <code>null</code>.
* @param controlContentAdapter
* the <code>IControlContentAdapter</code> used to obtain and
* update the control's contents. May not be <code>null</code>.
* @param proposals
* the container with all the properties of the element
*/
public ManualyOpenedAutocomplete(Control control, IControlContentAdapter controlContentAdapter, PropertiesContainer proposals) {
proposalProvider = new PropertiesProposalProvider(proposals);
proposalProvider.setFiltering(true);
adapter = new OpenableContentProposal(control, controlContentAdapter, proposalProvider, null, null);
adapter.setPropagateKeys(true);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:ManualyOpenedAutocomplete.java
示例10: AssistField
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* Constructor of the class.
*
* @param control
* the control to be decorated.
* @param composite
* The SWT composite within which the decoration should be
* rendered. The decoration will be clipped to this composite,
* but it may be rendered on a child of the composite. The
* decoration will not be visible if the specified composite or
* its child composites are not visible in the space relative to
* the control, where the decoration is to be rendered. If this
* value is null, then the decoration will be rendered on
* whichever composite (or composites) are located in the
* specified position.
* @param adapter
* a content adapter to be used to set and retrieve content from
* current control.
* @param values
* the available contents of current control.
*/
public AssistField( Control control, Composite composite,
IControlContentAdapter adapter, String[] values )
{
this.controlDecoration = FieldAssistHelper.getInstance( )
.createControlDecoration( control, composite );
this.contentAdapter = adapter;
this.control = control;
setContent( values );
initAssistListeners( );
}
开发者ID:eclipse,项目名称:birt,代码行数:34,代码来源:AssistField.java
示例11: getControlContentAdapter
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* Return the content adapter that can get or retrieve the text contents
* from the adapter's control. This method is used when a client, such as a
* content proposal listener, needs to update the control's contents
* manually.
*
* @return the {@link IControlContentAdapter} which can update the control
* text.
*/
public IControlContentAdapter getControlContentAdapter() {
return controlContentAdapter;
}
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:13,代码来源:MyContentProposalAdapter.java
示例12: getContentAdapter
import org.eclipse.jface.fieldassist.IControlContentAdapter; //导入依赖的package包/类
/**
* Returns content adapter.
*
* @return
*/
public IControlContentAdapter getContentAdapter( )
{
return contentAdapter;
}
开发者ID:eclipse,项目名称:birt,代码行数:10,代码来源:AssistField.java
注:本文中的org.eclipse.jface.fieldassist.IControlContentAdapter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论