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

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

Introduction

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

Prototype

public void addStyleDependentName(String styleSuffix) 

Source Link

Document

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

Usage

From source file:com.eas.window.WindowPanel.java

@Override
public void activate() {
    if (!active) {
        active = true;/*from   ww w . jav a  2  s . c  o  m*/
        if (captionWidget != null) {
            captionWidget.addStyleDependentName(ACTIVE_SUFFIX_NAMNE);
        }
        Widget[] widgets = new Widget[] { n, s, w, e, ne, nw, se, sw, content };
        for (Widget _w : widgets) {
            _w.addStyleDependentName(ACTIVE_SUFFIX_NAMNE);
        }
        ActivateEvent.<WindowUI>fire(this, this);
    }
}

From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.Toolbar.java

License:Open Source License

public void setButtonEnabled(int index, boolean enabled) {
    Widget btn = buttons.get(index);
    if (btn != null) {
        if (enabled) {
            btn.removeStyleDependentName("Disabled");
        } else {//  w w w. jav a  2 s  .  c  o m
            btn.addStyleDependentName("Disabled");
        }
    }
}

From source file:com.moesol.gwt.maps.client.TileImageLoadListener.java

License:Open Source License

@Override
public void onError(ErrorEvent event) {
    // Allow another zoom
    Widget image = (Widget) event.getSource();
    m_tileEngine.markLoaded(image);/*from   ww w.jav a  2s .  c o  m*/
    // Allow different css when image is error.
    image.addStyleDependentName("error");
}

From source file:com.moesol.gwt.maps.client.TileImageLoadListener.java

License:Open Source License

@Override
public void onLoad(LoadEvent event) {
    Widget image = (Widget) event.getSource();
    m_tileEngine.markLoaded(image);//  w ww. ja  v a  2 s  .co  m
    // Allow background css when image is loaded.
    image.addStyleDependentName("loaded");
}

From source file:com.vaadin.client.ui.calendar.schedule.DayToolbar.java

License:Apache License

private void updateWidgetSizedStyleName(Widget w) {
    if (verticalSized) {
        w.addStyleDependentName("Vsized");
    } else {//from  ww  w. j  av a  2  s .  c  o  m
        w.removeStyleDependentName("VSized");
    }
    if (horizontalSized) {
        w.addStyleDependentName("Hsized");
    } else {
        w.removeStyleDependentName("HSized");
    }
}

From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java

License:Open Source License

/**
 * Highlight the current step in the user navigation
 * //from   w w w  .  j a  v  a 2 s  .c  o m
 * Select the "step" at the new index, and unselect the step
 * at the old index by updating the dependent style sheet names
 * 
 * @param newIndex
 * @param prevIndex
 */
protected void updateStep(Widget oldStep, String styleNameForOldStep, Widget newStep) {

    // deselect the old widgets
    oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
    oldStep.addStyleDependentName(styleNameForOldStep);

    // select the new widgets
    newStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED);
    newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
}

From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java

License:Open Source License

/**
 * Call back when "next" navigation button is clicked
 * Does nothing if already at end of step list
 *///w  w  w  .j a va  2 s  .  c  om
public void onNext() {
    if (currentStep < stepList.size() - 1) {
        Widget oldStep = stepList.get(currentStep);
        Widget newStep = stepList.get(++currentStep);
        // deselect the old widgets
        oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
        oldStep.addStyleDependentName(STYLE_COMPLETE);
        // select the new widgets
        newStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED);
        newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
    }
}

From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java

License:Open Source License

/**
 * Call back when "next" navigation button is clicked
 * Does nothing if already at end of step list
 *//* ww w . jav a 2s . co m*/
public void onPrevious() {
    if (currentStep > 0) {
        Widget oldStep = stepList.get(currentStep);
        Widget newStep = stepList.get(--currentStep);
        // deselect the old widgets
        oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
        oldStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED);
        // select the new widgets
        newStep.removeStyleDependentName(STYLE_COMPLETE);
        newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
    }
}

From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java

License:Open Source License

public void reset() {
    if (currentStep > 0) {
        Widget oldStep = stepList.get(currentStep);
        currentStep = 0;/* w  w  w  . ja  va2 s.c o m*/
        Widget newStep = stepList.get(currentStep);
        // deselect the old widgets
        oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
        oldStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED);
        // select the new widgets
        newStep.removeStyleDependentName(STYLE_COMPLETE);
        newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED);
    }
}

From source file:eu.nextstreet.gwt.components.client.ui.widget.suggest.impl.table.SimpleTableRowItemRenderer.java

License:Apache License

public void addStyleDependentName(String styleSuffix) {
    for (Widget widget : this) {
        widget.addStyleDependentName(styleSuffix);
    }/*from www.  jav a 2 s .  c  o m*/
}