You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/kdejava/koala/org/kde/koala/KStringListValidator.java

95 lines
4.0 KiB

//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();
}