org.jboss.errai.common.client.dom.Span.getClassList()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.jboss.errai.common.client.dom.Span.getClassList()方法的一些代码示例,展示了Span.getClassList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Span.getClassList()方法的具体详情如下:
包路径:org.jboss.errai.common.client.dom.Span
类名称:Span
方法名:getClassList

Span.getClassList介绍

暂无

代码示例

代码示例来源:origin: kiegroup/appformer

@Override
public void setIconClass(final String iconClass) {
  if (iconClass != null && !iconClass.isEmpty()) {
    Stream.of(iconClass.split(" ")).forEach(clazz -> icon.getClassList().add(clazz));
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Override
public void setIconClass(final String iconClass) {
  if (iconClass != null && !iconClass.isEmpty()) {
    Stream.of(iconClass.split(" ")).forEach(clazz -> icon.getClassList().add(clazz));
  }
}

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui

public void setIcon(final String iconClass){
  icon.getClassList().add(iconClass);
}

代码示例来源:origin: org.kie.workbench/kie-wb-common-dmn-client

@Override
public void setEnabled(final boolean enabled) {
  final DOMTokenList classList = text.getClassList();
  if (enabled) {
    classList.remove(TEXT_MUTED);
  } else {
    classList.add(TEXT_MUTED);
  }
}

代码示例来源:origin: org.guvnor/guvnor-ala-ui-client

private void openCloseExpand() {
    chevron.getClassList().toggle("fa-chevron-down");
    if (!chevron.getClassList().contains("fa-chevron-down")) {
      expansionArea.getStyle().setProperty("display",
                         "none");
      chevron.getClassList().add("fa-chevron-right");
    } else {
      chevron.getClassList().remove("fa-chevron-right");
      expansionArea.getStyle().removeProperty("display");
    }
  }
}

代码示例来源:origin: org.kie.workbench/kie-wb-common-ala-ui-client

@Override
public void setStatus(final Collection<String> styles) {
  this.status.removeAttribute("class");
  for (String style : styles) {
    this.status.getClassList().add(style);
  }
}

代码示例来源:origin: org.kie.workbench/kie-wb-common-ala-ui-client

private void openCloseExpand() {
    chevron.getClassList().toggle("fa-chevron-down");
    if (!chevron.getClassList().contains("fa-chevron-down")) {
      expansionArea.getStyle().setProperty("display",
                         "none");
      chevron.getClassList().add("fa-chevron-right");
    } else {
      chevron.getClassList().remove("fa-chevron-right");
      expansionArea.getStyle().removeProperty("display");
    }
  }
}

代码示例来源:origin: org.guvnor/guvnor-ala-ui-client

@Override
public void setStatus(final Collection<String> styles) {
  this.status.removeAttribute("class");
  for (String style : styles) {
    this.status.getClassList().add(style);
  }
}

代码示例来源:origin: org.jbpm/jbpm-wb-integration-client

@Override
public void setValue(final ServiceTaskSummary model) {
  this.id = model.getId();
  this.enabled.setValue(model.getEnabled(), false);
  this.serviceTasks.setModel(model);
  String[] classes = model.getIcon().split(" ");
  for (String css : classes) {
    this.icon.getClassList().add(css);
  }
  this.installedOn.setTextContent(String.valueOf(model.getInstalledOn().size()));
}

代码示例来源:origin: kiegroup/jbpm-wb

@Override
public void setValue(final ServiceTaskSummary model) {
  this.id = model.getId();
  this.enabled.setValue(model.getEnabled(), false);
  this.serviceTasks.setModel(model);
  String[] classes = model.getIcon().split(" ");
  for (String css : classes) {
    this.icon.getClassList().add(css);
  }
  this.installedOn.setTextContent(String.valueOf(model.getInstalledOn().size()));
}

代码示例来源:origin: kiegroup/appformer

@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());
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@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());
}

相关文章