Search in sources :

Example 16 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class SourceEntryViewImpl method createNameOfElement.

private Element createNameOfElement(String fullPath) {
    DivElement textElement = Document.get().createDivElement();
    textElement.setInnerText(fullPath);
    return textElement;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 17 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class AbstractPresentationRenderer method getJointContainer.

/** {@inheritDoc} */
@Override
public Element getJointContainer(Joint joint) {
    Element jointElement;
    switch(joint) {
        case COLLAPSED:
            OMSVGSVGElement svg = treeStyles.iconCollapsed().getSvg();
            svg.addClassNameBaseVal(treeStyles.styles().jointContainer());
            svg.setWidth(Style.Unit.PX, 16.f);
            svg.setHeight(Style.Unit.PX, 16.f);
            jointElement = svg.getElement();
            break;
        case EXPANDED:
            OMSVGSVGElement svg1 = treeStyles.iconExpanded().getSvg();
            svg1.addClassNameBaseVal(treeStyles.styles().jointContainer());
            svg1.setWidth(Style.Unit.PX, 16.f);
            svg1.setHeight(Style.Unit.PX, 16.f);
            jointElement = svg1.getElement();
            break;
        default:
            OMSVGSVGElement svgsvgElement = OMSVGParser.currentDocument().createSVGSVGElement();
            svgsvgElement.addClassNameBaseVal(treeStyles.styles().jointContainer());
            svgsvgElement.setWidth(Style.Unit.PX, 16.f);
            svgsvgElement.setHeight(Style.Unit.PX, 16.f);
            jointElement = svgsvgElement.getElement();
    }
    DivElement wrapper = Document.get().createDivElement();
    wrapper.appendChild(jointElement);
    return jointElement;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement) OMSVGSVGElement(org.vectomatic.dom.svg.OMSVGSVGElement) Element(com.google.gwt.dom.client.Element) DivElement(com.google.gwt.dom.client.DivElement) OMSVGSVGElement(org.vectomatic.dom.svg.OMSVGSVGElement) ImageElement(com.google.gwt.dom.client.ImageElement)

Example 18 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class DefaultPresentationRenderer method createPresentableTextElement.

private Element createPresentableTextElement(NodePresentation presentation) {
    DivElement textElement = Document.get().createDivElement();
    textElement.setInnerText(Strings.nullToEmpty(presentation.getPresentableText()));
    textElement.setAttribute("style", presentation.getPresentableTextCss());
    return textElement;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 19 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class DefaultPresentationRenderer method createInfoTextElement.

private Element createInfoTextElement(NodePresentation presentation) {
    DivElement textElement = Document.get().createDivElement();
    StringBuilder sb = new StringBuilder();
    if (presentation.getInfoTextWrapper() != null) {
        sb.append(presentation.getInfoTextWrapper().first);
    }
    if (!Strings.isNullOrEmpty(presentation.getInfoText())) {
        sb.append(presentation.getInfoText());
    }
    if (presentation.getInfoTextWrapper() != null) {
        sb.append(presentation.getInfoTextWrapper().second);
    }
    textElement.setInnerText(sb.toString());
    textElement.setAttribute("style", presentation.getInfoTextCss());
    return textElement;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Example 20 with DivElement

use of com.google.gwt.dom.client.DivElement in project che by eclipse.

the class AbstractPresentationRenderer method getPresentableTextContainer.

/** {@inheritDoc} */
@Override
public Element getPresentableTextContainer(Element content) {
    DivElement divElement = Document.get().createDivElement();
    divElement.setClassName(treeStyles.styles().presentableTextContainer());
    divElement.appendChild(content);
    return divElement;
}
Also used : DivElement(com.google.gwt.dom.client.DivElement)

Aggregations

DivElement (com.google.gwt.dom.client.DivElement)25 Element (com.google.gwt.dom.client.Element)2 Test (org.junit.Test)2 RepeatingCommand (com.google.gwt.core.client.Scheduler.RepeatingCommand)1 ImageElement (com.google.gwt.dom.client.ImageElement)1 Style (com.google.gwt.dom.client.Style)1 HTMLPanel (com.google.gwt.user.client.ui.HTMLPanel)1 Label (com.google.gwt.user.client.ui.Label)1 Element (elemental.dom.Element)1 Event (elemental.events.Event)1 EventListener (elemental.events.EventListener)1 LIElement (elemental.html.LIElement)1 SpanElement (elemental.html.SpanElement)1 ActionEvent (org.eclipse.che.ide.api.action.ActionEvent)1 Presentation (org.eclipse.che.ide.api.action.Presentation)1 ResourceChangedEvent (org.eclipse.che.ide.api.resources.ResourceChangedEvent)1 Value (org.rstudio.studio.client.common.Value)1 OMSVGSVGElement (org.vectomatic.dom.svg.OMSVGSVGElement)1