65219a1cdd13b2022723b5175d4556493ee30052
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.editor
.images
;
13 import java
.net
.MalformedURLException
;
16 import org
.apache
.log4j
.Logger
;
17 import org
.eclipse
.jface
.dialogs
.IInputValidator
;
18 import org
.eclipse
.jface
.dialogs
.InputDialog
;
19 import org
.eclipse
.swt
.widgets
.Shell
;
26 public class UrlDialog
extends InputDialog
{
27 private static final Logger logger
= Logger
.getLogger(UrlDialog
.class);
33 * @param dialogMessage
37 public UrlDialog(Shell parentShell
, String dialogTitle
,
38 String dialogMessage
) {
39 super(parentShell
, "Enter image URL",
40 "Enter the new image's URL:", "http://", new IInputValidator() {
43 public String
isValid(String text
) {
47 } catch (MalformedURLException e
) {
48 return "URL not correctly formed.";
51 if (text
.length() <= "http://".length()) {
64 url
= new URL(getValue());
65 } catch (MalformedURLException e
) {
66 // TODO Auto-generated catch block