|
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.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,
DefaultInformationControl.IInformationPresenter presenter)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
int style,
DefaultInformationControl.IInformationPresenter presenter)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
int style,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parent,
int shellStyle,
int style,
DefaultInformationControl.IInformationPresenter presenter)
Creates a default information control with the given shell as parent. |
|
DefaultInformationControl(Shell parentShell,
int shellStyle,
int style,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
Creates a default information control with the given shell as parent. |
|
| Method Summary | |
|---|---|
void |
addDisposeListener(DisposeListener listener)
Adds the given listener to the list of dispose listeners. |
void |
addFocusListener(FocusListener listener)
Adds the given listener to the list of focus listeners. |
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 for this control. |
void |
dispose()
Disposes this information control. |
Rectangle |
getBounds()
Returns a rectangle describing the receiver's size and location relative to its parent (or its display if its parent is null). |
boolean |
hasContents()
Returns whether this information control has contents to be displayed. |
boolean |
isFocusControl()
Returns whether this information control has the focus. |
void |
removeDisposeListener(DisposeListener listener)
Removes the given listeners from the list of dispose listeners. |
void |
removeFocusListener(FocusListener listener)
Removes the given listeners from the list of focus listeners. |
boolean |
restoresLocation()
Tells whether this control allows to restore the previously used location. |
boolean |
restoresSize()
Tells whether this control allows to restore the previously used size. |
void |
setBackgroundColor(Color background)
Sets the background color of this information control. |
void |
setFocus()
Sets the keyboard focus to 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 |
setLocation(Point location)
Sets the location of this information control. |
void |
setSize(int width,
int height)
Sets the size of this information control. |
void |
setSizeConstraints(int maxWidth,
int maxHeight)
Sets the information control's size constraints. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 optional status field
or null if the status field should be hidden
public DefaultInformationControl(Shell parent,
int style,
DefaultInformationControl.IInformationPresenter presenter)
parent - the parent shellstyle - the additional styles for the styled text widgetpresenter - the presenter to be used
public DefaultInformationControl(Shell parent,
int style,
DefaultInformationControl.IInformationPresenter presenter,
String statusFieldText)
parent - the parent shellstyle - the additional styles for the styled text widgetpresenter - the presenter to be usedstatusFieldText - the text to be used in the optional status field
or null if the status field should be hiddenpublic DefaultInformationControl(Shell parent)
parent - the parent shell
public DefaultInformationControl(Shell parent,
DefaultInformationControl.IInformationPresenter presenter)
parent - the parent shellpresenter - the presenter to be used| Method Detail |
|---|
public void setInformation(String content)
IInformationControl
Replaced by IInformationControlExtension2.setInput(Object).
setInformation in interface IInformationControlcontent - the information to be presentedpublic void setVisible(boolean visible)
IInformationControl
setVisible in interface IInformationControlvisible - true if the control should be visiblepublic void dispose()
IInformationControl
dispose in interface IInformationControl
public void setSize(int width,
int height)
IInformationControl
setSize in interface IInformationControlwidth - the width of the controlheight - the height of the controlpublic void setLocation(Point location)
IInformationControl
setLocation in interface IInformationControllocation - the location
public void setSizeConstraints(int maxWidth,
int maxHeight)
IInformationControl-1 indicates no constraint. This method must be called before
computeSizeHint is called.
Note: An information control which implements IInformationControlExtension3
may ignore this method or use it as hint for its very first appearance.
setSizeConstraints in interface IInformationControlmaxWidth - the maximal width of the control to present the information, or -1 for not constraintmaxHeight - the maximal height of the control to present the information, or -1 for not constraintpublic Point computeSizeHint()
IInformationControl
computeSizeHint in interface IInformationControlpublic Rectangle computeTrim()
IInformationControlExtension3
computeTrim in interface IInformationControlExtension3public Rectangle getBounds()
IInformationControlExtension3Note: If the receiver is already disposed then this methods must return the last valid location and size.
getBounds in interface IInformationControlExtension3public boolean restoresLocation()
IInformationControlExtension3Note: This is not a static property - it can change during the lifetime of this control.
restoresLocation in interface IInformationControlExtension3true if restoring location is supportedpublic boolean restoresSize()
IInformationControlExtension3Note: This is not a static property - it can change during the lifetime of this control.
restoresSize in interface IInformationControlExtension3true if restoring size is supportedpublic void addDisposeListener(DisposeListener listener)
IInformationControl
addDisposeListener in interface IInformationControllistener - the listener to be addedpublic void removeDisposeListener(DisposeListener listener)
IInformationControl
removeDisposeListener in interface IInformationControllistener - the listener to be removedpublic void setForegroundColor(Color foreground)
IInformationControl
setForegroundColor in interface IInformationControlforeground - the foreground color of this information controlpublic void setBackgroundColor(Color background)
IInformationControl
setBackgroundColor in interface IInformationControlbackground - the background color of this information controlpublic boolean isFocusControl()
IInformationControl
isFocusControl in interface IInformationControltrue when the information control has the focus otherwise falsepublic void setFocus()
IInformationControl
setFocus in interface IInformationControlpublic void addFocusListener(FocusListener listener)
IInformationControl
addFocusListener in interface IInformationControllistener - the listener to be addedpublic void removeFocusListener(FocusListener listener)
IInformationControl
removeFocusListener in interface IInformationControllistener - the listener to be removedpublic 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)
|
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.