Mercurial > projects > dwt-addons
diff dwtx/jface/text/DefaultInformationControl.d @ 156:a9566845f1cb
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 25 Aug 2008 19:03:46 +0200 |
parents | 000f9136b8f7 |
children | 25f1f92fa3df |
line wrap: on
line diff
--- a/dwtx/jface/text/DefaultInformationControl.d Mon Aug 25 00:45:19 2008 +0200 +++ b/dwtx/jface/text/DefaultInformationControl.d Mon Aug 25 19:03:46 2008 +0200 @@ -213,17 +213,17 @@ */ String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight); } - - + + /** * An information presenter determines the style presentation * of information displayed in the default information control. * The interface can be implemented by clients. - * + * * @since 3.2 */ public interface IInformationPresenterExtension { - + /** * Updates the given presentation of the given information and * thereby may manipulate the information to be displayed. The manipulation @@ -245,7 +245,7 @@ */ String updatePresentation(Drawable drawable, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight); } - + /** * Inner border thickness in pixels. @@ -259,7 +259,7 @@ private const IInformationPresenter fPresenter; /** A cached text presentation */ private const TextPresentation fPresentation= new TextPresentation(); - + /** * Additional styles to use for the text control. * @since 3.4, previously called <code>fTextStyle</code> @@ -269,7 +269,7 @@ /** * Creates 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. - * + * * @param parent the parent shell * @param isResizeable <code>true</code> if the control should be resizable * @since 3.4 @@ -284,7 +284,7 @@ /** * Creates 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. - * + * * @param parent the parent shell * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field * @since 3.4 @@ -297,7 +297,7 @@ * Creates a default information control with the given shell as parent. The * given information presenter is used to process the information to be * displayed. - * + * * @param parent the parent shell * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field * @param presenter the presenter to be used, or <code>null</code> if no presenter should be used @@ -314,7 +314,7 @@ * Creates 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. - * + * * @param parent the parent shell * @param toolBarManager the manager or <code>null</code> if toolbar is not desired * @since 3.4 @@ -327,7 +327,7 @@ * 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. - * + * * @param parent the parent shell * @param toolBarManager the manager or <code>null</code> if toolbar is not desired * @param presenter the presenter to be used, or <code>null</code> if no presenter should be used @@ -367,7 +367,7 @@ * given information presenter is used to process the information to be * displayed. The given styles are applied to the created styled text * widget. - * + * * @param parent the parent shell * @param shellStyle the additional styles for the shell * @param style the additional styles for the styled text widget @@ -383,7 +383,7 @@ * given information presenter is used to process the information to be * displayed. The given styles are applied to the created styled text * widget. - * + * * @param parentShell the parent shell * @param shellStyle the additional styles for the shell * @param style the additional styles for the styled text widget @@ -392,7 +392,7 @@ * @since 3.0 * @deprecated As of 3.4, replaced by simpler constructors */ - public this(Shell parentShell, int shellStyle, final int style, IInformationPresenter presenter, String statusFieldText) { + public this(Shell parentShell, int shellStyle, int style, IInformationPresenter presenter, String statusFieldText) { super(parentShell, DWT.NO_FOCUS | DWT.ON_TOP | shellStyle, statusFieldText, null); fAdditionalTextStyles= style; fPresenter= presenter; @@ -403,7 +403,7 @@ * Creates a default information control with the given shell as parent. The * given information presenter is used to process the information to be * displayed. - * + * * @param parent the parent shell * @param textStyles the additional styles for the styled text widget * @param presenter the presenter to be used @@ -417,7 +417,7 @@ * Creates a default information control with the given shell as parent. The * given information presenter is used to process the information to be * displayed. - * + * * @param parent the parent shell * @param textStyles the additional styles for the styled text widget * @param presenter the presenter to be used @@ -442,14 +442,14 @@ fText.setFont(JFaceResources.getDialogFont()); FillLayout layout= cast(FillLayout)parent.getLayout(); if (fText.getWordWrap()) { - // indent does not work for wrapping StyledText, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=56342 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=115432 + // indent does not work for wrapping StyledText, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=56342 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=115432 layout.marginHeight= INNER_BORDER; layout.marginWidth= INNER_BORDER; } else { fText.setIndent(INNER_BORDER); } } - + /* * @see IInformationControl#setInformation(String) */ @@ -458,7 +458,7 @@ fText.setText(content); } else { fPresentation.clear(); - + int maxWidth= -1; int maxHeight= -1; Point constraints= getSizeConstraints(); @@ -478,7 +478,7 @@ } if (isResizable()) maxHeight= Integer.MAX_VALUE; - + if ( cast(IInformationPresenterExtension)fPresenter ) content= (cast(IInformationPresenterExtension)fPresenter).updatePresentation(fText, content, fPresentation, maxWidth, maxHeight); else @@ -506,7 +506,7 @@ setSize(currentSize.x, currentSize.y); // restore previous size } } - + super.setVisible(visible); } @@ -519,10 +519,10 @@ Point constraints= getSizeConstraints(); if (constraints !is null && fText.getWordWrap()) widthHint= constraints.x; - + return getShell().computeSize(widthHint, DWT.DEFAULT, true); } - + /* * @see dwtx.jface.text.AbstractInformationControl#computeTrim() */ @@ -575,5 +575,5 @@ } }; } - + }