Class ViewerControlAutoCompleteField
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.ui.ViewerControlAutoCompleteField
-
public class ViewerControlAutoCompleteField extends Object
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
Constructors Constructor Description 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
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
Returns whether auto completion is enabled.boolean
isProposalPopupOpen()
Returns whether the main proposal popup is open.void
setEnabled(boolean enabled)
Set the boolean flag that determines whether the auto completion of this filed is enabled.void
setProposalToObjects(com.google.common.collect.Multimap<String,Object> proposalToObjects)
Set multi map of proposals to object, based on target viewer content.
-
-
-
Constructor Detail
-
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 Detail
-
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
-true
if the auto completion is enabled and responding to user input,false
if it is ignoring user input
-
isEnabled
public boolean isEnabled()
Returns whether auto completion is enabled.- Returns:
true
if the adapter is enabled, andfalse
if it is not
-
isProposalPopupOpen
public boolean isProposalPopupOpen()
Returns whether the main proposal popup is open.- Returns:
- whether the main proposal popup is open
-
-