1 13 package com.tonbeller.wcf.ui; 14 15 import org.w3c.dom.Document ; 16 import org.w3c.dom.Element ; 17 18 21 public class Button extends XoplonCtrl { 22 public static final String NODENAME = "button"; 23 24 public static boolean isButton(Element elem) { 25 return elem.getNodeName().equals(NODENAME); 26 } 27 28 public static Element createButton(Document doc, String id, String label) { 29 Element retVal = XoplonCtrl.createCtrl(doc, NODENAME); 30 XoplonCtrl.setId(retVal, id); 31 XoplonCtrl.setLabel(retVal, label); 32 return retVal; 33 } 34 35 public static Element addButton(Element parent, String id, String label) { 36 Element retVal = createButton(parent.getOwnerDocument(), id, label); 37 parent.appendChild(retVal); 38 return retVal; 39 } 40 } 41 | Popular Tags |