@Override public void onBeforeAttach(HTMLElement element) { element.setAttribute(DATA_POSITION, "20"); element.setAttribute("data-notify-position", selector); onBeforePosition(element); }
@Override public void onBeforeAttach(HTMLElement element) { element.setAttribute(DATA_POSITION, "20"); element.setAttribute("data-notify-position", selector); onBeforePosition(element); }
/** Sets the specified attribute of the element. */ public B attr(String name, String value) { get().setAttribute(name, value); return that(); }
@Editor.Ignore public T setAttribute(String name, double value) { asElement().setAttribute(name, value); return element; }
@Editor.Ignore public T setAttribute(String name, String value) { asElement().setAttribute(name, value); return element; }
@Editor.Ignore public T setAttribute(String name, double value) { asElement().setAttribute(name, value); return element; }
@Editor.Ignore public T setAttribute(String name, boolean value) { asElement().setAttribute(name, value); return element; }
@Editor.Ignore public T setAttribute(String name, String value) { asElement().setAttribute(name, value); return element; }
@Editor.Ignore public T setAttribute(String name, boolean value) { asElement().setAttribute(name, value); return element; }
void setupRowMetadata(final DataType dataType) { getElement().setAttribute(UUID_ATTR, dataType.getUUID()); getElement().setAttribute(PARENT_UUID_ATTR, dataType.getParentUUID()); setupRowCSSClass(dataType); }
private static ElementObserver createObserver(HTMLElement element, ObserverCallback callback, String idAttributeName) { String elementId = element.getAttribute(idAttributeName); if (elementId == null) { element.setAttribute(idAttributeName, Elements.createDocumentUniqueId()); } return new ElementObserver() { @Override public String attachId() { return element.getAttribute(idAttributeName); } @Override public HTMLElement observedElement() { return element; } @Override public ObserverCallback callback() { return callback; } }; }
private static ElementObserver createObserver(HTMLElement element, ObserverCallback callback, String idAttributeName) { String elementId = element.getAttribute(idAttributeName); if (elementId == null) { element.setAttribute(idAttributeName, Elements.createDocumentUniqueId()); } return new ElementObserver() { @Override public String attachId() { return element.getAttribute(idAttributeName); } @Override public HTMLElement observedElement() { return element; } @Override public ObserverCallback callback() { return callback; } }; }
private static ElementObserver createObserver(HTMLElement element, ObserverCallback callback, String idAttributeName) { String elementId = element.getAttribute(idAttributeName); if (elementId == null) { element.setAttribute(idAttributeName, Elements.createDocumentUniqueId()); } return new ElementObserver() { @Override public String attachId() { return element.getAttribute(idAttributeName); } @Override public HTMLElement observedElement() { return element; } @Override public ObserverCallback callback() { return callback; } }; }
@PostConstruct public void setup() { constraintsTooltip.setAttribute("title", translationService.format(DataTypeConstraintView_ConstraintsTooltip)); setupTooltip(properties().getJavaScriptObject()); }
@Override public void onNewElement(HTMLElement element) { List<Element> elements = getElements(); elements.forEach(e -> { HTMLElement htmlElement = (HTMLElement) Js.cast(e); int position = getDataPosition(htmlElement); if (htmlElement != element) { int newPosition = position + (element.offsetHeight + getOffsetPosition(element)); htmlElement.setAttribute(DATA_POSITION, newPosition); htmlElement.style.setProperty(positionProprety, newPosition + "px"); } }); }
@Override public void onNewElement(HTMLElement element) { List<Element> elements = getElements(); elements.forEach(e -> { HTMLElement htmlElement = (HTMLElement) Js.cast(e); int position = getDataPosition(htmlElement); if (htmlElement != element) { int newPosition = position + (element.offsetHeight + getOffsetPosition(element)); htmlElement.setAttribute(DATA_POSITION, newPosition); htmlElement.style.setProperty(positionProprety, newPosition + "px"); } }); }
public Templated_Content() { this.templated_content_root_element = (elemental2.dom.HTMLElement)DomGlobal.document.createElement("section"); this.templated_content_root_element.setAttribute("class", "content"); this.templated_content_root_element.innerHTML = "<div data-element=\"contentContainer\" class=\"content-panel\"> </div>"; if (this.contentContainer == null) { this.contentContainer = TemplateUtil.<elemental2.dom.HTMLDivElement>resolveElementAs(templated_content_root_element, "contentContainer"); } else { TemplateUtil.replaceElement(templated_content_root_element, "contentContainer", contentContainer); } init(); }
public Templated_Content() { this.templated_content_root_element = (elemental2.dom.HTMLElement)DomGlobal.document.createElement("section"); this.templated_content_root_element.setAttribute("class", "content"); this.templated_content_root_element.innerHTML = "<div data-element=\"contentContainer\" class=\"content-panel\"> </div>"; if (this.contentContainer == null) { this.contentContainer = TemplateUtil.<elemental2.dom.HTMLDivElement>resolveElementAs(templated_content_root_element, "contentContainer"); } else { TemplateUtil.replaceElement(templated_content_root_element, "contentContainer", contentContainer); } init(); }
private void fillWeekHeader() { String[] days = dateTimeFormatInfo.weekdaysShort(); String[] daysFull = dateTimeFormatInfo.weekdaysFull(); int startIndex = dateTimeFormatInfo.firstDayOfTheWeek(); for (int y = 0; y < 7; y++) { monthData[0][y].setText(days[startIndex]); monthData[0][y].getElement().setAttribute("title", TextUtil.firstLetterToUpper(daysFull[startIndex])); startIndex++; if (startIndex >= 7) startIndex = 0; } }
private void fillWeekHeader() { String[] days = dateTimeFormatInfo.weekdaysShort(); String[] daysFull = dateTimeFormatInfo.weekdaysFull(); int startIndex = dateTimeFormatInfo.firstDayOfTheWeek(); for (int y = 0; y < 7; y++) { monthData[0][y].setText(days[startIndex]); monthData[0][y].getElement().setAttribute("title", TextUtil.firstLetterToUpper(daysFull[startIndex])); startIndex++; if (startIndex >= 7) startIndex = 0; } }