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

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

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

Button.setSizeUndefined介绍

暂无

代码示例

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

private Button createRemoveButton() {
  final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_REMOVE_ID, "", "",
      "", true, FontAwesome.MINUS, SPUIButtonStyleNoBorderWithIcon.class);
  button.setSizeUndefined();
  button.addStyleName("default-color");
  button.setEnabled(true);
  button.setVisible(true);
  button.addClickListener(event -> onRemove());
  return button;
}

代码示例来源:origin: sockeqwe/Vaadin-MVP-Lite

@Override
public Component createElement(final NavigationController controller, final NavigateableView view, int currentIndex, int totalCount) {
  final Button btn = new Button();
  btn.setStyleName(BaseTheme.BUTTON_LINK);
  btn.setSizeUndefined();
  btn.addStyleName(BREADCRUMB_ELEMENT);
  updateButtonTexts(btn, view);
  
  btn.addListener(new Button.ClickListener() {
    private static final long serialVersionUID = -9116612359809246223L;
    @Override
    public void buttonClick(ClickEvent event) {
      controller.getEventBus().fireEvent(view.getEventToShowThisView());
    }
  });
  return btn;
}

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

private Button createRemoveButton() {
  final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_REMOVE_ID, "", "",
      "", true, FontAwesome.MINUS, SPUIButtonStyleNoBorderWithIcon.class);
  button.setSizeUndefined();
  button.addStyleName("default-color");
  button.setEnabled(true);
  button.setVisible(true);
  button.addClickListener(event -> onRemove());
  return button;
}

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

private Button createAddButton() {
  final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_ADD_ID,
      i18n.getMessage("button.rollout.add.group"), "", "", true, FontAwesome.PLUS,
      SPUIButtonStyleNoBorderWithIcon.class);
  button.setSizeUndefined();
  button.addStyleName("default-color");
  button.setEnabled(true);
  button.setVisible(true);
  button.addClickListener(event -> addGroupRowAndValidate());
  return button;
}

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

private Button createAddButton() {
  final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_ADD_ID,
      i18n.getMessage("button.rollout.add.group"), "", "", true, FontAwesome.PLUS,
      SPUIButtonStyleNoBorderWithIcon.class);
  button.setSizeUndefined();
  button.addStyleName("default-color");
  button.setEnabled(true);
  button.setVisible(true);
  button.addClickListener(event -> addGroupRowAndValidate());
  return button;
}

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

private void createCancelButton() {
  cancelButton = SPUIComponentProvider.getButton(UIComponentIdProvider.CANCEL_BUTTON,
      i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), "", "", true, FontAwesome.TIMES,
      SPUIButtonStyleNoBorderWithIcon.class);
  cancelButton.setSizeUndefined();
  cancelButton.addStyleName("default-color");
  addCloseListenerForCancelButton();
  if (cancelButtonClickListener != null) {
    cancelButton.addClickListener(cancelButtonClickListener);
  }
  buttonsLayout.addComponent(cancelButton);
  buttonsLayout.setComponentAlignment(cancelButton, Alignment.MIDDLE_LEFT);
  buttonsLayout.setExpandRatio(cancelButton, 1.0F);
}

代码示例来源:origin: sockeqwe/Vaadin-MVP-Lite

public Component createElement(final NavigationController controller,
    final NavigateableView view, int index, int count) {
  Button b = new Button(view.getBreadcrumbTitle());
  b.setStyleName(BaseTheme.BUTTON_LINK);
  b.addStyleName(elementStyleName);
  b.addStyleName(elementZIndexHelper+(20-index));
  b.setSizeUndefined();
  
  b.addListener(new ClickListener() {
    private static final long serialVersionUID = 5571355154543327126L;
    public void buttonClick(ClickEvent event) {
      controller.getEventBus().fireEvent(view.getEventToShowThisView());
    }
  });
  
  if (index == 0)
    b.addStyleName(firstElementStyleName);
  
  return b;
}

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

private void createCancelButton() {
  cancelButton = SPUIComponentProvider.getButton(UIComponentIdProvider.CANCEL_BUTTON,
      i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), "", "", true, FontAwesome.TIMES,
      SPUIButtonStyleNoBorderWithIcon.class);
  cancelButton.setSizeUndefined();
  cancelButton.addStyleName("default-color");
  addCloseListenerForCancelButton();
  if (cancelButtonClickListener != null) {
    cancelButton.addClickListener(cancelButtonClickListener);
  }
  buttonsLayout.addComponent(cancelButton);
  buttonsLayout.setComponentAlignment(cancelButton, Alignment.MIDDLE_LEFT);
  buttonsLayout.setExpandRatio(cancelButton, 1.0F);
}

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

private void createSaveButton() {
  saveButton = SPUIComponentProvider.getButton(UIComponentIdProvider.SAVE_BUTTON,
      i18n.getMessage(UIMessageIdProvider.BUTTON_SAVE), "", "", true, FontAwesome.SAVE,
      SPUIButtonStyleNoBorderWithIcon.class);
  saveButton.setSizeUndefined();
  saveButton.addStyleName("default-color");
  addCloseListenerForSaveButton();
  saveButton.setEnabled(false);
  saveButton.setClickShortcut(KeyCode.ENTER);
  buttonsLayout.addComponent(saveButton);
  buttonsLayout.setComponentAlignment(saveButton, Alignment.MIDDLE_RIGHT);
  buttonsLayout.setExpandRatio(saveButton, 1.0F);
}

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

private void createSaveButton() {
  saveButton = SPUIComponentProvider.getButton(UIComponentIdProvider.SAVE_BUTTON,
      i18n.getMessage(UIMessageIdProvider.BUTTON_SAVE), "", "", true, FontAwesome.SAVE,
      SPUIButtonStyleNoBorderWithIcon.class);
  saveButton.setSizeUndefined();
  saveButton.addStyleName("default-color");
  addCloseListenerForSaveButton();
  saveButton.setEnabled(false);
  saveButton.setClickShortcut(KeyCode.ENTER);
  buttonsLayout.addComponent(saveButton);
  buttonsLayout.setComponentAlignment(saveButton, Alignment.MIDDLE_RIGHT);
  buttonsLayout.setExpandRatio(saveButton, 1.0F);
}

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

button.setCaption(StringUtils.trimToEmpty(window.getCaption()));
button.addClickListener(this::navigationButtonClicked);
button.setSizeUndefined();
button.setStyleName(ValoTheme.BUTTON_LINK);
button.setTabIndex(-1);

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

i18n.getMessage(UIMessageIdProvider.BUTTON_OK), "", "", true, FontAwesome.SAVE,
    SPUIButtonStyleNoBorderWithIcon.class);
okButton.setSizeUndefined();
okButton.addStyleName("default-color");
okButton.addClickListener(this);
    i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), "", "", true, FontAwesome.TIMES,
    SPUIButtonStyleNoBorderWithIcon.class);
cancelButton.setSizeUndefined();
cancelButton.addStyleName("default-color");
cancelButton.addClickListener(this);

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

i18n.getMessage(UIMessageIdProvider.BUTTON_OK), "", "", true, FontAwesome.SAVE,
    SPUIButtonStyleNoBorderWithIcon.class);
okButton.setSizeUndefined();
okButton.addStyleName("default-color");
okButton.addClickListener(this);
    i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), "", "", true, FontAwesome.TIMES,
    SPUIButtonStyleNoBorderWithIcon.class);
cancelButton.setSizeUndefined();
cancelButton.addStyleName("default-color");
cancelButton.addClickListener(this);

相关文章