Example usage for com.google.gwt.user.client.ui TabLayoutPanel clear

List of usage examples for com.google.gwt.user.client.ui TabLayoutPanel clear

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui TabLayoutPanel clear.

Prototype

public void clear() 

Source Link

Usage

From source file:org.jbpm.form.builder.ng.model.client.form.items.TabbedLayoutFormItem.java

License:Apache License

private void populate(TabLayoutPanel panel) {
    panel.setHeight(getHeight());/*  w ww.  j a  v  a2s.c o  m*/
    panel.setWidth(getWidth());
    panel.clear();
    for (int index = 0; index < this.titles.size() && index < this.tabs.size(); index++) {
        FlowLayoutFormItem flow = this.tabs.get(index);
        TabLabelFormItem label = this.titles.get(index);
        if (flow != null && label != null) {
            FlowLayoutFormItem newFlow = (FlowLayoutFormItem) flow.cloneItem();
            if (this.cssClassName != null && !"".equals(this.cssClassName)) {
                newFlow.setStyleName(this.cssClassName);
            }
            panel.add(newFlow, label.cloneItem());
        }
    }
}