--- /dev/null
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
+ * 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.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.ui.dialog;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IconAndMessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Link Dialog.
+ * This dialog provides text link which do something when user select it.
+ *
+ * @author hyunsik.noh {@literal <hyunsik.noh@samsung.com>} (S-Core)
+ */
+public class LinkDialog extends IconAndMessageDialog{
+
+ private String message = null;
+ private SelectionListener listener = null;
+ private String title = null;
+
+ /**
+ *
+ * @param parentShell Parent shell
+ * @param listener The listener to handle event when user select the link. (if null, do nothing)
+ * @param title The dialog title.
+ * @param msg The dialog messages. The message to link needs {@code <A></A>} tag.
+ */
+ public LinkDialog(Shell parentShell, SelectionListener listener, String title, String msg) {
+ super(parentShell);
+ this.title = title;
+ this.listener = listener;
+ this.message = msg;
+ }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(title);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite composite) {
+
+ Link launchDialog = new Link(composite, getMessageLabelStyle());
+ launchDialog.setText(message);
+ GridDataFactory
+ .fillDefaults()
+ .align(SWT.FILL, SWT.BEGINNING)
+ .grab(true, false)
+ .hint(
+ convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
+ SWT.DEFAULT).applyTo(launchDialog);
+
+ if(listener != null) {
+ launchDialog.addSelectionListener(listener);
+ }
+ return composite;
+ }
+
+ @Override
+ protected Image getImage() {
+ return null;
+ }
+
+ /**
+ * Creates the buttons
+ *
+ * @param parent the parent composite
+ */
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ }
+}
\ No newline at end of file