01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.viewers;
11:
12: /**
13: * An interface for validating a cell editor's input.
14: * <p>
15: * This interface should be implemented by classes that wish to
16: * act as cell editor validators.
17: * </p>
18: */
19: public interface ICellEditorValidator {
20: /**
21: * Returns a string indicating whether the given value is valid;
22: * <code>null</code> means valid, and non-<code>null</code> means
23: * invalid, with the result being the error message to display
24: * to the end user.
25: * <p>
26: * It is the responsibility of the implementor to fully format the
27: * message before returning it.
28: * </p>
29: *
30: * @param value the value to be validated
31: * @return the error message, or <code>null</code> indicating
32: * that the value is valid
33: */
34: public String isValid(Object value);
35: }
|