package jp.sourceforge.cfneo.at4ie2.api.browser.impl.ie;

import jp.sourceforge.cfneo.at4ie2.BTRuntimeError;
import jp.sourceforge.cfneo.at4ie2.api.browser.TextField;

public class BTTextField implements TextField {

	watij.elements.TextField textField;

	BTTextField(watij.elements.TextField textField) {
		this.textField = textField;
	}

	public String getValue() {
		try {
			return this.textField.value();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	public void setValue(String value) {
		try {
			this.textField.set(value);
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	public String getId() {
		try {
			return this.textField.id();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	public String getName() {
		try {
			return this.textField.name();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public boolean exists() {
		try {
			return this.textField.exists();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}

}
