Example usage for com.vaadin.ui Image removeStyleName

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

Introduction

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

Prototype

@Override
    public void removeStyleName(String style) 

Source Link

Usage

From source file:edu.nps.moves.mmowgli.components.AvatarPanel.java

License:Open Source License

public void setSelectedAvatarId(Object selId) {
    for (int i = 0; i < avIdArr.length; i++) {
        Object aId = avIdArr[i];/* ww w .  ja  va 2 s .  co  m*/

        if (aId.equals(selId)) {
            if (selectedIdx != null) {
                Image oldSel = (Image) imgLay.getComponent(selectedIdx);
                oldSel.removeStyleName("m-orangeborder5");
                oldSel.addStyleName("m-greyborder5");
            }
            Image em = (Image) imgLay.getComponent(i);
            em.removeStyleName("m-greyborder5");
            em.addStyleName("m-orangeborder5");
            selectedIdx = i;
        }
    }
}