|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.AbstractInformationControlManager
org.eclipse.jface.text.information.InformationPresenter
public class InformationPresenter
Standard implementation of IInformationPresenter.
This implementation extends AbstractInformationControlManager.
The information control is made visible on request by calling
showInformationControl(Rectangle).
Usually, clients instantiate this class and configure it before using it. The configuration
must be consistent: This means the used IInformationControlCreator
must create an information control expecting information in the same format the configured
IInformationProviders use to encode the information they provide.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.text.AbstractInformationControlManager |
|---|
AbstractInformationControlManager.Anchor, AbstractInformationControlManager.IInformationControlCloser |
| Field Summary | |
|---|---|
static int |
WIDGET_PRIORITY
Priority of the info controls managed by this information presenter. |
| Fields inherited from class org.eclipse.jface.text.AbstractInformationControlManager |
|---|
ANCHOR_BOTTOM, ANCHOR_GLOBAL, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, fDisposed, fInformationControl, fInformationControlCloser, fInformationControlCreator, STORE_LOCATION_X, STORE_LOCATION_Y, STORE_SIZE_HEIGHT, STORE_SIZE_WIDTH |
| Constructor Summary | |
|---|---|
InformationPresenter(IInformationControlCreator creator)
Creates a new information presenter that uses the given information control creator. |
|
| Method Summary | |
|---|---|
protected void |
computeInformation()
Computes the information to be displayed and the area in which the computed information is valid. |
String |
getDocumentPartitioning()
Returns the document partitioning this information presenter is using. |
IInformationProvider |
getInformationProvider(String contentType)
Returns the information provider to be used for the given content type. |
protected void |
handleInformationControlDisposed()
Handles the disposal of the information control. |
protected void |
hideInformationControl()
Hides the information control and stops the information control closer. |
void |
install(ITextViewer textViewer)
Installs the information presenter on the given text viewer. |
boolean |
requestWidgetToken(IWidgetTokenOwner owner)
The given widget token owner requests the widget token from this token keeper. |
boolean |
requestWidgetToken(IWidgetTokenOwner owner,
int priority)
The given widget token owner requests the widget token from this token keeper. |
void |
setDocumentPartitioning(String partitioning)
Sets the document partitioning to be used by this information presenter. |
boolean |
setFocus(IWidgetTokenOwner owner)
Requests the receiver to give focus to its popup shell, hover, or similar. |
void |
setInformationProvider(IInformationProvider provider,
String contentType)
Registers a given information provider for a particular content type. |
void |
setOffset(int offset)
Sets a offset to override the selection. |
protected void |
showInformationControl(Rectangle subjectArea)
Shows the information control and starts the information control closer. |
void |
uninstall()
Removes the information presenter from the text viewer it has previously been installed on. |
| 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.text.information.IInformationPresenter |
|---|
showInformation |
| Field Detail |
|---|
public static final int WIDGET_PRIORITY
5.
| Constructor Detail |
|---|
public InformationPresenter(IInformationControlCreator creator)
IDocumentExtension3.DEFAULT_PARTITIONING is used.
creator - the information control creator to be used| Method Detail |
|---|
public void setDocumentPartitioning(String partitioning)
partitioning - the document partitioning to be used by this information presenterpublic String getDocumentPartitioning()
IInformationPresenterExtension
getDocumentPartitioning in interface IInformationPresenterExtension
public void setInformationProvider(IInformationProvider provider,
String contentType)
provider - the information provider to register, or null to remove an existing onecontentType - the content type under which to registerpublic IInformationProvider getInformationProvider(String contentType)
IInformationPresenter
getInformationProvider in interface IInformationPresentercontentType - the type of the content for which information will be requested
null if none exists for the specified content typepublic void setOffset(int offset)
-1 will disable
overriding.
offset - the offset to override selection or -1protected void computeInformation()
AbstractInformationControlManagersetInformation.
computeInformation in class AbstractInformationControlManagerpublic void install(ITextViewer textViewer)
IInformationPresenterIInformationPresenter.showInformation()
can be called until IInformationPresenter.uninstall() is called.
install in interface IInformationPresentertextViewer - the viewer on which the presenter is installedpublic void uninstall()
IInformationPresenter
uninstall in interface IInformationPresenterprotected void showInformationControl(Rectangle subjectArea)
AbstractInformationControlManager
showInformationControl in class AbstractInformationControlManagersubjectArea - the information areaprotected void hideInformationControl()
AbstractInformationControlManager
hideInformationControl in class AbstractInformationControlManagerprotected void handleInformationControlDisposed()
AbstractInformationControlManager
handleInformationControlDisposed in class AbstractInformationControlManagerpublic boolean requestWidgetToken(IWidgetTokenOwner owner)
IWidgetTokenKeepertrue if the token is released by this
token keeper. Note, the keeper must not call
releaseWidgetToken(IWidgetTokenKeeper) explicitly.
Replaced by
IWidgetTokenKeeperExtension.requestWidgetToken(IWidgetTokenOwner, int).
requestWidgetToken in interface IWidgetTokenKeeperowner - the token owner
true if token has been released false
otherwise
public boolean requestWidgetToken(IWidgetTokenOwner owner,
int priority)
IWidgetTokenKeeperExtensiontrue if the token is released
by this token keeper. Note, the keeper must not call
releaseWidgetToken(IWidgetTokenKeeper) explicitly.
The general contract is that the receiver should release the token
if priority exceeds the receiver's priority.
requestWidgetToken in interface IWidgetTokenKeeperExtensionowner - the token ownerpriority - the priority of the request
true if token has been released false otherwisepublic boolean setFocus(IWidgetTokenOwner owner)
IWidgetTokenKeeperExtension
setFocus in interface IWidgetTokenKeeperExtensionowner - the token owner
true if the receiver tried to take focus, false if it did not.
|
Eclipse Platform Release 3.2 |
|||||||||
| 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, 2006. All rights reserved.