Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




RSE Validator Sample Four

This is an example of a validator written by extending an existing RSE-supplied validator, and simply supplying unique messages.

package org.eclipse.rse.samples.ui.frameworks.dialogs;
import org.eclipse.rse.core.ui.validators.ValidatorIntegerRangeInput;
import org.eclipse.rse.samples.*;

 * An example of a customized validator, that prompts for a birth day.
public class SampleBirthDayValidator extends ValidatorIntegerRangeInput
	 * Constructor. Specifies the valid range, and unique error messages.
	public SampleBirthDayValidator()
		super(1, 31);
		super.setErrorMessages(SamplesPlugin.getPluginMessage("SPPD1007"), // empty
		                       SamplesPlugin.getPluginMessage("SPPD1008"), // non-numeric
                                       SamplesPlugin.getPluginMessage("SPPD1009")); // out of range


  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire