package org.richfaces;

import java.util.ArrayList;
import java.util.List;

public enum SeleniumEvent {
	
	ONCLICK("onclick"),
	ONDBLCLICK("ondblclick"),
	ONMOUSEOVER("onmouseover"),
	ONMOUSEMOVE("onmousemove"),
	ONMOUSEOUT("onmouseout"),
	ONMOUSEDOWN("onmousedown"),
	ONMOUSEUP("onmouseup"),
	ONDRAGANDDROP("ondraganddrop"),
	ONKEYDOWN("onkeydown"),
	ONKEYUP("onkeyup"),
	ONKEYPRESS("onkeypress"),
	ONFOCUS("onfocus"),
	ONBLUR("onblur"),
	ONCHANGE("onchange");
	
	
	private String name;
	
	@SuppressWarnings("serial")
	public static final List<SeleniumEvent> STANDARD_HTML_EVENTS = new ArrayList<SeleniumEvent>() {
		@Override
		public void clear() {

		}
	};
	static {
		STANDARD_HTML_EVENTS.add(ONCLICK);
		STANDARD_HTML_EVENTS.add(ONDBLCLICK);
		STANDARD_HTML_EVENTS.add(ONMOUSEOVER);
		STANDARD_HTML_EVENTS.add(ONMOUSEMOVE);
		STANDARD_HTML_EVENTS.add(ONMOUSEOUT);
		STANDARD_HTML_EVENTS.add(ONMOUSEDOWN);
		STANDARD_HTML_EVENTS.add(ONMOUSEUP);
		STANDARD_HTML_EVENTS.add(ONKEYDOWN);
		STANDARD_HTML_EVENTS.add(ONKEYUP);
		STANDARD_HTML_EVENTS.add(ONKEYPRESS);
		STANDARD_HTML_EVENTS.add(ONBLUR);
		STANDARD_HTML_EVENTS.add(ONFOCUS);
		STANDARD_HTML_EVENTS.add(ONCHANGE);
	}
	
	private SeleniumEvent(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	@Override
	public String toString() {
		return name;
	}

}
