Java Code Examples for com.google.gwt.user.client.ui.Widget.setStyleName()

The following are Jave code examples for showing how to use setStyleName() of the com.google.gwt.user.client.ui.Widget class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: empiria.player   File: SelectionGridElementGeneratorImpl.java   Source Code and License Vote up 5 votes
@Override
public SelectionItemGridElementImpl createItemDisplayElement(Element item) {
    SelectionItemGridElementImpl itemLabelElement = new SelectionItemGridElementImpl();
    Widget itemTextLabel = inlineBodyGeneratorSocket.generateInlineBody(item, true);

    itemTextLabel.setStyleName(selectionStyleNameConstants.QP_SELECTION_ITEM_LABEL());
    itemTextLabel.addStyleName(styleNameConstants.QP_MARKANSWERS_LABEL_INACTIVE());

    itemLabelElement.setStyleName(selectionStyleNameConstants.QP_SELECTION_ITEM());
    itemLabelElement.addStyleName(styleNameConstants.QP_MARKANSWERS_MARKER_INACTIVE());
    itemLabelElement.add(itemTextLabel);
    return itemLabelElement;
}
 
Example 2
Project: empiria.player   File: SelectionGridElementGeneratorImpl.java   Source Code and License Vote up 5 votes
@Override
public SelectionChoiceGridElementImpl createChoiceDisplayElement(Element item) {
    SelectionChoiceGridElementImpl choiceLabelElement = new SelectionChoiceGridElementImpl();
    Widget choiceTextLabel = inlineBodyGeneratorSocket.generateInlineBody(item);
    choiceTextLabel.setStyleName(selectionStyleNameConstants.QP_SELECTION_CHOICE());

    choiceLabelElement.add(choiceTextLabel);
    return choiceLabelElement;
}
 
Example 3
Project: empiria.player   File: InlineChoiceMathGapModule.java   Source Code and License Vote up 5 votes
protected void setListBoxEmptyOption() {
    if (hasEmptyOption) {
        Widget emptyOptionInBody = new InlineHTML(GapBase.INLINE_HTML_NBSP);
        emptyOptionInBody.setStyleName(styleNames.QP_MATH_CHOICE_POPUP_OPTION_EMPTY());
        Widget emptyOptionInPopup = new InlineHTML(GapBase.INLINE_HTML_NBSP);
        emptyOptionInPopup.setStyleName(styleNames.QP_MATH_CHOICE_POPUP_OPTION_EMPTY());
        getListBox().addOption(emptyOptionInBody, emptyOptionInPopup);
        getListBox().setSelectedIndex(0);
    } else {
        getListBox().setSelectedIndex(-1);
    }
}
 
Example 4
Project: empiria.player   File: TutorPopupViewImpl.java   Source Code and License Vote up 4 votes
private void unselectAllPersonas() {
    List<Widget> allWidgets = popupViewWidget.getAllWidgets();
    for (Widget widget : allWidgets) {
        widget.setStyleName(styleNameConstants.QP_TUTOR_POPUP_ITEM());
    }
}