Example usage for com.google.gwt.user.client.ui Widget setStyleDependentName

List of usage examples for com.google.gwt.user.client.ui Widget setStyleDependentName

Introduction

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

Prototype

public void setStyleDependentName(String styleSuffix, boolean add) 

Source Link

Document

Adds or removes a dependent style name by specifying the style name's suffix.

Usage

From source file:com.vaadin.client.debug.internal.VDebugWindow.java

License:Apache License

/**
 * Activates the given {@link Section}//from w  ww  .  j  a v  a2s  .  com
 * 
 * @param section
 */
void activateSection(Section section) {
    if (section != null && section != activeSection) {
        Highlight.hideAll();
        // remove old stuff
        if (activeSection != null) {
            activeSection.hide();
            content.remove(activeSection.getContent());
            sectionHead.remove(activeSection.getControls());
        }
        // update tab styles
        for (int i = 0; i < tabs.getWidgetCount(); i++) {
            Widget tab = tabs.getWidget(i);
            tab.setStyleDependentName(STYLENAME_SELECTED, tab == section.getTabButton());
        }
        // add new stuff
        content.add(section.getContent());
        sectionHead.add(section.getControls());
        activeSection = section;
        activeSection.show();
    }
}

From source file:org.opennms.gwt.web.ui.asset.client.tools.fieldsets.FlexTableFieldSet.java

License:Open Source License

public void addNewRowWidget(Widget wg) {
    activRow++;//from  w w  w  . j  a v a2  s .co m
    activCell = 0;
    wg.setStyleDependentName("NewRowWidget", true);
    setWidget(activRow, activCell, wg);
}

From source file:org.opennms.gwt.web.ui.asset.client.tools.fieldsets.FlexTableFieldSet.java

License:Open Source License

public void addNewWidget(Widget wg) {
    activCell++;/*from ww  w . j  av  a2s.  c  om*/
    wg.setStyleDependentName("NewWidget", true);
    setWidget(activRow, activCell, wg);
    if (activCell > maxCells) {
        maxCells = activCell;
    }
}

From source file:org.opennms.gwt.web.ui.asset.client.tools.fieldsets.FlexTableFieldSet.java

License:Open Source License

public void addSectionHeader(Widget wg) {
    activRow++;//w w w.j  av  a 2  s  . c  o m
    wg.setStyleDependentName("SectionHeader", true);
    setWidget(activRow, 0, new HTML("<h3>" + wg + "</h3>"));
    getFlexCellFormatter().setColSpan(activRow, 0, 800);
    activRow++;
    activCell = -1;
}