com.vaadin.ui.Button.removeStyleName()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(92)

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

Button.removeStyleName介绍

暂无

代码示例

代码示例来源:origin: eclipse/hawkbit

private void removeClickedStyle() {
  unknown.removeStyleName(BTN_CLICKED);
  registered.removeStyleName(BTN_CLICKED);
  inSync.removeStyleName(BTN_CLICKED);
  error.removeStyleName(BTN_CLICKED);
  pending.removeStyleName(BTN_CLICKED);
  overdue.removeStyleName(BTN_CLICKED);
}

代码示例来源:origin: OpenNMS/opennms

private void selectButton(Button button) {
  if (selectedButton != null) {
    selectedButton.removeStyleName("caption-bold");
  }
  selectedButton = button;
  if (selectedButton != null) {
    selectedButton.addStyleName("caption-bold");
  }
}

代码示例来源:origin: vaadin/material-theme-fw8

public void selectTab(Button button) {
    if (!buttons.contains(button)) return;

    for (Button b : buttons) {
      b.removeStyleName(SELECTED);
    }

    if (button.getStyleName().contains(SELECTED)) {
      button.removeStyleName(SELECTED);
    } else {
      button.addStyleName(SELECTED);
    }
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_selectBtn.addStyleName(Styles.SELECTED);
    m_panBtn.removeStyleName(Styles.SELECTED);
    controller.setActiveTool(ActiveTool.select);
  }
});

代码示例来源:origin: OpenNMS/opennms

private void setLayerLayoutVisible(boolean show) {
  if (show) {
    layerButton.addStyleName(Styles.EXPANDED);
    layerButton.addStyleName(Styles.SELECTED);
    addComponent(layerLayout);
  } else {
    layerButton.removeStyleName(Styles.EXPANDED);
    layerButton.removeStyleName(Styles.SELECTED);
    removeComponent(layerLayout);
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
public void selectionChanged(SelectionContext selectionContext) {
  // After selection always set the pantool back to active tool
  if(m_panBtn != null && !m_panBtn.getStyleName().contains(Styles.SELECTED)) {
    m_panBtn.addStyleName(Styles.SELECTED);
  }
  if(m_selectBtn != null && m_selectBtn.getStyleName().contains(Styles.SELECTED)) {
    m_selectBtn.removeStyleName(Styles.SELECTED);
  }
}

代码示例来源:origin: eclipse/hawkbit

protected void clearTargetTagFilters() {
    for (final Button button : alreadyClickedButtons) {
      button.removeStyleName(SPUIStyleDefinitions.SP_FILTER_BTN_CLICKED_STYLE);
    }
    alreadyClickedButtons.clear();
    managementUIState.getTargetTableFilters().getClickedTargetTags().clear();
    eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG);
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_panBtn.addStyleName(Styles.SELECTED);
    m_selectBtn.removeStyleName(Styles.SELECTED);
    controller.setActiveTool(ActiveTool.pan);
  }
});

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

protected void clearTargetTagFilters() {
    for (final Button button : alreadyClickedButtons) {
      button.removeStyleName(SPUIStyleDefinitions.SP_FILTER_BTN_CLICKED_STYLE);
    }
    alreadyClickedButtons.clear();
    managementUIState.getTargetTableFilters().getClickedTargetTags().clear();
    eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG);
  }
}

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_panBtn.addStyleName(Styles.SELECTED);
    m_selectBtn.removeStyleName(Styles.SELECTED);
    controller.setActiveTool(ActiveTool.pan);
  }
});

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app

@Override
public void selectionChanged(SelectionContext selectionContext) {
  // After selection always set the pantool back to active tool
  if(m_panBtn != null && !m_panBtn.getStyleName().contains(Styles.SELECTED)) {
    m_panBtn.addStyleName(Styles.SELECTED);
  }
  if(m_selectBtn != null && m_selectBtn.getStyleName().contains(Styles.SELECTED)) {
    m_selectBtn.removeStyleName(Styles.SELECTED);
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-web

public void setFileNameButtonCaption(String title) {
  this.fileName = title;
  if (StringUtils.isNotEmpty(title)) {
    fileNameButton.setCaption(title);
    fileNameButton.removeStyleName(EMPTY_VALUE_STYLENAME);
  } else {
    fileNameButton.setCaption(fileNotSelectedMessage);
    fileNameButton.addStyleName(EMPTY_VALUE_STYLENAME);
  }
}

代码示例来源:origin: org.opencms/opencms-core

public void buttonClick(ClickEvent event) {
  Button b = event.getButton();
  boolean pressed = b.getStyleName().contains(OpenCmsTheme.BUTTON_PRESSED);
  if (pressed) {
    b.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
  } else {
    b.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
  }
  m_codeMirror.setLineWrapping(!pressed);
}

代码示例来源:origin: org.opencms/opencms-core

public void buttonClick(ClickEvent event) {
  Button b = event.getButton();
  boolean pressed = b.getStyleName().contains(OpenCmsTheme.BUTTON_PRESSED);
  if (pressed) {
    b.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
  } else {
    b.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
  }
  m_codeMirror.setCloseBrackets(!pressed);
}

代码示例来源:origin: org.opencms/opencms-core

public void buttonClick(ClickEvent event) {
  Button b = event.getButton();
  boolean pressed = b.getStyleName().contains(OpenCmsTheme.BUTTON_PRESSED);
  if (pressed) {
    b.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
  } else {
    b.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
  }
  m_codeMirror.setHighlighting(!pressed);
}

代码示例来源:origin: org.opencms/opencms-core

public void buttonClick(ClickEvent event) {
  Button b = event.getButton();
  boolean pressed = b.getStyleName().contains(OpenCmsTheme.BUTTON_PRESSED);
  if (pressed) {
    b.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
  } else {
    b.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
  }
  m_codeMirror.setTabsVisible(!pressed);
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private void resetPinStyle(final Button pinBtn) {
  pinBtn.removeStyleName(TARGET_PINNED);
  pinBtn.addStyleName(SPUIStyleDefinitions.TARGET_STATUS_PIN_TOGGLE);
  final TargetIdName targetIdname = (TargetIdName) pinBtn.getData();
  HawkbitCommonUtil.applyStatusLblStyle(this, pinBtn, targetIdname.getTargetId());
}

代码示例来源:origin: eclipse/hawkbit

private void resetPinStyle(final Button pinBtn) {
  pinBtn.removeStyleName(TARGET_PINNED);
  pinBtn.addStyleName(SPUIStyleDefinitions.TARGET_STATUS_PIN_TOGGLE);
  final TargetIdName targetIdname = (TargetIdName) pinBtn.getData();
  HawkbitCommonUtil.applyStatusLblStyle(this, pinBtn, targetIdname.getTargetId());
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

protected void clearAppliedTargetFilterQuery() {
  if (getAlreadyClickedButton() != null) {
    getAlreadyClickedButton().removeStyleName(SPUIStyleDefinitions.SP_FILTER_BTN_CLICKED_STYLE);
    setAlreadyClickedButton(null);
  }
  this.managementUIState.getTargetTableFilters().setTargetFilterQuery(null);
  this.eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_TARGET_FILTER_QUERY);
}

代码示例来源:origin: eclipse/hawkbit

protected void clearAppliedTargetFilterQuery() {
  if (getAlreadyClickedButton() != null) {
    getAlreadyClickedButton().removeStyleName(SPUIStyleDefinitions.SP_FILTER_BTN_CLICKED_STYLE);
    setAlreadyClickedButton(null);
  }
  this.managementUIState.getTargetTableFilters().setTargetFilterQuery(null);
  this.eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_TARGET_FILTER_QUERY);
}

相关文章