Mercurial > projects > dwt-addons
diff dwtx/jface/dialogs/PopupDialog.d @ 71:4878bef4a38e
Some fixing
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 04:03:58 +0200 |
parents | 46a6e0e6ccd4 |
children | 5df4896124c7 |
line wrap: on
line diff
--- a/dwtx/jface/dialogs/PopupDialog.d Thu May 22 01:36:46 2008 +0200 +++ b/dwtx/jface/dialogs/PopupDialog.d Thu May 22 04:03:58 2008 +0200 @@ -106,7 +106,7 @@ /** * The dialog settings key name for remembering if the persisted bounds * should be accessed. - * + * * @deprecated Since 3.4, this is retained only for backward compatibility. */ private static final String DIALOG_USE_PERSISTED_BOUNDS = "DIALOG_USE_PERSISTED_BOUNDS"; //$NON-NLS-1$ @@ -114,7 +114,7 @@ /** * The dialog settings key name for remembering if the bounds persisted * prior to 3.4 have been migrated to the 3.4 settings. - * + * * @since 3.4 * @deprecated This is marked deprecated at its introduction to discourage * future dependency @@ -196,12 +196,12 @@ } /** - * + * * Remember bounds action for the dialog. */ - private class PersistSizeAction extends Action { + private class PersistSizeAction : Action { - PersistSizeAction() { + this() { super(JFaceResources.getString("PopupDialog.persistSize"), //$NON-NLS-1$ IAction.AS_CHECK_BOX); setChecked(persistSize); @@ -209,7 +209,7 @@ /* * (non-Javadoc) - * + * * @see dwtx.jface.action.IAction#run() */ public void run() { @@ -218,12 +218,12 @@ } /** - * + * * Remember location action for the dialog. */ - private class PersistLocationAction extends Action { + private class PersistLocationAction : Action { - PersistLocationAction() { + this() { super(JFaceResources.getString("PopupDialog.persistLocation"), //$NON-NLS-1$ IAction.AS_CHECK_BOX); setChecked(persistLocation); @@ -231,7 +231,7 @@ /* * (non-Javadoc) - * + * * @see dwtx.jface.action.IAction#run() */ public void run() { @@ -241,7 +241,7 @@ /** * Shell style appropriate for a simple hover popup that cannot get focus. - * + * */ public const static int HOVER_SHELLSTYLE = DWT.NO_FOCUS | DWT.ON_TOP | DWT.TOOL; @@ -282,20 +282,20 @@ /** * Image registry key for menu image. - * + * * @since 3.3 */ public static final String POPUP_IMG_MENU = "popup_menu_image"; //$NON-NLS-1$ /** * Image registry key for disabled menu image. - * + * * @since 3.3 */ public static final String POPUP_IMG_MENU_DISABLED = "popup_menu_image_diabled"; //$NON-NLS-1$ /** - * + * */ private static final GridLayoutFactory POPUP_LAYOUT_FACTORY; @@ -386,7 +386,7 @@ private bool persistLocation = false; /** * Flag specifying whether to use new 3.4 API instead of the old one. - * + * * @since 3.4 */ private bool isUsing34API = true; @@ -433,12 +433,12 @@ * @param infoText * Text to be shown in a lower info area, or <code>null</code> * if there is no info area. - * + * * @see PopupDialog#getDialogSettings() * @deprecated As of 3.4, replaced by * {@link #PopupDialog(Shell, int, bool, bool, bool, bool, bool, String, String)} */ - public PopupDialog(Shell parent, int shellStyle, bool takeFocusOnOpen, + public this(Shell parent, int shellStyle, bool takeFocusOnOpen, bool persistBounds, bool showDialogMenu, bool showPersistActions, String titleText, String infoText) { this(parent, shellStyle, takeFocusOnOpen, persistBounds, persistBounds, @@ -447,7 +447,7 @@ /** * Constructs a new instance of <code>PopupDialog</code>. - * + * * @param parent * The parent shell. * @param shellStyle @@ -484,12 +484,12 @@ * @param infoText * Text to be shown in a lower info area, or <code>null</code> * if there is no info area. - * + * * @see PopupDialog#getDialogSettings() - * + * * @since 3.4 */ - public PopupDialog(Shell parent, int shellStyle, bool takeFocusOnOpen, + public this(Shell parent, int shellStyle, bool takeFocusOnOpen, bool persistSize, bool persistLocation, bool showDialogMenu, bool showPersistActions, String titleText, String infoText) { @@ -500,7 +500,7 @@ /** * Constructs a new instance of <code>PopupDialog</code>. - * + * * @param parent * The parent shell. * @param shellStyle @@ -539,12 +539,12 @@ * if there is no info area. * @param use34API * <code>true</code> if 3.4 API should be used - * + * * @see PopupDialog#getDialogSettings() - * + * * @since 3.4 */ - private PopupDialog(Shell parent, int shellStyle, bool takeFocusOnOpen, + private this(Shell parent, int shellStyle, bool takeFocusOnOpen, bool persistSize, bool persistLocation, bool showDialogMenu, bool showPersistActions, String titleText, String infoText, bool use34API) { @@ -653,7 +653,7 @@ private void asyncClose() { // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=152010 - getShell().getDisplay().asyncExec(new Runnable() { + getShell().getDisplay().asyncExec(new class Runnable { public void run() { close(); } @@ -865,8 +865,8 @@ // Status label infoLabel = new Label(parent, DWT.RIGHT); infoLabel.setText(infoText); - - GridDataFactory.fillDefaults().grab(true, false).align(DWT.FILL, + + GridDataFactory.fillDefaults().grab(true, false).align_(DWT.FILL, DWT.BEGINNING).applyTo(infoLabel); infoLabel.setForeground(parent.getDisplay().getSystemColor( DWT.COLOR_WIDGET_DARK_SHADOW)); @@ -1036,7 +1036,7 @@ * * @return <code>true</code> if the dialog's bounds will be persisted, * <code>false</code> if it will not. - * + * * @deprecated As of 3.4, please use {@link #getPersistLocation()} or * {@link #getPersistSize()} to determine separately whether * size or location should be persisted. @@ -1050,10 +1050,10 @@ * location. This value is initially set in the dialog's constructor, but * can be modified if the persist location action is shown on the menu and * the user has changed its value. Subclasses may override this method. - * + * * @return <code>true</code> if the dialog's location will be persisted, * <code>false</code> if it will not. - * + * * @see #getPersistSize() * @since 3.4 */ @@ -1066,10 +1066,10 @@ * This value is initially set in the dialog's constructor, but can be * modified if the persist size action is shown on the menu and the user has * changed its value. Subclasses may override this method. - * + * * @return <code>true</code> if the dialog's size will be persisted, * <code>false</code> if it will not. - * + * * @see #getPersistLocation() * @since 3.4 */ @@ -1250,9 +1250,9 @@ * implementation returns the preferred size of the shell. Subclasses should * override this method when an alternate default size is desired, rather * than overriding {@link #getInitialSize()}. - * + * * @return the initial size of the shell - * + * * @see #getPersistSize() * @since 3.4 */ @@ -1267,12 +1267,12 @@ * {@link dwtx.jface.window.Window#getInitialLocation(Point)}. * Subclasses should override this method when an alternate default location * is desired, rather than overriding {@link #getInitialLocation(Point)}. - * + * * @param initialSize * the initial size of the shell, as returned by * <code>getInitialSize</code>. * @return the initial location of the shell - * + * * @see #getPersistLocation() * @since 3.4 */ @@ -1347,11 +1347,11 @@ /** * Get the foreground color that should be used for this popup. Subclasses * may override. - * + * * @return the foreground color to be used. Should not be <code>null</code>. - * + * * @since 3.4 - * + * * @see #getForegroundColorExclusions() */ protected Color getForeground() { @@ -1361,11 +1361,11 @@ /** * Get the background color that should be used for this popup. Subclasses * may override. - * + * * @return the background color to be used. Should not be <code>null</code>. - * + * * @since 3.4 - * + * * @see #getBackgroundColorExclusions() */ protected Color getBackground() { @@ -1374,7 +1374,7 @@ /** * Return the default foreground color used for popup dialogs. - * + * * @return the default foreground color. */ private Color getDefaultForeground() { @@ -1384,7 +1384,7 @@ /** * Return the default background color used for popup dialogs. - * + * * @return the default background color */ private Color getDefaultBackground() { @@ -1597,7 +1597,7 @@ /** * The dialog is being disposed. Dispose of any resources allocated. - * + * */ private void handleDispose() { if (infoFont !is null && !infoFont.isDisposed()) {