@Override public void select() { item.getClassList().add("active"); } }
@Override public void select() { item.getClassList().add("active"); } }
@Override public void pullRight() { container.getClassList().add("right"); } }
@Override public void setIconClass(final String iconClass) { if (iconClass != null && !iconClass.isEmpty()) { Stream.of(iconClass.split(" ")).forEach(clazz -> icon.getClassList().add(clazz)); } }
@Override public void setIconClass(final String iconClass) { if (iconClass != null && !iconClass.isEmpty()) { Stream.of(iconClass.split(" ")).forEach(clazz -> icon.getClassList().add(clazz)); } }
@Override public void select() { item.getClassList().add("active"); } }
@Override public void setEnabled(final boolean enabled) { final DOMTokenList classList = text.getClassList(); if (enabled) { classList.remove(TEXT_MUTED); } else { classList.add(TEXT_MUTED); } }
@Override public void setSelected(final boolean selected) { if (selected) { card.getClassList().add("active"); } else { card.getClassList().remove("active"); } } }
@Override public void setEnabled(final boolean enabled) { this.enabled = enabled; if (enabled) { actionItem.getClassList().remove("disabled"); } else { actionItem.getClassList().add("disabled"); } }
@JsOverlay public final void setActive(boolean active) { if (active) { getClassList().add("active"); } else { getClassList().remove("active"); } } }
@JsOverlay public final void setActive(boolean active) { if (active) { getClassList().add("active"); } else { getClassList().remove("active"); } } }
@Test public void testType() { final DOMTokenList alertDomTokenList = mock(DOMTokenList.class); when(alert.getClassList()).thenReturn(alertDomTokenList); final DOMTokenList iconDomTokenList = mock(DOMTokenList.class); when(icon.getClassList()).thenReturn(iconDomTokenList); notification.setType(InlineNotification.InlineNotificationType.SUCCESS); verify(alertDomTokenList).add(InlineNotification.InlineNotificationType.SUCCESS.getCssClass()); verify(iconDomTokenList).add(InlineNotification.InlineNotificationType.SUCCESS.getIcon()); }
@Test public void testType() { final DOMTokenList alertDomTokenList = mock(DOMTokenList.class); when(alert.getClassList()).thenReturn(alertDomTokenList); final DOMTokenList iconDomTokenList = mock(DOMTokenList.class); when(icon.getClassList()).thenReturn(iconDomTokenList); notification.setType(InlineNotification.InlineNotificationType.SUCCESS); verify(alertDomTokenList).add(InlineNotification.InlineNotificationType.SUCCESS.getCssClass()); verify(iconDomTokenList).add(InlineNotification.InlineNotificationType.SUCCESS.getIcon()); }
@Test public void testSetValidationState() { formGroup.setValidationState(ValidationState.SUCCESS); verify(domTokenList).add(ValidationState.SUCCESS.getCssName()); } }
@Test public void testSetValidationState() { formGroup.setValidationState(ValidationState.SUCCESS); verify(domTokenList).add(ValidationState.SUCCESS.getCssName()); } }
@EventHandler("projects-tab") public void showProjects(final ClickEvent event) { projectsTabContainer.getClassList().add("active"); contributorsTabContainer.getClassList().remove("active"); metricsTabContainer.getClassList().remove("active"); presenter.showProjects(); }
@Override public void setContextMenuActive(final boolean active) { if (active) { if (!contextMenuItemsContainer.getClassList().contains("active")) { contextMenuItemsContainer.getClassList().add("active"); } } else { if (contextMenuItemsContainer.getClassList().contains("active")) { contextMenuItemsContainer.getClassList().remove("active"); } } } }
protected void initDateTimePicker() { this.dateRangePicker = dateRangePickerProvider.get(); dateRangePicker.getElement().setReadOnly(true); dateRangePicker.getElement().setAttribute("placeholder", Constants.INSTANCE.Due_On()); dateRangePicker.getElement().getClassList().add("form-control"); setupDateTimePicker(); dateRangePickerInput.add(ElementWrapperWidget.getWidget(dateRangePicker.getElement())); }
protected void initDateTimePicker() { this.dateRangePicker = dateRangePickerProvider.get(); dateRangePicker.getElement().setReadOnly(true); dateRangePicker.getElement().setAttribute("placeholder", Constants.INSTANCE.Due_On()); dateRangePicker.getElement().getClassList().add("form-control"); setupDateTimePicker(); dateRangePickerInput.add(ElementWrapperWidget.getWidget(dateRangePicker.getElement())); }