|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.AbstractInformationControl
org.eclipse.jface.text.DefaultInformationControl
public class DefaultInformationControl
Default implementation of IInformationControl.
Displays textual information in a StyledText
widget. Before displaying, the information set to this information control is
processed by an IInformationPresenter.
| Nested Class Summary | |
|---|---|
static interface |
DefaultInformationControl.IInformationPresenter
An information presenter determines the style presentation of information displayed in the default information control. |
static interface |
DefaultInformationControl.IInformationPresenterExtension
An information presenter determines the style presentation of information displayed in the default information control. |
| Constructor Summary | |
|---|---|
DefaultInformationControl(Shell parent)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
boolean isResizeable)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
DefaultInformationControl.IInformationPresenter presenter)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
int textStyles,
DefaultInformationControl.IInformationPresenter presenter)
Deprecated. As of 3.4, replaced by DefaultInformationControl(Shell, DefaultInformationControl.IInformationPresenter) |
|
DefaultInformationControl(Shell parent,
int textStyles,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
Deprecated. As of 3.4, replaced by DefaultInformationControl(Shell, String, DefaultInformationControl.IInformationPresenter) |
|
DefaultInformationControl(Shell parent,
int shellStyle,
int style,
DefaultInformationControl.IInformationPresenter presenter)
Deprecated. As of 3.4, replaced by simpler constructors |
|
DefaultInformationControl(Shell parentShell,
int shellStyle,
int style,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
Deprecated. As of 3.4, replaced by simpler constructors |
|
DefaultInformationControl(Shell parent,
String statusFieldText)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
String statusFieldText,
DefaultInformationControl.IInformationPresenter presenter)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
ToolBarManager toolBarManager)
Creates a resizable default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
ToolBarManager toolBarManager,
DefaultInformationControl.IInformationPresenter presenter)
Creates a resizable default information control with the given shell as parent. |
|
| Method Summary | |
|---|---|
Point |
computeSizeHint()
Computes and returns a proposal for the size of this information control depending on the information to present. |
Rectangle |
computeTrim()
Computes the trim (status text and tool bar are considered as trim). |
protected void |
createContent(Composite parent)
Creates the content of the popup window. |
IInformationControlCreator |
getInformationPresenterControlCreator()
Returns the rich information control creator for this information control. This default implementation returns null. |
boolean |
hasContents()
Returns whether this information control has contents to be displayed. |
void |
setBackgroundColor(Color background)
Sets the background color of this information control. |
void |
setForegroundColor(Color foreground)
Sets the foreground color of this information control. |
void |
setInformation(String content)
Sets the information to be presented by this information control. |
void |
setVisible(boolean visible)
Controls the visibility of this information control. |
void |
widgetDisposed(DisposeEvent event)
Deprecated. As of 3.2, no longer used and called |
| Methods inherited from class org.eclipse.jface.text.AbstractInformationControl |
|---|
addDisposeListener, addFocusListener, computeSizeConstraints, containsControl, create, dispose, getBounds, getShell, getSizeConstraints, getToolBarManager, handleDispose, isFocusControl, isResizable, isVisible, removeDisposeListener, removeFocusListener, restoresLocation, restoresSize, setFocus, setLocation, setSize, setSizeConstraints, setStatusText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultInformationControl(Shell parent,
boolean isResizeable)
parent - the parent shellisResizeable - true if the control should be resizable
public DefaultInformationControl(Shell parent,
String statusFieldText)
parent - the parent shellstatusFieldText - the text to be used in the status field or null to hide the status field
public DefaultInformationControl(Shell parent,
String statusFieldText,
DefaultInformationControl.IInformationPresenter presenter)
parent - the parent shellstatusFieldText - the text to be used in the status field or null to hide the status fieldpresenter - the presenter to be used, or null if no presenter should be used
public DefaultInformationControl(Shell parent,
ToolBarManager toolBarManager)
parent - the parent shelltoolBarManager - the manager or null if toolbar is not desired
public DefaultInformationControl(Shell parent,
ToolBarManager toolBarManager,
DefaultInformationControl.IInformationPresenter presenter)
parent - the parent shelltoolBarManager - the manager or null if toolbar is not desiredpresenter - the presenter to be used, or null if no presenter should be usedpublic DefaultInformationControl(Shell parent)
parent - the parent shell
public DefaultInformationControl(Shell parent,
DefaultInformationControl.IInformationPresenter presenter)
parent - the parent shellpresenter - the presenter to be used
public DefaultInformationControl(Shell parent,
int shellStyle,
int style,
DefaultInformationControl.IInformationPresenter presenter)
parent - the parent shellshellStyle - the additional styles for the shellstyle - the additional styles for the styled text widgetpresenter - the presenter to be used
public DefaultInformationControl(Shell parentShell,
int shellStyle,
int style,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
parentShell - the parent shellshellStyle - the additional styles for the shellstyle - the additional styles for the styled text widgetpresenter - the presenter to be usedstatusFieldText - the text to be used in the status field or null to hide the status field
public DefaultInformationControl(Shell parent,
int textStyles,
DefaultInformationControl.IInformationPresenter presenter)
DefaultInformationControl(Shell, DefaultInformationControl.IInformationPresenter)
parent - the parent shelltextStyles - the additional styles for the styled text widgetpresenter - the presenter to be used
public DefaultInformationControl(Shell parent,
int textStyles,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
DefaultInformationControl(Shell, String, DefaultInformationControl.IInformationPresenter)
parent - the parent shelltextStyles - the additional styles for the styled text widgetpresenter - the presenter to be usedstatusFieldText - the text to be used in the status field or null to hide the status field| Method Detail |
|---|
protected void createContent(Composite parent)
AbstractInformationControl
Implementors will usually take over Control.getBackground() and
Control.getForeground() from parent.
Implementors must either use the dialog font or override
AbstractInformationControl.computeSizeConstraints(int, int).
Implementors are expected to consider AbstractInformationControl.isResizable(): If true, they
should show scrollbars if their content may exceed the size of the information control. If
false, they should never show scrollbars.
The given parent comes with a FillLayout. Subclasses may set a different
layout.
createContent in class AbstractInformationControlparent - the container of the contentpublic void setInformation(String content)
AbstractInformationControl
The default implementation does nothing. Subclasses must either override this method
or implement IInformationControlExtension2.
setInformation in interface IInformationControlsetInformation in class AbstractInformationControlcontent - the information to be presentedIInformationControl.setInformation(java.lang.String)public void setVisible(boolean visible)
IInformationControlNote: The information control must not grab focus when made visible.
setVisible in interface IInformationControlsetVisible in class AbstractInformationControlvisible - true if the control should be visiblepublic Point computeSizeHint()
IInformationControl
computeSizeHint in interface IInformationControlcomputeSizeHint in class AbstractInformationControlpublic Rectangle computeTrim()
AbstractInformationControl
computeTrim in interface IInformationControlExtension3computeTrim in class AbstractInformationControlx and y denote
the upper left corner of the trimming relative to this control's
location i.e. this will most likely be negative values.
width and height represent the
border sizes (the sum of the horizontal and vertical trimmings,
respectively).IInformationControlExtension3.computeTrim()public void setForegroundColor(Color foreground)
IInformationControl
setForegroundColor in interface IInformationControlsetForegroundColor in class AbstractInformationControlforeground - the foreground color of this information controlpublic void setBackgroundColor(Color background)
IInformationControl
setBackgroundColor in interface IInformationControlsetBackgroundColor in class AbstractInformationControlbackground - the background color of this information controlpublic boolean hasContents()
IInformationControlExtension
hasContents in interface IInformationControlExtensiontrue if there is contents to be displayed.public void widgetDisposed(DisposeEvent event)
DisposeListener
widgetDisposed in interface DisposeListenerevent - an event containing information about the disposeDisposeListener.widgetDisposed(org.eclipse.swt.events.DisposeEvent)public IInformationControlCreator getInformationPresenterControlCreator()
AbstractInformationControl
The returned information control creator is used to create an enriched version of this
information control, e.g. when the mouse is moved into this control and it needs to be
enriched
or when it needs to be made sticky for other reasons.
The returned information control creator must create information controls
that implement IInformationControlExtension3 and IInformationControlExtension2,
and whose IInformationControlExtension2.setInput(Object) accepts all inputs that are
also supported by this information control.
Note that automatic enriching of this information control works only if it also implements
IInformationControlExtension3.
This method may be called frequently, so implementors should ensure it returns quickly, e.g. by caching the returned creator.
This default implementation returnsnull. Subclasses may override.
getInformationPresenterControlCreator in interface IInformationControlExtension5getInformationPresenterControlCreator in class AbstractInformationControlnull to disable enriching
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.