geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r376006 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal: ConfirmInstallDialog.java GeronimoServerRuntimeWizardFragment.java Messages.properties
Date Wed, 08 Feb 2006 17:45:34 GMT
Author: sppatel
Date: Wed Feb  8 09:45:32 2006
New Revision: 376006

URL: http://svn.apache.org/viewcvs?rev=376006&view=rev
Log:
confirmInstallDialog

Added:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
  (with props)
Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java?rev=376006&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
(added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
Wed Feb  8 09:45:32 2006
@@ -0,0 +1,69 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.ui.internal;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class ConfirmInstallDialog extends Dialog {
+
+	private String installPath = null;
+	
+	public ConfirmInstallDialog(Shell parentShell, String installPath) {
+		super(parentShell);
+		this.installPath = installPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.installTitle);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {		// create a composite with standard
margins and spacing
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+		composite.setFont(parent.getFont());
+		Label label = new Label(composite, SWT.WRAP);
+		label.setText(NLS.bind(Messages.installMessage, new String[] {installPath}));
+		GridData data = new GridData();
+		data.widthHint = 400;
+		label.setLayoutData(data);
+		Dialog.applyDialogFont(composite);
+		return composite;
+	}
+
+}

Propchange: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/ConfirmInstallDialog.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java?rev=376006&r1=376005&r2=376006&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoServerRuntimeWizardFragment.java
Wed Feb  8 09:45:32 2006
@@ -26,6 +26,7 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -61,6 +62,7 @@
 import org.eclipse.wst.server.core.internal.IInstallableRuntime;
 import org.eclipse.wst.server.core.internal.ServerPlugin;
 import org.eclipse.wst.server.core.model.RuntimeDelegate;
+import org.eclipse.wst.server.ui.internal.TerminationDialog;
 import org.eclipse.wst.server.ui.wizard.IWizardHandle;
 
 public class GeronimoServerRuntimeWizardFragment extends
@@ -204,12 +206,9 @@
 				public void widgetSelected(SelectionEvent se) {
 					if (installDir != null && isValidLocation()) {
 						Shell shell = installDir.getShell();
-						MessageBox mb = new MessageBox(shell, SWT.OK
-								| SWT.CANCEL | SWT.ICON_QUESTION);
-						mb.setText(Messages.installTitle);
-						mb.setMessage(Messages.installMessage + "\n"
-								+ installDir.getText());
-						if (mb.open() == SWT.OK) {
+						ConfirmInstallDialog dialog = new ConfirmInstallDialog(shell, installDir.getText());
+						dialog.open();
+						if (dialog.getReturnCode() == IDialogConstants.OK_ID) {
 
 							final IInstallableRuntime installable = tomcat
 									.getSelection() ? gWithTomcat : gWithJetty;

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties?rev=376006&r1=376005&r2=376006&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
Wed Feb  8 09:45:32 2006
@@ -165,8 +165,8 @@
 gWithJetty=Geronimo with Jetty
 install=Download and Install
 jvmWarning=Geronimo is currently only certified on a 1.4 JVM. Use of any other version is
not currently supported.
-installTitle=Download and Install Geronimo?
-installMessage=The Geronimo J2EE Application Server will be installed to
+installTitle=Install Confirmation
+installMessage=Install Apache Geronimo to {0} ?
 tooltipLoc=A location of an existing Geronimo installation or a path to install to.
 tooltipInstall=Downloads the selected Geronimo distribution and installs it to the specified
location.
 tooltipJetty=Selects the Jetty distribution of Geronimo to install.



Mime
View raw message