Example usage for com.google.gwt.user.client Element addClassName

List of usage examples for com.google.gwt.user.client Element addClassName

Introduction

In this page you can find the example usage for com.google.gwt.user.client Element addClassName.

Prototype

@Override
    public boolean addClassName(String className) 

Source Link

Usage

From source file:edu.nrao.dss.client.forms.fields.GeneralCheckbox.java

License:Open Source License

public GeneralCheckbox() {
    super();/*from  www  .j av a  2  s .c  o  m*/
    addListener(Events.Change, new Listener<FieldEvent>() {

        @Override
        public void handleEvent(FieldEvent be) {
            //getElement().getParentElement().addClassName("x-grid3-dirty-cell");
            Element el = getElement();
            if (el != null) {
                com.google.gwt.dom.client.Element parent = el.getParentElement();
                if (parent != null && isRendered()) {
                    parent.addClassName("x-grid3-dirty-cell");
                }
            }
        }

    });
}

From source file:edu.nrao.dss.client.forms.fields.GeneralCombo.java

License:Open Source License

public void init(String name, String label) {
    setFieldLabel(label);/*from  w w  w . jav  a  2s .c om*/
    setName(name);
    setId(name);
    setData("name", name);
    setStore(comboStore);
    setDisplayField("name");
    setValueField("name");
    setTypeAhead(true);
    setTriggerAction(TriggerAction.ALL);
    setEditable(false);
    setValue(this.getStore().getAt(0));
    //setAutoWidth(true);

    addSelectionChangedListener(new SelectionChangedListener<ComboModel>() {

        @Override
        public void selectionChanged(SelectionChangedEvent<ComboModel> se) {
            Element el = getElement();
            if (el != null) {
                com.google.gwt.dom.client.Element parent = el.getParentElement();
                if (parent != null && isRendered()) {
                    parent.addClassName("x-grid3-dirty-cell");
                }
            }
        }

    });
}

From source file:fi.jasoft.dragdroplayouts.client.ui.VDDHorizontalSplitPanel.java

License:Apache License

/**
 * Emphasisizes a container element//from ww w .j  a  v a2  s .  c  o m
 * 
 * @param element
 */
protected void emphasis(Element element) {
    // Remove previous emphasis
    deEmphasis();

    if (element == firstContainer || element == secondContainer) {
        element.addClassName(OVER);
        currentEmphasis = element;
    } else if (splitter.isOrHasChild(element)) {
        currentEmphasis = splitter.getChild(0).cast();
        currentEmphasis.addClassName(OVER_SPLITTER);
    }
}

From source file:hu.mapro.gxt.theme.green.client.menu.BlueHeaderMenuItemAppearance.java

License:sencha.com license

@Override
public void applyItemStyle(Element element) {
    element.addClassName(headerStyle.menuText());
}

From source file:info.magnolia.ui.vaadin.gwt.client.applauncher.widget.VPermanentAppTileGroup.java

License:Open Source License

private void createSectionItem() {
    final Element sectionEl = DOM.createDiv();
    final Element sectionLabel = DOM.createSpan();

    sectionEl.appendChild(sectionLabel);
    sectionEl.addClassName("item");
    sectionEl.addClassName("section");

    sectionLabel.addClassName("sectionLabel");
    if (caption != null && !caption.contains("\u00AD")) {
        sectionLabel.addClassName("wordwrap");
    }/* www .j  a  v  a2  s  . co m*/
    sectionLabel.setInnerText(caption);
    sectionEl.getStyle().setBackgroundColor(getColor());
    getElement().appendChild(sectionEl);
}

From source file:info.magnolia.ui.vaadin.gwt.client.applauncher.widget.VTemporaryAppGroupBarTile.java

License:Open Source License

private void constructDOM(String caption) {

    element = this.getElement();
    element.addClassName("item");
    element.addClassName("section");
    element.addClassName("closed");

    /*/*from   w  w  w .  j  a v  a 2  s  . c  om*/
     * if (group.isClientGroup()) {
     * element.addClassName("client-group");
     * } else {
     * }
     */

    final Element label = DOM.createSpan();
    label.addClassName("sectionLabel");
    if (caption != null && !caption.contains("\u00AD")) {
        label.addClassName("wordwrap");
    }
    label.setInnerText(caption);

    Element notch = DOM.createSpan();
    notch.addClassName("notch");

    element.appendChild(label);
    element.appendChild(notch);

}

From source file:info.magnolia.ui.vaadin.gwt.client.dialog.widget.BaseDialogViewImpl.java

License:Open Source License

public BaseDialogViewImpl() {
    final Element rootEl = DOM.createDiv();
    final Element wrapperEl = DOM.createDiv();

    setElement(rootEl);//w ww.ja v a 2s . co  m
    rootEl.appendChild(wrapperEl);
    add(header, wrapperEl);
    wrapperEl.appendChild(contentEl);
    wrapperEl.appendChild(footerEl);
    footerEl.appendChild(footerToolbarEl);

    rootEl.addClassName(CLASSNAME_ROOT);
    wrapperEl.addClassName(CLASSNAME_WRAPPER);
    contentEl.addClassName(CLASSNAME_CONTENT);
    footerEl.addClassName(CLASSNAME_FOOTER);
    footerToolbarEl.addClassName(CLASSNAME_FOOTER_TOOLBAR);
}

From source file:info.magnolia.ui.vaadin.gwt.client.magnoliashell.shell.NavigatorButton.java

License:Open Source License

public NavigatorButton(final ShellAppType type) {
    super();//from   w  ww .j  av  a 2  s  . c  o  m
    addStyleName("btn-shell");
    Element root = getElement();
    root.setId("btn-" + type.getCssClass());
    root.addClassName("icon-" + type.getCssClass());

    indicator.setFillColor("#fff");
    indicator.setStrokeColor("#689600");
    indicator.setOutline(true);
    root.appendChild(indicator.getElement());

    DOM.sinkEvents(getElement(), Event.TOUCHEVENTS);
}

From source file:info.magnolia.ui.vaadin.gwt.client.magnoliashell.shellmessage.VDetailedShellMessage.java

License:Open Source License

@Override
protected void construct() {
    super.construct();
    Element detailMessageElement = DOM.createDiv();
    detailMessageElement.addClassName("v-shell-message-detail");
    detailMessageElement.setInnerText(getMessage());
    detailsEl.appendChild(detailMessageElement);
    getElement().appendChild(detailsEl);
}

From source file:info.magnolia.ui.vaadin.gwt.client.magnoliashell.shellmessage.VShellErrorMessage.java

License:Open Source License

@Override
protected void applyCloseIconStyles(Element element) {
    super.applyCloseIconStyles(element);
    element.addClassName("close-error");
}