summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KStringListValidator.java
blob: 80b7bc3a0c84933fa8d4a330447e052d788d0791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.QObject;
import java.util.ArrayList;
import org.kde.qt.QValidator;

/**

 This validator allows you to accept only certain or to accept all
 but certain strings.
 When used in rejecting mode, accepts only strings not in the
 stringlist. This mode is the default and comes in handy when asking
 the user for a name of some listed entity. Set the list of already
 used names to prevent the user from entering duplicate names.
 When used in non-rejecting mode, accepts only strings that appear
 in the stringlist. Use with care! From a user's point of view this
 mode is hard to grasp.
 This validator can also fix strings. In rejecting mode, a number
 will be appended to the string until it is Acceptable. E.g. if
 "foo" and "foo 1" are in the stringlist, then fixup will change
 "foo" to "foo 2", provided "foo 2" isn't in the list of forbidden
 strings.
 In accepting mode, when the input starts with an Acceptable
 substring, truncates to the longest Acceptable string. When the
 input is the start of an Acceptable string, completes to the
 shortest Acceptable string.
 NOTE: fixup isn't yet implemented.
		@author Marc Mutz <mutz@kde.org>

		@short A QValidator to (dis)allow certain strings.

*/
public class KStringListValidator extends QValidator  {
	protected KStringListValidator(Class dummy){super((Class) null);}
	public native QMetaObject metaObject();
	public native String className();
	/**	 Construct a new validator.
			@param list The list of strings to (dis)allow.
			@param rejecting Selects the validator's mode
		                     (rejecting: true; accepting: false)
			@param fixupEnabled Selects whether to fix strings or not.
			@param parent Passed to lower level constructor.
			@param name Passed to lower level constructor
				@short   Construct a new validator.
	*/
	public KStringListValidator(String[] list, boolean rejecting, boolean fixupEnabled, QObject parent, String name) {
		super((Class) null);
		newKStringListValidator(list,rejecting,fixupEnabled,parent,name);
	}
	private native void newKStringListValidator(String[] list, boolean rejecting, boolean fixupEnabled, QObject parent, String name);
	public KStringListValidator(String[] list, boolean rejecting, boolean fixupEnabled, QObject parent) {
		super((Class) null);
		newKStringListValidator(list,rejecting,fixupEnabled,parent);
	}
	private native void newKStringListValidator(String[] list, boolean rejecting, boolean fixupEnabled, QObject parent);
	public KStringListValidator(String[] list, boolean rejecting, boolean fixupEnabled) {
		super((Class) null);
		newKStringListValidator(list,rejecting,fixupEnabled);
	}
	private native void newKStringListValidator(String[] list, boolean rejecting, boolean fixupEnabled);
	public KStringListValidator(String[] list, boolean rejecting) {
		super((Class) null);
		newKStringListValidator(list,rejecting);
	}
	private native void newKStringListValidator(String[] list, boolean rejecting);
	public KStringListValidator(String[] list) {
		super((Class) null);
		newKStringListValidator(list);
	}
	private native void newKStringListValidator(String[] list);
	public KStringListValidator() {
		super((Class) null);
		newKStringListValidator();
	}
	private native void newKStringListValidator();
	public native int validate(StringBuffer input, int[] pos);
	public native void fixup(StringBuffer input);
	public native void setRejecting(boolean rejecting);
	public native boolean isRejecting();
	public native void setFixupEnabled(boolean fixupEnabled);
	public native boolean isFixupEnabled();
	public native void setStringList(String[] list);
	public native ArrayList stringList();
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}