Class ViewerControlAutoCompleteField
java.lang.Object
com._1c.g5.v8.dt.platform.services.ui.ViewerControlAutoCompleteField
ViewerControlAutoCompleteField attempts to auto-complete a user's keystrokes by activating
a popup that filters a list of proposals according to the content typed by the user.-
Constructor Summary
ConstructorsConstructorDescriptionViewerControlAutoCompleteField(String[] proposals, org.eclipse.swt.widgets.Control control, IViewerControlContentAdapter contentAdapter) Construct an AutoComplete field on the specified control, whose completions are characterized by the specified array ofStrings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether auto completion is enabled.booleanReturns whether the main proposal popup is open.voidsetEnabled(boolean enabled) Set the boolean flag that determines whether the auto completion of this filed is enabled.voidsetProposalToObjects(com.google.common.collect.Multimap<String, Object> proposalToObjects) Set multi map of proposals to object, based on target viewer content.
-
Constructor Details
-
ViewerControlAutoCompleteField
public ViewerControlAutoCompleteField(String[] proposals, org.eclipse.swt.widgets.Control control, IViewerControlContentAdapter contentAdapter) Construct an AutoComplete field on the specified control, whose completions are characterized by the specified array ofStrings.- Parameters:
viewer- the control for which auto complete is desired, cannot benull
-
-
Method Details
-
setProposalToObjects
public void setProposalToObjects(com.google.common.collect.Multimap<String, Object> proposalToObjects) Set multi map of proposals to object, based on target viewer content. Intended to be invoked after viewer input update.- Parameters:
proposalToObjects- multi map of content to proposal associations, nevernull:- key - string representation for the target object
- value - the target object
-
setEnabled
public void setEnabled(boolean enabled) Set the boolean flag that determines whether the auto completion of this filed is enabled.- Parameters:
enabled-trueif the auto completion is enabled and responding to user input,falseif it is ignoring user input
-
isEnabled
public boolean isEnabled()Returns whether auto completion is enabled.- Returns:
trueif the adapter is enabled, andfalseif it is not
-
isProposalPopupOpen
public boolean isProposalPopupOpen()Returns whether the main proposal popup is open.- Returns:
- whether the main proposal popup is open
-