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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations