Class DefaultInformationControl
- All Implemented Interfaces:
- EventListener,- IInformationControl,- IInformationControlExtension,- IInformationControlExtension3,- IInformationControlExtension4,- IInformationControlExtension5,- DisposeListener
IInformationControl.
 
 Displays textual information in a StyledText widget. Before
 displaying, the information set to this information control is processed by an
 IInformationPresenter.
 
- Since:
- 2.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceAn information presenter determines the style presentation of information displayed in the default information control.static interfaceAn information presenter determines the style presentation of information displayed in the default information control.
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultInformationControl(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, int shellStyle, int style, DefaultInformationControl.IInformationPresenter presenter) Deprecated.As of 3.4, replaced by simpler constructorsDefaultInformationControl(Shell parentShell, int shellStyle, int style, DefaultInformationControl.IInformationPresenter presenter, String statusFieldText) Deprecated.As of 3.4, replaced by simpler constructorsDefaultInformationControl(Shell parent, int textStyles, DefaultInformationControl.IInformationPresenter presenter) Deprecated.As of 3.4, replaced byDefaultInformationControl(Shell, DefaultInformationControl.IInformationPresenter)DefaultInformationControl(Shell parent, int textStyles, DefaultInformationControl.IInformationPresenter presenter, String statusFieldText) Deprecated.As of 3.4, replaced byDefaultInformationControl(Shell, String, DefaultInformationControl.IInformationPresenter)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.DefaultInformationControl(Shell parent, DefaultInformationControl.IInformationPresenter presenter) Creates a default information control with the given shell as parent.
- 
Method SummaryModifier and TypeMethodDescriptionComputes and returns a proposal for the size of this information control depending on the information to present.Computes the trim (status text and tool bar are considered as trim).protected voidcreateContent(Composite parent) Creates the content of the popup window.Returns the rich information control creator for this information control.booleanReturns whether this information control has contents to be displayed.voidsetBackgroundColor(Color background) Sets the background color of this information control.voidsetForegroundColor(Color foreground) Sets the foreground color of this information control.voidsetInformation(String content) Sets the information to be presented by this information control.voidsetVisible(boolean visible) Controls the visibility of this information control.voidwidgetDisposed(DisposeEvent event) Deprecated.As of 3.2, no longer used and calledMethods inherited from class org.eclipse.jface.text.AbstractInformationControladdDisposeListener, addFocusListener, computeSizeConstraints, containsControl, create, dispose, getBounds, getShell, getSizeConstraints, getToolBarManager, handleDispose, isFocusControl, isResizable, isVisible, removeDisposeListener, removeFocusListener, restoresLocation, restoresSize, setFocus, setLocation, setSize, setSizeConstraints, setStatusText
- 
Constructor Details- 
DefaultInformationControlCreates a default information control with the given shell as parent. An information presenter that can handle simple HTML is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- isResizeable-- trueif the control should be resizable
- Since:
- 3.4
 
- 
DefaultInformationControlCreates a default information control with the given shell as parent. An information presenter that can handle simple HTML is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- statusFieldText- the text to be used in the status field or- nullto hide the status field
- Since:
- 3.4
 
- 
DefaultInformationControlpublic DefaultInformationControl(Shell parent, String statusFieldText, DefaultInformationControl.IInformationPresenter presenter) Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- statusFieldText- the text to be used in the status field or- nullto hide the status field
- presenter- the presenter to be used, or- nullif no presenter should be used
- Since:
- 3.4
 
- 
DefaultInformationControlCreates a resizable default information control with the given shell as parent. An information presenter that can handle simple HTML is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- toolBarManager- the manager or- nullif toolbar is not desired
- Since:
- 3.4
 
- 
DefaultInformationControlpublic DefaultInformationControl(Shell parent, ToolBarManager toolBarManager, DefaultInformationControl.IInformationPresenter presenter) Creates a resizable default information control with the given shell as parent. The given information presenter is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- toolBarManager- the manager or- nullif toolbar is not desired
- presenter- the presenter to be used, or- nullif no presenter should be used
- Since:
- 3.4
 
- 
DefaultInformationControlCreates a default information control with the given shell as parent. No information presenter is used to process the information to be displayed.- Parameters:
- parent- the parent shell
 
- 
DefaultInformationControlpublic DefaultInformationControl(Shell parent, DefaultInformationControl.IInformationPresenter presenter) Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- presenter- the presenter to be used
 
- 
DefaultInformationControl@Deprecated public DefaultInformationControl(Shell parent, int shellStyle, int style, DefaultInformationControl.IInformationPresenter presenter) Deprecated.As of 3.4, replaced by simpler constructorsCreates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed. The given styles are applied to the created styled text widget.- Parameters:
- parent- the parent shell
- shellStyle- the additional styles for the shell
- style- the additional styles for the styled text widget
- presenter- the presenter to be used
 
- 
DefaultInformationControl@Deprecated public DefaultInformationControl(Shell parentShell, int shellStyle, int style, DefaultInformationControl.IInformationPresenter presenter, String statusFieldText) Deprecated.As of 3.4, replaced by simpler constructorsCreates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed. The given styles are applied to the created styled text widget.- Parameters:
- parentShell- the parent shell
- shellStyle- the additional styles for the shell
- style- the additional styles for the styled text widget
- presenter- the presenter to be used
- statusFieldText- the text to be used in the status field or- nullto hide the status field
- Since:
- 3.0
 
- 
DefaultInformationControl@Deprecated public DefaultInformationControl(Shell parent, int textStyles, DefaultInformationControl.IInformationPresenter presenter) Deprecated.As of 3.4, replaced byDefaultInformationControl(Shell, DefaultInformationControl.IInformationPresenter)Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- textStyles- the additional styles for the styled text widget
- presenter- the presenter to be used
 
- 
DefaultInformationControl@Deprecated public DefaultInformationControl(Shell parent, int textStyles, DefaultInformationControl.IInformationPresenter presenter, String statusFieldText) Deprecated.As of 3.4, replaced byDefaultInformationControl(Shell, String, DefaultInformationControl.IInformationPresenter)Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed.- Parameters:
- parent- the parent shell
- textStyles- the additional styles for the styled text widget
- presenter- the presenter to be used
- statusFieldText- the text to be used in the status field or- nullto hide the status field
- Since:
- 3.0
 
 
- 
- 
Method Details- 
createContentDescription copied from class:AbstractInformationControlCreates the content of the popup window.Implementors will usually take over Control.getBackground()andControl.getForeground()fromparent.Implementors must either use the dialog font or override AbstractInformationControl.computeSizeConstraints(int, int).Implementors are expected to consider AbstractInformationControl.isResizable(): Iftrue, they should show scrollbars if their content may exceed the size of the information control. Iffalse, they should never show scrollbars.The given parentcomes with aFillLayout. Subclasses may set a different layout.- Specified by:
- createContentin class- AbstractInformationControl
- Parameters:
- parent- the container of the content
 
- 
setInformationDescription copied from class:AbstractInformationControlSets the information to be presented by this information control.The default implementation does nothing. Subclasses must either override this method or implement IInformationControlExtension2.- Specified by:
- setInformationin interface- IInformationControl
- Overrides:
- setInformationin class- AbstractInformationControl
- Parameters:
- content- the information to be presented
- See Also:
 
- 
setVisiblepublic void setVisible(boolean visible) Description copied from interface:IInformationControlControls the visibility of this information control.Note: The information control must not grab focus when made visible. - Specified by:
- setVisiblein interface- IInformationControl
- Overrides:
- setVisiblein class- AbstractInformationControl
- Parameters:
- visible-- trueif the control should be visible
 
- 
computeSizeHintDescription copied from interface:IInformationControlComputes and returns a proposal for the size of this information control depending on the information to present. The method tries to honor known size constraints but might return a size that exceeds them.- Specified by:
- computeSizeHintin interface- IInformationControl
- Overrides:
- computeSizeHintin class- AbstractInformationControl
- Returns:
- the computed size hint
 
- 
computeTrimDescription copied from class:AbstractInformationControlComputes the trim (status text and tool bar are considered as trim). Subclasses can extend this method to add additional trim (e.g. scroll bars for resizable information controls).- Specified by:
- computeTrimin interface- IInformationControlExtension3
- Overrides:
- computeTrimin class- AbstractInformationControl
- Returns:
- The receiver's trim. xandydenote the upper left corner of the trimming relative to this control's location i.e. this will most likely be negative values.widthandheightrepresent the border sizes (the sum of the horizontal and vertical trimmings, respectively).
- See Also:
 
- 
setForegroundColorDescription copied from interface:IInformationControlSets the foreground color of this information control.- Specified by:
- setForegroundColorin interface- IInformationControl
- Overrides:
- setForegroundColorin class- AbstractInformationControl
- Parameters:
- foreground- the foreground color of this information control
 
- 
setBackgroundColorDescription copied from interface:IInformationControlSets the background color of this information control.- Specified by:
- setBackgroundColorin interface- IInformationControl
- Overrides:
- setBackgroundColorin class- AbstractInformationControl
- Parameters:
- background- the background color of this information control
 
- 
hasContentspublic boolean hasContents()Description copied from interface:IInformationControlExtensionReturns whether this information control has contents to be displayed.- Specified by:
- hasContentsin interface- IInformationControlExtension
- Returns:
- trueif there is contents to be displayed.
 
- 
widgetDisposedDeprecated.As of 3.2, no longer used and calledDescription copied from interface:DisposeListenerSent when the widget is disposed.- Specified by:
- widgetDisposedin interface- DisposeListener
- Parameters:
- event- an event containing information about the dispose
- Since:
- 3.0
- See Also:
 
- 
getInformationPresenterControlCreatorDescription copied from class:AbstractInformationControlReturns the rich information control creator for this information control.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 enrichedor when it needs to be made sticky for other reasons.The returned information control creator must create information controls that implement IInformationControlExtension3andIInformationControlExtension2, and whoseIInformationControlExtension2.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.- Specified by:
- getInformationPresenterControlCreatorin interface- IInformationControlExtension5
- Overrides:
- getInformationPresenterControlCreatorin class- AbstractInformationControl
- Returns:
- the information presenter control creator or nullto disable enriching
 
 
-