Example usage for com.google.gwt.dom.client TableSectionElement getStyle

List of usage examples for com.google.gwt.dom.client TableSectionElement getStyle

Introduction

In this page you can find the example usage for com.google.gwt.dom.client TableSectionElement getStyle.

Prototype

@Override
    public Style getStyle() 

Source Link

Usage

From source file:com.extjs.gxt.ui.client.widget.grid.GridView.java

License:sencha.com license

protected void updateColumnHidden(int index, boolean hidden) {
    int tw = getTotalWidth();
    String display = hidden ? "none" : "";

    El.fly(innerHd.dom.getFirstChildElement()).setWidth(getOffsetWidth());
    El.fly(innerHd.dom.getFirstChildElement().getFirstChildElement()).setWidth(tw);

    header.updateColumnHidden(index, hidden);
    if (footer != null) {
        footer.updateTotalWidth(getOffsetWidth(), tw);
        footer.updateColumnHidden(index, hidden);
    }//from w w  w  .  j a  v  a2  s  . c  om

    NodeList<Element> ns = getRows();
    for (int i = 0, len = ns.getLength(); i < len; i++) {
        Element elem = ns.getItem(i);
        elem.getStyle().setProperty("width", tw + "px");
        TableSectionElement e = (TableSectionElement) elem.getFirstChild();
        if (e != null) {
            e.getStyle().setProperty("width", tw + "px");
            Element cell = e.getRows().getItem(0).getChildNodes().getItem(index).cast();
            cell.getStyle().setProperty("display", display);
        }
    }

    templateOnColumnHiddenUpdated(index, hidden, tw);

    lastViewWidth = -1;
    layout();
    syncHScroll();
}