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 ComboContentAssistSubjectAdapter

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

All Implemented Interfaces:
IContentAssistSubjectControl


public class ComboContentAssistSubjectAdapter
extends AbstractControlContentAssistSubjectAdapter

Adapts a Combo to a IContentAssistSubjectControl.

Known issues:

Since:
3.0


Field Summary
 
Fields inherited from class org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter
DEBUG
 
Constructor Summary
ComboContentAssistSubjectAdapter(Combo combo)
          Creates a content assist subject control adapter for the given combo.
 
Method Summary
 boolean addSelectionListener(SelectionListener selectionListener)
          If supported, adds a selection listener.
 int getCaretOffset()
          Returns the caret position relative to the start of the text in widget coordinates.
 Control getControl()
          Returns the control of this content assist subject control.
 IDocument getDocument()
          Returns this content assist subject control's document.
 int getLineHeight()
          Returns the line height.
 Point getLocationAtOffset(int offset)
          Returns the x, y location of the upper left corner of the character bounding box at the specified offset in the text.
 Point getSelectedRange()
          Returns the selected range.
 Point getWidgetSelectionRange()
          Returns the selected range in the subject's widget.
 void removeSelectionListener(SelectionListener selectionListener)
          Removes the specified selection listener.
 void revealRange(int i, int j)
          Reveals the given region.
 void setSelectedRange(int i, int j)
          Sets the selected range.
 
Methods inherited from class org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter
addKeyListener, appendVerifyKeyListener, getLineDelimiter, prependVerifyKeyListener, removeKeyListener, removeVerifyKeyListener, setContentAssistCueProvider, setEventConsumer, supportsVerifyKeyListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

 

 

ComboContentAssistSubjectAdapter

public ComboContentAssistSubjectAdapter(Combo combo)

Creates a content assist subject control adapter for the given combo.

Parameters:
combo - the combo to adapt
Method Detail

 

 

getControl

public Control getControl()

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

Specified by:
getControl in interface IContentAssistSubjectControl
Specified by:
getControl in class AbstractControlContentAssistSubjectAdapter


 

 

getLineHeight

public int getLineHeight()

Description copied from interface: IContentAssistSubjectControl
Returns the line height.

Returns:
line height in pixel


 

 

getCaretOffset

public int getCaretOffset()

Description copied from interface: IContentAssistSubjectControl
Returns the caret position relative to the start of the text in widget coordinates.

Returns:
the caret position relative to the start of the text in widget coordinates


 

 

getLocationAtOffset

public Point getLocationAtOffset(int offset)

Description copied from interface: IContentAssistSubjectControl
Returns the x, y location of the upper left corner of the character bounding box at the specified offset in the text. The point is relative to the upper left corner of the widget client area.

Parameters:
offset - widget offset relative to the start of the content 0 <= offset <= getCharCount()
Returns:
x, y location of the upper left corner of the character bounding box at the specified offset in the text


 

 

getWidgetSelectionRange

public Point getWidgetSelectionRange()

Description copied from interface: IContentAssistSubjectControl
Returns the selected range in the subject's widget.

Returns:
start and length of the selection, x is the offset of the


 

 

getSelectedRange

public Point getSelectedRange()

Description copied from interface: IContentAssistSubjectControl
Returns the selected range.

Returns:
start and length of the selection, x is the offset and y the length based on the subject's model (e.g. document)


 

 

getDocument

public IDocument getDocument()

Description copied from interface: IContentAssistSubjectControl
Returns this content assist subject control's document.

Returns:
the viewer's input document


 

 

setSelectedRange

public void setSelectedRange(int i,
                             int j)

Description copied from interface: IContentAssistSubjectControl
Sets the selected range. Offset and length based on the subject's model (e.g. document).

Parameters:
i - the offset of the selection based on the subject's model e.g. document
j - the length of the selection based on the subject's model e.g. document


 

 

revealRange

public void revealRange(int i,
                        int j)

Description copied from interface: IContentAssistSubjectControl
Reveals the given region. Offset and length based on the subject's model (e.g. document).

Parameters:
i - the offset of the selection based on the subject's model e.g. document
j - the length of the selection based on the subject's model e.g. document


 

 

addSelectionListener

public boolean addSelectionListener(SelectionListener selectionListener)

Description copied from interface: IContentAssistSubjectControl
If supported, adds a selection listener. A Selection event is sent by the widget when the selection has changed.

Parameters:
selectionListener - the listener
Returns:
true if adding a selection listener is supported


 

 

removeSelectionListener

public void removeSelectionListener(SelectionListener selectionListener)

Description copied from interface: IContentAssistSubjectControl
Removes the specified selection listener.

Parameters:
selectionListener - the listener


 

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.