|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 package com.symbian.smt.gui.smtwidgets; |
|
19 |
|
20 import org.eclipse.jface.dialogs.IInputValidator; |
|
21 |
|
22 /** |
|
23 * An extension of the IInputValidator interface that is equipped to also handle |
|
24 * warnings. While the superinterface method <code>isValid()</code> determines |
|
25 * whether user input is ok or in error, this interface's <code>isWarning</code> |
|
26 * method determines whether the user input is produces a non disabling warning. |
|
27 * <p> |
|
28 * For an example of usage, see class InputDialogWithWarning. |
|
29 * </p> |
|
30 * |
|
31 * @author barbararosi-schwartz |
|
32 * @see com.symbian.smt.gui.smtwidgets.InputDialogWithWarning |
|
33 */ |
|
34 public interface IInputValidatorWithWarning extends IInputValidator { |
|
35 /** |
|
36 * Determines whether or not the given string should produce a non-disabling |
|
37 * warning. Returns a warning message to display if the new text is invalid. |
|
38 * Returns <code>null</code> if there is no warning. |
|
39 * |
|
40 * The unconventional method signature follows the pattern of |
|
41 * IInputValidator's isValid() method. |
|
42 * |
|
43 * @param newText |
|
44 * the text to check for validity |
|
45 * |
|
46 * @return a warning message or <code>null</code> if no warning |
|
47 */ |
|
48 public String isWarning(String newText); |
|
49 } |