public abstract class AbstractControlContentAssistSubjectAdapter extends Object implements IContentAssistSubjectControl
AbstractControlContentAssistSubjectAdapter
delegates assistance requests from a
content assistant
to a Control
.
A visual feedback can be configured via setContentAssistCueProvider(ILabelProvider)
.Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG
Deprecated.
|
Constructor and Description |
---|
AbstractControlContentAssistSubjectAdapter()
Deprecated.
Creates a new
AbstractControlContentAssistSubjectAdapter . |
Modifier and Type | Method and Description |
---|---|
void |
addKeyListener(KeyListener keyListener)
Deprecated.
Adds the listener to the collection of listeners who will be notified
when keys are pressed and released on the system keyboard, by sending it
one of the messages defined in the
KeyListener interface. |
boolean |
appendVerifyKeyListener(VerifyKeyListener verifyKeyListener)
Deprecated.
If supported, appends a verify key listener to the viewer's list of verify key
listeners.
|
abstract Control |
getControl()
Deprecated.
Returns the control of this content assist subject control.
|
String |
getLineDelimiter()
Deprecated.
Returns the line delimiter used for entering new lines by key down or
paste operation.
|
boolean |
prependVerifyKeyListener(VerifyKeyListener verifyKeyListener)
Deprecated.
If supported, inserts the verify key listener at the beginning of this content assist
subject's list of verify key listeners.
|
void |
removeKeyListener(KeyListener keyListener)
Deprecated.
Removes the listener from the collection of listeners who will be
notified when keys are pressed and released on the system keyboard.
|
void |
removeVerifyKeyListener(VerifyKeyListener verifyKeyListener)
Deprecated.
Removes the verify key listener from this content assist subject control's
list of verify key listeners.
|
void |
setContentAssistCueProvider(ILabelProvider labelProvider)
Deprecated.
Sets the visual feedback provider for content assist.
|
void |
setEventConsumer(IEventConsumer eventConsumer)
Deprecated.
If supported, registers an event consumer with this content assist
subject.
|
boolean |
supportsVerifyKeyListener()
Deprecated.
Tests whether a verify key listener can be added either using
prependVerifyKeyListener
or IContentAssistSubjectControl.appendVerifyKeyListener(VerifyKeyListener) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSelectionListener, getCaretOffset, getDocument, getLineHeight, getLocationAtOffset, getSelectedRange, getWidgetSelectionRange, removeSelectionListener, revealRange, setSelectedRange
public AbstractControlContentAssistSubjectAdapter()
AbstractControlContentAssistSubjectAdapter
.public abstract Control getControl()
IContentAssistSubjectControl
getControl
in interface IContentAssistSubjectControl
public void addKeyListener(KeyListener keyListener)
IContentAssistSubjectControl
KeyListener
interface.addKeyListener
in interface IContentAssistSubjectControl
keyListener
- the listener which should be notifiedKeyListener
,
IContentAssistSubjectControl.removeKeyListener(KeyListener)
public void removeKeyListener(KeyListener keyListener)
IContentAssistSubjectControl
removeKeyListener
in interface IContentAssistSubjectControl
keyListener
- the listener which should be notifiedKeyListener
,
IContentAssistSubjectControl.addKeyListener(KeyListener)
public boolean supportsVerifyKeyListener()
IContentAssistSubjectControl
prependVerifyKeyListener
or IContentAssistSubjectControl.appendVerifyKeyListener(VerifyKeyListener)
.supportsVerifyKeyListener
in interface IContentAssistSubjectControl
true
if adding verify key listeners is supportedpublic boolean appendVerifyKeyListener(VerifyKeyListener verifyKeyListener)
IContentAssistSubjectControl
Note: This content assist subject control may not support appending a verify
listener, in which case false
will be returned. If this
content assist subject control only supports addVerifyKeyListener
then this method can be used but prependVerifyKeyListener
must return false
.
appendVerifyKeyListener
in interface IContentAssistSubjectControl
verifyKeyListener
- the listener to be addedtrue
if the listener was addedpublic boolean prependVerifyKeyListener(VerifyKeyListener verifyKeyListener)
IContentAssistSubjectControl
Note: This content assist subject control may not support prepending a verify
listener, in which case false
will be returned. However,
IContentAssistSubjectControl.appendVerifyKeyListener(VerifyKeyListener)
might work.
prependVerifyKeyListener
in interface IContentAssistSubjectControl
verifyKeyListener
- the listener to be insertedtrue
if the listener was addedpublic void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener)
IContentAssistSubjectControl
removeVerifyKeyListener
in interface IContentAssistSubjectControl
verifyKeyListener
- the listener to be removedpublic void setEventConsumer(IEventConsumer eventConsumer)
IContentAssistSubjectControl
setEventConsumer
in interface IContentAssistSubjectControl
eventConsumer
- the content assist subject control's event consumer. null
is a valid argument.public String getLineDelimiter()
IContentAssistSubjectControl
getLineDelimiter
in interface IContentAssistSubjectControl
public void setContentAssistCueProvider(ILabelProvider labelProvider)
ILabelProvider
methods are called with
getControl()
as argument.
getImage(Object)
provides the visual cue image.
The image can maximally be 5 pixels wide and 8 pixels high.
If getImage(Object)
returns null
, a default image is used.
getText(Object)
provides the hover info text.
It is shown when hovering over the cue image or the adapted Control
.
No info text is shown if getText(Object)
returns null
.
The given ILabelProvider
becomes owned by the AbstractControlContentAssistSubjectAdapter
,
i.e. it gets disposed when the adapted Control
is disposed
or when another ILabelProvider
is set.
labelProvider
- a ILabelProvider
, or null
if no visual feedback should be shown
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.