use of com.google.gwt.dom.client.Element in project zxing by zxing.
the class CalendarEventGenerator method getWidget.
@Override
public Grid getWidget() {
if (table != null) {
return table;
}
datePicker1.setValue(new Date());
datePicker2.setValue(new Date());
table = new Grid(10, 2);
table.setText(0, 0, "All day event");
table.setWidget(0, 1, fullDay);
table.setText(1, 0, "Event title");
table.setWidget(1, 1, eventName);
table.setText(2, 0, "Start date");
table.setWidget(2, 1, datePicker1);
table.setText(3, 0, "Time");
table.setWidget(3, 1, timePicker1);
table.setText(4, 0, "End date");
table.setWidget(4, 1, datePicker2);
table.setText(5, 0, "Time");
table.setWidget(5, 1, timePicker2);
table.setText(6, 0, "Time zone");
table.setWidget(6, 1, timeZones);
table.setText(7, 0, "Daylight savings");
table.setWidget(7, 1, summerTime);
table.setText(8, 0, "Location");
table.setWidget(8, 1, location);
table.setText(9, 0, "Description");
table.setWidget(9, 1, description);
table.getRowFormatter().getElement(3).setId(FULL_DAY_ONLY_IDS[0]);
table.getRowFormatter().getElement(5).setId(FULL_DAY_ONLY_IDS[1]);
table.getRowFormatter().getElement(6).setId(FULL_DAY_ONLY_IDS[2]);
table.getRowFormatter().getElement(7).setId(FULL_DAY_ONLY_IDS[3]);
fullDay.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
CheckBox cb = (CheckBox) event.getSource();
for (String s : FULL_DAY_ONLY_IDS) {
Element element = DOM.getElementById(s);
String style = cb.getValue() ? "none" : "";
element.getStyle().setProperty("display", style);
}
}
});
return table;
}
use of com.google.gwt.dom.client.Element in project zxing by zxing.
the class Generator method showErrorMessage.
private static void showErrorMessage(String error) {
Element errorElement = DOM.getElementById("errorMessageID");
errorElement.setInnerHTML(error);
}
use of com.google.gwt.dom.client.Element in project zxing by zxing.
the class Generator method eraseErrorMessage.
private static void eraseErrorMessage() {
Element errorElement = DOM.getElementById("errorMessageID");
errorElement.setInnerHTML(" ");
}
use of com.google.gwt.dom.client.Element in project opennms by OpenNMS.
the class VTopologyComponent method vertexDragStartHandler.
private Handler<GWTVertex> vertexDragStartHandler() {
return new Handler<GWTVertex>() {
@Override
public void call(GWTVertex vertex, int index) {
NativeEvent event = D3.getEvent();
Element draggableElement = Element.as(event.getEventTarget()).getParentElement();
D3 selection = null;
boolean isSelected = draggableElement.getAttribute("class").equals("vertex selected");
if (isSelected) {
selection = D3.d3().selectAll(GWTVertex.SELECTED_VERTEX_CLASS_NAME);
} else {
selection = D3.d3().select(Element.as(event.getEventTarget()).getParentElement());
}
m_dragObject = new DragObject(VTopologyComponent.this.m_topologyView, draggableElement, m_topologyView.getSVGViewPort(), selection);
D3.getEvent().preventDefault();
D3.getEvent().stopPropagation();
}
};
}
use of com.google.gwt.dom.client.Element in project gerrit by GerritCodeReview.
the class CommitBox method setParents.
private void setParents(JsArray<CommitInfo> commits) {
setVisible(firstParent, true);
TableRowElement next = firstParent;
TableRowElement previous = null;
for (CommitInfo c : Natives.asList(commits)) {
if (next == firstParent) {
CopyableLabel copyLabel = getCommitLabel(c);
parentCommits.add(copyLabel);
setWebLinks(parentWebLinks, c);
} else {
next.appendChild(DOM.createTD());
Element td1 = DOM.createTD();
td1.appendChild(getCommitLabel(c).getElement());
next.appendChild(td1);
FlowPanel linksPanel = new FlowPanel();
linksPanel.addStyleName(style.parentWebLink());
setWebLinks(linksPanel, c);
Element td2 = DOM.createTD();
td2.appendChild(linksPanel.getElement());
next.appendChild(td2);
previous.getParentElement().insertAfter(next, previous);
}
previous = next;
next = DOM.createTR().cast();
}
}
Aggregations