10
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.viewers.ICellEditorValidator;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17 /**
|
|
18 * An interface for validating a cell editor's input.
|
|
19 * <p>
|
|
20 * This interface should be implemented by classes that wish to
|
|
21 * act as cell editor validators.
|
|
22 * </p>
|
|
23 */
|
|
24 public interface ICellEditorValidator {
|
|
25 /**
|
|
26 * Returns a string indicating whether the given value is valid;
|
|
27 * <code>null</code> means valid, and non-<code>null</code> means
|
|
28 * invalid, with the result being the error message to display
|
|
29 * to the end user.
|
|
30 * <p>
|
|
31 * It is the responsibility of the implementor to fully format the
|
|
32 * message before returning it.
|
|
33 * </p>
|
|
34 *
|
|
35 * @param value the value to be validated
|
|
36 * @return the error message, or <code>null</code> indicating
|
|
37 * that the value is valid
|
|
38 */
|
|
39 public String isValid(Object value);
|
|
40 }
|