1 21 24 package org.lobobrowser.html.domimpl; 25 26 import java.io.UnsupportedEncodingException ; 27 28 import org.lobobrowser.html.FormInput; 29 import org.w3c.dom.html2.HTMLFormElement; 30 import org.w3c.dom.html2.HTMLTextAreaElement; 31 32 public class HTMLTextAreaElementImpl extends HTMLBaseInputElement implements 33 HTMLTextAreaElement { 34 public HTMLTextAreaElementImpl(String name) { 35 super(name); 36 } 37 38 public HTMLTextAreaElementImpl() { 39 super("TEXTAREA"); 40 } 41 42 protected FormInput[] getFormInputs() { 43 String name = this.getName(); 44 if(name == null) { 45 return null; 46 } 47 return new FormInput[] { new FormInput(name, this.getValue()) }; 48 } 49 50 53 public int getCols() { 54 InputContext ic = this.inputContext; 55 return ic == null ? 0 : ic.getCols(); 56 } 57 58 61 public int getRows() { 62 InputContext ic = this.inputContext; 63 return ic == null ? 0 : ic.getRows(); 64 } 65 66 69 public String getType() { 70 return "textarea"; 71 } 72 73 76 public void setCols(int cols) { 77 InputContext ic = this.inputContext; 78 if(ic != null) { 79 ic.setCols(cols); 80 } 81 } 82 83 86 public void setRows(int rows) { 87 InputContext ic = this.inputContext; 88 if(ic != null) { 89 ic.setRows(rows); 90 } 91 } 92 } 93 | Popular Tags |