|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter
An AbstractControlContentAssistSubjectAdapter
delegates assistance requests from a
content assistant
to a Control
.
A visual feedback can be configured via setContentAssistCueProvider(ILabelProvider)
.
Field Summary | |
---|---|
protected static boolean |
DEBUG
|
Constructor Summary | |
---|---|
AbstractControlContentAssistSubjectAdapter()
Creates a new AbstractControlContentAssistSubjectAdapter . |
Method Summary | |
---|---|
void |
addKeyListener(KeyListener keyListener)
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)
If supported, appends a verify key listener to the viewer's list of verify key listeners. |
abstract Control |
getControl()
Returns the control of this content assist subject control. |
String |
getLineDelimiter()
Returns the line delimiter used for entering new lines by key down or paste operation. |
boolean |
prependVerifyKeyListener(VerifyKeyListener verifyKeyListener)
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)
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)
Removes the verify key listener from this content assist subject control's list of verify key listeners. |
void |
setContentAssistCueProvider(ILabelProvider labelProvider)
Sets the visual feedback provider for content assist. |
void |
setEventConsumer(IEventConsumer eventConsumer)
If supported, registers an event consumer with this content assist subject. |
boolean |
supportsVerifyKeyListener()
Tests whether a verify key listener can be added either using prependVerifyKeyListener
or appendVerifyKeyListener(VerifyKeyListener) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.contentassist.IContentAssistSubjectControl |
---|
addSelectionListener, getCaretOffset, getDocument, getLineHeight, getLocationAtOffset, getSelectedRange, getWidgetSelectionRange, removeSelectionListener, revealRange, setSelectedRange |
Field Detail |
protected static final boolean DEBUG
Constructor Detail |
public AbstractControlContentAssistSubjectAdapter()
AbstractControlContentAssistSubjectAdapter
.
Method Detail |
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 added
true
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 inserted
true
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
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.