de.swm.gwt.client.widget.Div Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swm-gwt-client Show documentation
Show all versions of swm-gwt-client Show documentation
Plain GWT Swm erweiterungen, auch zur benutzung in mobilen Geraeten
The newest version!
package de.swm.gwt.client.widget;
import com.google.gwt.dom.client.Document;
import com.google.gwt.user.client.ui.ComplexPanel;
import com.google.gwt.user.client.ui.Widget;
/**
* Erzeugt ein Div Tag.
*
* @author wiese.daniel
*
* copyright (C) 2014, Stadtwerke München GmbH
*/
public class Div extends ComplexPanel {
/**
* Constructor.
*/
public Div() {
setElement(Document.get().createDivElement());
}
/**
* Alls a child.
* @param child .
*/
@Override
public void add(final Widget child) {
add(child, getElement());
}
/**
* Sets the id of the html element.
* @param id the id
*/
public void setId(final String id) {
getElement().setId(id);
}
/**
* Returns the id of the html element.
* @return the id.
*/
public String getId() {
return getElement().getId();
}
/**
* Will set the class tag.
* @param clazz the class tag.
*/
public void setClass(final String clazz) {
getElement().addClassName(clazz);
}
}