public void setMin(int min) { this.min = min; this.progressBarElement.setAttribute(OutputProgressBar.ATT_ARIA_MIN, min + ""); }
public void setMin(int min) { this.min = min; this.progressBarElement.setAttribute(OutputProgressBar.ATT_ARIA_MIN, min + ""); }
public void setMax(int max) { this.max = max; this.progressBarElement.setAttribute(OutputProgressBar.ATT_ARIA_MAX, max + ""); }
public void setMax(int max) { this.max = max; this.progressBarElement.setAttribute(OutputProgressBar.ATT_ARIA_MAX, max + ""); }
@Override public void setFactNameAndType(String factName, String factType) { this.factName = factName; this.factType = factType; String innerHtml = new StringBuilder() .append(factName) .append(" [") .append(factType) .append("]") .toString(); fullClassName.setInnerHTML(innerHtml); fullClassName.setAttribute("factName", factName); fullClassName.setAttribute("factType", factType); fullClassName.setAttribute("parentPath", parentPath); listGroupItem.setAttribute("id", "listGroupItem-" + factName); }
@Override public void setFactName(String factName) { this.factName = factName; this.factType = factName; fullClassName.setInnerText(factName); listGroupItem.setAttribute("id", "listGroupItem-" + factName); }
// Make a new frame, and point it at Google. Frame frame = new Frame("http://www.google.com/"); DivElement div = Document.get().createDivElement(); div.setAttribute("align", "center"); div.appendChild(frame.getElement()); // Add it to the root panel. RootPanel.get().getElement().appendChild(div);
private void endConstruct() { this.getElement().appendChild(this.progressBarElement); this.progressBarElement.setAttribute("role", OutputProgressBar.ROLE_PROGRESSBAR); StyleUtils.addStyle(this.progressBarElement, OutputProgressBar.STYLE_PROGRESSBAR); }
private void endConstruct() { this.getElement().appendChild(this.progressBarElement); this.progressBarElement.setAttribute("role", OutputProgressBar.ROLE_PROGRESSBAR); StyleUtils.addStyle(this.progressBarElement, OutputProgressBar.STYLE_PROGRESSBAR); }
/** * * @param percentComplete a percentage between 0 and 100 */ public void setValue(int percentComplete) { assert percentComplete >= 0 && percentComplete <= 100; barElement.getStyle().setWidth(percentComplete, Style.Unit.PCT); barElement.setAttribute("aria-valuenow", Integer.toString(percentComplete)); screenReaderText.setInnerText(I18N.MESSAGES.percentComplete(percentComplete)); }
public VJITWrapper() { super(); // build the html id elementID = Document.get().createUniqueId(); // init container DivElement wrapper = doc.createDivElement(); DivElement container = wrapper.appendChild(doc.createDivElement()); setElement(wrapper); container.setAttribute("id", "container_" + elementID); wrapper.setAttribute("id", elementID); }
private Element createPresentableTextElement(NodePresentation presentation) { DivElement textElement = Document.get().createDivElement(); textElement.setInnerText(nullToEmpty(presentation.getPresentableText())); textElement.setAttribute("style", presentation.getPresentableTextCss()); // TODO support text colorization return textElement; }
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()); // TODO support text colorization return textElement; }
private void redrawMonthPicker() { this.monthPicker.getStyle().setWidth(this.calendarTable.getClientWidth(), Unit.PX); this.calendarTable.getStyle().setDisplay(Display.NONE); this.monthPicker.getStyle().clearDisplay(); int currentYear = this.cursor.getYear() + InputDatePicker.YEAR_OFFSET; if (this.monthPickerInner.getChildCount() == 0) { for (int year = currentYear - 100; year < currentYear + 100; year++) { DivElement yearDiv = Document.get().createDivElement(); yearDiv.setInnerText(String.valueOf(year)); StyleUtils.addStyle(yearDiv, InputDatePicker.STYLE_YEAR_BUTTON); Event.sinkEvents(yearDiv, Event.ONCLICK); this.monthPickerInner.appendChild(yearDiv); yearDiv.setAttribute(InputDatePicker.ATTRIBUTE_DATA_YEAR, String.valueOf(year)); } } this.openMonthOfYear(this.cursor.getYear() + InputDatePicker.YEAR_OFFSET); }
private void redrawMonthPicker() { this.monthPicker.getStyle().setWidth(this.calendarTable.getClientWidth(), Unit.PX); this.calendarTable.getStyle().setDisplay(Display.NONE); this.monthPicker.getStyle().clearDisplay(); int currentYear = this.cursor.getYear() + InputDatePicker.YEAR_OFFSET; if (this.monthPickerInner.getChildCount() == 0) { for (int year = currentYear - 100; year < currentYear + 100; year++) { DivElement yearDiv = Document.get().createDivElement(); yearDiv.setInnerText(String.valueOf(year)); StyleUtils.addStyle(yearDiv, InputDatePicker.STYLE_YEAR_BUTTON); Event.sinkEvents(yearDiv, Event.ONCLICK); this.monthPickerInner.appendChild(yearDiv); yearDiv.setAttribute(InputDatePicker.ATTRIBUTE_DATA_YEAR, String.valueOf(year)); } } this.openMonthOfYear(this.cursor.getYear() + InputDatePicker.YEAR_OFFSET); }
td.appendChild(div); div.setInnerText(String.valueOf(dateToDrow.getDate())); div.setAttribute(InputDatePicker.ATTRIBUTE_DATA_DATE, InputDatePicker.ATTRIBUTE_DATE_FORMAT.format(dateToDrow)); if (dateToDrow.getMonth() != selectedMonth) { StyleUtils.addStyle(td, InputDatePicker.STYLE_MUTED);
td.appendChild(div); div.setInnerText(String.valueOf(dateToDrow.getDate())); div.setAttribute(InputDatePicker.ATTRIBUTE_DATA_DATE, InputDatePicker.ATTRIBUTE_DATE_FORMAT.format(dateToDrow)); if (dateToDrow.getMonth() != selectedMonth) { StyleUtils.addStyle(td, InputDatePicker.STYLE_MUTED);
crumbsElement.setId("diagramBreadCrumbs"); crumbsElement.setClassName("diagramBreadCrumbs"); crumbsElement.setAttribute("onmousedown", "onmousedown"); crumbsElement.setAttribute("onselectstart", "onmousedown"); diagramElement.appendChild(crumbsElement);
this.progressBarElement.setAttribute(OutputProgressBar.ATT_ARIA_VALUE, value + ""); double percent = 100 * (val - this.min) / (this.max - this.min); this.progressBarElement.getStyle().setProperty("width", percent, Unit.PCT);
this.progressBarElement.setAttribute(OutputProgressBar.ATT_ARIA_VALUE, value + ""); double percent = 100 * (val - this.min) / (this.max - this.min); this.progressBarElement.getStyle().setProperty("width", percent, Unit.PCT);