Example usage for com.vaadin.ui AbstractComponent removeStyleName

List of usage examples for com.vaadin.ui AbstractComponent removeStyleName

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractComponent removeStyleName.

Prototype

@Override
    public void removeStyleName(String style) 

Source Link

Usage

From source file:de.symeda.sormas.ui.SubMenu.java

License:Open Source License

/**
 * Highlights a view navigation button as the currently active view in the
 * menu. This method does not perform the actual navigation.
 *
 * @param viewName//  w  w  w  .  j  av a  2  s .c o  m
 *            the name of the view to show as active
 */
public void setActiveView(String viewName) {
    for (AbstractComponent button : viewMenuItemMap.values()) {
        button.removeStyleName("selected");
    }
    AbstractComponent selected = viewMenuItemMap.get(viewName);
    if (selected != null) {
        selected.addStyleName("selected");
    }
}