@PostConstruct private void init( ) { itemStrongContent = document.createElement( "strong" ); }
@Override public void showProperty(String property) { HTMLElement strong = document.createElement("strong"); strong.setTextContent(property); HTMLElement li = document.createElement("li"); li.appendChild(strong); properties.appendChild(li); }
@Override public HTMLElement createRow(LayoutRow layoutRow) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName("row"); return div; }
@Override public HTMLElement createRow(LayoutRow layoutRow) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName("row"); return div; }
public void setMessage(final List<String> messages) { removeAllElementChildren(this.message); final HTMLElement ul = document.createElement("ul"); addCSSClass(ul, "list-unstyled"); for (String message : messages) { final HTMLElement li = document.createElement("li"); li.setTextContent(message); ul.appendChild(li); } this.message.appendChild(ul); }
public void addAction(final EventListener<MouseEvent> onclick, final String label) { final HTMLElement a = getDocument().createElement("a"); a.setTextContent(label); a.setOnclick(onclick); final HTMLElement li = getDocument().createElement("li"); li.appendChild(a); actionsItems.appendChild(li); } }
@Override public HTMLElement createColumn(LayoutColumn layoutColumn) { Div div = (Div) Window.getDocument().createElement("div"); String colSize = ColumnSizeBuilder.buildColumnSize(new Integer(layoutColumn.getSpan())); div.setClassName(colSize); return div; }
private Option newOption(final String text, final String value) { final Option option = (Option) Window.getDocument().createElement("option"); option.setTextContent(text); option.setValue(value); return option; }
@Override public void setPotentialOwnersInfo(final List<String> owners) { removeAllChildren(usersGroupsControlsPanel); owners.forEach(owner -> { HTMLElement li = getDocument().createElement("li"); li.setTextContent(owner); usersGroupsControlsPanel.appendChild(li); }); }
private void appendHorizontalRule() { final HTMLElement hr = getDocument().createElement("hr"); addCSSClass(hr, "kie-dock__divider"); filterList.appendChild(hr); }
@Test public void testMessages() { final HTMLElement htmlElement = mock(HTMLElement.class); when(htmlElement.getClassList()).thenReturn(mock(DOMTokenList.class)); when(document.createElement(anyString())).thenReturn(htmlElement); when(message.getChildNodes()).thenReturn(mock(NodeList.class)); notification.setMessage(Arrays.asList("message")); verify(message).appendChild(any(Node.class)); verify(document).createElement("li"); verify(document).createElement("ul"); } }
public void displayDisabledAction(final CaseRolesPresenter.CaseRoleAction action) { removeCSSClass(actions, "hidden"); final HTMLElement li = getDocument().createElement("li"); final HTMLElement a = getDocument().createElement("a"); a.setTextContent(action.label()); addCSSClass(li, "disabled"); li.appendChild(a); actionsItems.appendChild(li); }
@Override public void addModelField(String property, boolean selected) { Option option = (Option) document.createElement("option"); option.setText(property); option.setValue(property); option.setSelected(selected); bindings.add(option); }
public void displayDisabledAction(final CaseRolesPresenter.CaseRoleAction action) { removeCSSClass(actions, "hidden"); final HTMLElement li = getDocument().createElement("li"); final HTMLElement a = getDocument().createElement("a"); a.setTextContent(action.label()); addCSSClass(li, "disabled"); li.appendChild(a); actionsItems.appendChild(li); }
private Option createOption(final Pair<String, String> optionPair) { Option option = (Option) document.createElement("option"); option.setText(optionPair.getK1()); option.setValue(optionPair.getK2()); return option; }
public void addOption(final String text, final String value, final Boolean selected) { final Option option = (Option) document.createElement("option"); option.setText(text); option.setValue(value); option.setSelected(selected); select.add(option); }
private void appendSectionTitle(final String title) { final Heading heading = (Heading) getDocument().createElement("h5"); heading.setTextContent(title); addCSSClass(heading, "kie-dock__heading--section"); filterList.appendChild(heading); }
public void addAction(final CaseCommentsPresenter.CaseCommentAction action) { removeCSSClass(actionsButton, "disabled"); final HTMLElement a = getDocument().createElement("a"); a.setTextContent(action.label()); a.setOnclick(e -> action.execute()); final HTMLElement li = getDocument().createElement("li"); li.appendChild(a); actionsItems.appendChild(li); }
public void addAction(final CaseActionsPresenter.CaseActionAction action) { removeCSSClass(actions, "hidden"); final HTMLElement a = getDocument().createElement("a"); a.setTextContent(action.label()); a.setOnclick(e -> action.execute()); final HTMLElement li = getDocument().createElement("li"); li.appendChild(a); actionsItems.appendChild(li); }
private HTMLElement defaultOption() { final HTMLElement option = Window.getDocument().createElement("option"); option.setAttribute("value", ""); option.setAttribute("disabled", ""); option.setAttribute("selected", ""); option.setTextContent(translationService.getTranslation(SourceConfigurationPageView_SelectOption_placeholder)); return option; }