Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

org.eclipse.jface.contentassist
Class AbstractControlContentAssistSubjectAdapter

java.lang.Object
  extended byorg.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter

All Implemented Interfaces:
IContentAssistSubjectControl

Direct Known Subclasses:
ComboContentAssistSubjectAdapter, TextContentAssistSubjectAdapter


public abstract class AbstractControlContentAssistSubjectAdapter
extends Object
implements IContentAssistSubjectControl

An AbstractControlContentAssistSubjectAdapter delegates assistance requests from a content assistant to a Control. A visual feedback can be configured via setContentAssistCueProvider(ILabelProvider).

Since:
3.0


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

 

 

DEBUG

protected static final boolean DEBUG

Constructor Detail

 

 

AbstractControlContentAssistSubjectAdapter

public AbstractControlContentAssistSubjectAdapter()

Creates a new AbstractControlContentAssistSubjectAdapter.

Method Detail

 

 

getControl

public abstract Control getControl()

Description copied from interface: IContentAssistSubjectControl
Returns the control of this content assist subject control.

Specified by:
getControl in interface IContentAssistSubjectControl

Returns:
the control of this content assist subject control


 

 

addKeyListener

public void addKeyListener(KeyListener keyListener)

Description copied from interface: IContentAssistSubjectControl
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.

Specified by:
addKeyListener in interface IContentAssistSubjectControl

Parameters:
keyListener - the listener which should be notified
See Also:
KeyListener, IContentAssistSubjectControl.removeKeyListener(KeyListener)


 

 

removeKeyListener

public void removeKeyListener(KeyListener keyListener)

Description copied from interface: IContentAssistSubjectControl
Removes the listener from the collection of listeners who will be notified when keys are pressed and released on the system keyboard.

Specified by:
removeKeyListener in interface IContentAssistSubjectControl

Parameters:
keyListener - the listener which should be notified
See Also:
KeyListener, IContentAssistSubjectControl.addKeyListener(KeyListener)


 

 

supportsVerifyKeyListener

public boolean supportsVerifyKeyListener()

Description copied from interface: IContentAssistSubjectControl
Tests whether a verify key listener can be added either using prependVerifyKeyListener or IContentAssistSubjectControl.appendVerifyKeyListener(VerifyKeyListener).

Specified by:
supportsVerifyKeyListener in interface IContentAssistSubjectControl

Returns:
true if adding verify key listeners is supported


 

 

appendVerifyKeyListener

public boolean appendVerifyKeyListener(VerifyKeyListener verifyKeyListener)

Description copied from interface: IContentAssistSubjectControl
If supported, appends a verify key listener to the viewer's list of verify key listeners. If the listener is already registered with the viewer this call moves the listener to the end of the list.

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.

Specified by:
appendVerifyKeyListener in interface IContentAssistSubjectControl

Parameters:
verifyKeyListener - the listener to be added
Returns:
true if the listener was added


 

 

prependVerifyKeyListener

public boolean prependVerifyKeyListener(VerifyKeyListener verifyKeyListener)

Description copied from interface: IContentAssistSubjectControl
If supported, inserts the verify key listener at the beginning of this content assist subject's list of verify key listeners. If the listener is already registered with the viewer this call moves the listener to the beginning of the list.

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.

Specified by:
prependVerifyKeyListener in interface IContentAssistSubjectControl

Parameters:
verifyKeyListener - the listener to be inserted
Returns:
true if the listener was added


 

 

removeVerifyKeyListener

public void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener)

Description copied from interface: IContentAssistSubjectControl
Removes the verify key listener from this content assist subject control's list of verify key listeners. If the listener is not registered, this call has no effect.

Specified by:
removeVerifyKeyListener in interface IContentAssistSubjectControl

Parameters:
verifyKeyListener - the listener to be removed


 

 

setEventConsumer

public void setEventConsumer(IEventConsumer eventConsumer)

Description copied from interface: IContentAssistSubjectControl
If supported, registers an event consumer with this content assist subject.

Specified by:
setEventConsumer in interface IContentAssistSubjectControl

Parameters:
eventConsumer - the content assist subject control's event consumer. null is a valid argument.


 

 

getLineDelimiter

public String getLineDelimiter()

Description copied from interface: IContentAssistSubjectControl
Returns the line delimiter used for entering new lines by key down or paste operation.

Specified by:
getLineDelimiter in interface IContentAssistSubjectControl

Returns:
line delimiter used for entering new lines by key down or paste operation


 

 

setContentAssistCueProvider

public void setContentAssistCueProvider(ILabelProvider labelProvider)

Sets the visual feedback provider for content assist. The given ILabelProvider methods are called with getControl() as argument.

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.

Parameters:
labelProvider - a ILabelProvider, or null if no visual feedback should be shown


 

Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 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, 2004. All rights reserved.