PortFieldEditorpublic class PortFieldEditor extends org.eclipse.jface.preference.IntegerFieldEditor Edit an integer field, validating it as a port number. |
Fields Summary |
---|
public boolean | mRecursiveCheck |
Methods Summary |
---|
protected boolean | checkState()
if (super.checkState() == false) {
return false;
}
//Log.i("ddms", "check state " + getStringValue());
boolean err = false;
int val = getCurrentValue();
if (val < 1024 || val > 32767) {
setErrorMessage("Port must be between 1024 and 32767");
err = true;
} else {
setErrorMessage(null);
err = false;
}
showErrorMessage();
return !err;
| public int | getCurrentValue()
int val;
try {
val = Integer.parseInt(getStringValue());
}
catch (NumberFormatException nfe) {
val = -1;
}
return val;
| protected void | updateCheckState(com.android.ddmuilib.PortFieldEditor pfe)
pfe.refreshValidState();
|
|