use of com.google.gwt.dom.client.Element in project che by eclipse.
the class TreeView method getDescendantsContainer.
public Element getDescendantsContainer(NodeDescriptor node) {
if (node.getDescendantsContainerElement() == null) {
Element element = getRootContainer(node).getChildNodes().getItem(1).cast();
node.setDescendantsContainerElement(element);
}
return node.getDescendantsContainerElement();
}
use of com.google.gwt.dom.client.Element in project che by eclipse.
the class TreeView method onJointChange.
public void onJointChange(NodeDescriptor node, Tree.Joint joint) {
Element currJointEl = getJointContainer(node);
if (currJointEl == null) {
return;
}
Element jointContainer = tree.getPresentationRenderer().getJointContainer(joint);
getNodeContainer(node).insertFirst(jointContainer);
currJointEl.removeFromParent();
node.setJointContainerElement(jointContainer);
}
use of com.google.gwt.dom.client.Element in project che by eclipse.
the class ProjectClasspathViewImpl method createButtons.
private void createButtons() {
doneButton = createPrimaryButton(localization.buttonDone(), "window-edit-configurations-close", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onDoneClicked();
}
});
addButtonToFooter(doneButton);
Element dummyFocusElement = DOM.createSpan();
dummyFocusElement.setTabIndex(0);
getFooter().getElement().appendChild(dummyFocusElement);
}
use of com.google.gwt.dom.client.Element in project che by eclipse.
the class ParametersHintsViewImpl method show.
@Override
public void show(List<MethodParameters> parametersList, int x, int y) {
parametersPanel.clear();
for (MethodParameters parameters : parametersList) {
FlowPanel widget = panelsProvider.get();
String parametersLine = parameters.getParameters();
if (parametersLine.isEmpty()) {
parametersLine = "<no parameters>";
}
String result = parametersLine.replace("<", "<").replace(">", ">");
Element element = widget.getElement();
element.setInnerHTML(result);
element.getStyle().setColor("yellow");
parametersPanel.add(widget);
}
setPopupPosition(x, y);
show();
}
use of com.google.gwt.dom.client.Element in project actor-platform by actorapp.
the class JsFacade method handleLinkClick.
@UsedByApp
public void handleLinkClick(Event event) {
Element target = Element.as(event.getEventTarget());
String href = target.getAttribute("href");
if (href.startsWith("send:")) {
String msg = href.substring("send:".length());
msg = URL.decode(msg);
if (lastVisiblePeer != null) {
messenger.sendMessage(lastVisiblePeer, msg);
event.preventDefault();
}
} else {
if (JsElectronApp.isElectron()) {
JsElectronApp.openUrlExternal(href);
event.preventDefault();
}
}
}
Aggregations