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

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

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

Button.setImmediate介绍

暂无

代码示例

代码示例来源:origin: org.aperteworkflow/gui-commons

public static Button smallButton(String caption) {
  Button button = new Button(caption);
  button.setImmediate(true);
  button.setStyleName("default small");
  return button;
}

代码示例来源:origin: org.aperteworkflow/gui-commons

public static Button button(String caption, String description, String style, Button.ClickListener listener) {
  Button button = new Button(caption);
  if (description != null) {
    button.setDescription(description);
  }
  if(style != null)
    button.setStyleName(style);
  if (listener != null) {
    button.addListener(listener);
  }
  button.setImmediate(true);
  button.setWidth(haxWidth(caption, (style != null ? style.contains("link") : false)));
  return button;
}

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

@Override
  public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {

    button.setImmediate(true);
    button.addStyleName("generatedColumnPadding button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " "
        + "button-tag-no-border");

    // Set Style
    if (null != style) {
      if (setStyle) {
        button.setStyleName(style);
      } else {
        button.addStyleName(style);
      }
    }
    // Set icon
    if (null != icon) {
      button.setIcon(icon);
    }
    return button;
  }
}

代码示例来源:origin: org.aperteworkflow/gui-commons

public static Button icon(String description, Resource icon, Button.ClickListener listener) {
  Button b = new Button();
  b.setStyleName("link");
  b.setIcon(icon);
  b.setImmediate(true);
  b.setDescription(description);
  if (listener != null) {
    b.addListener(listener);
  }
  return b;
}

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

@Override
  public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {

    button.setImmediate(true);
    button.addStyleName("generatedColumnPadding button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " "
        + "button-tag-no-border");

    // Set Style
    if (null != style) {
      if (setStyle) {
        button.setStyleName(style);
      } else {
        button.addStyleName(style);
      }
    }
    // Set icon
    if (null != icon) {
      button.setIcon(icon);
    }
    return button;
  }
}

代码示例来源:origin: apache/ace

private Button createRegisterTargetsButton() {
  final Button button = new Button("R");
  button.setDisableOnClick(true);
  button.setImmediate(true);
  button.setEnabled(false);
  button.addListener(new Button.ClickListener() {
    @Override
    public void buttonClick(ClickEvent event) {
      m_targetsPanel.registerSelectedTargets();
    }
  });
  m_targetsPanel.addListener(new ValueChangeListener() {
    @Override
    public void valueChange(ValueChangeEvent event) {
      TargetsPanel targetsPanel = (TargetsPanel) event.getProperty();
      Collection<?> itemIDs = (Collection<?>) targetsPanel.getValue();
      boolean enabled = false;
      for (Object itemID : itemIDs) {
        if (targetsPanel.isItemRegistrationNeeded(itemID)) {
          enabled = true;
          break;
        }
      }
      button.setEnabled(enabled);
    }
  });
  return button;
}

代码示例来源:origin: apache/ace

final Button button = new Button("A");
button.setDisableOnClick(true);
button.setImmediate(true);
button.setEnabled(false);
button.addListener(new Button.ClickListener() {

代码示例来源:origin: org.aperteworkflow/editor

private void refreshWindow(String buttonType, String buttonName) {
  mainWindow.removeAllComponents();
  VerticalLayout main = new VerticalLayout();
  main.setMargin(true);
  Label header = new Label();
  if (StringUtils.isEmpty(buttonName))
    header.setCaption("[No button name]");
  else
    header.setCaption("Button name: " + buttonName);
  main.addComponent(header);
  buttonList = prepareButtonList(buttonType);
  main.addComponent(buttonList);
  if (!StringUtils.isEmpty(buttonType)) {
    Class<? extends ProcessToolActionButton> buttonClass = getRegistry().getAvailableButtons().get(buttonType); 
    propertiesPanel.init(buttonClass);
    propertiesPanel.refreshForm(true, oldActionParameters);
    main.addComponent(propertiesPanel);
  }
  saveButton = new Button("save", this);
  saveButton.setImmediate(true);
  main.addComponent(saveButton);
  mainWindow.setContent(main);
}

代码示例来源:origin: org.aperteworkflow/cmis-widget

@Override
public Component render() {
  vl = new VerticalLayout();
  Button refreshDocumentList = new Button(getMessage("pt.ext.cmis.list.refresh"));
  refreshDocumentList.setIcon(new ClassResource(CmisDocumentListWidget.class, "/img/load-repository.png", getApplication()));
  refreshDocumentList.setImmediate(true);
  refreshDocumentList.setStyleName(BaseTheme.BUTTON_LINK);
  refreshDocumentList.addListener(new ClickListener() {
    @Override
    public void buttonClick(ClickEvent event) {
      reload();
    }
  });
  vl.addComponent(refreshDocumentList);
  reload();
  return vl;
}

代码示例来源:origin: uk.q3c.krail/krail

@Inject
protected DefaultUserStatusPanel(Navigator navigator, SubjectProvider subjectProvider, Translate translate, SubjectIdentifier subjectIdentifier,
                 SessionBusProvider eventBusProvider, CurrentLocale currentLocale) {
  super();
  this.navigator = navigator;
  this.subjectProvider = subjectProvider;
  this.translate = translate;
  this.subjectIdentifier = subjectIdentifier;
  this.eventBus = eventBusProvider.get();
  this.currentLocale = currentLocale;
  //        eventBus.subscribe(this);
  setSizeFull();
  addStyleName(ChameleonTheme.PANEL_BORDERLESS);
  usernameLabel = new Label();
  login_logout_Button = new Button();
  login_logout_Button.addClickListener(this);
  login_logout_Button.setImmediate(true);
  HorizontalLayout hl = new HorizontalLayout();
  hl.setSpacing(true);
  hl.addComponent(usernameLabel);
  hl.addComponent(login_logout_Button);
  this.setContent(hl);
  setIds();
  build();
}

代码示例来源:origin: nz.co.senanque/madura-vaadin

ret.setImmediate(m_forceImmediate);
ret.setLocale(LocaleContextHolder.getLocale());
MessageSourceAccessor messageSourceAccessor = new MessageSourceAccessor(messageSource);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

saveButton.setImmediate(true);
saveButton.setDescription("Save the comment");
cancelButton.setImmediate(true);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

saveButton.setImmediate(true);
saveButton.setDescription("Save the comment");
cancelButton.setImmediate(true);

代码示例来源:origin: nz.co.senanque/madura-vaadin-touchkit

ret.setEnabled(property.isEnabled());
ret.setVisible(property.isVisible());
ret.setImmediate(m_forceImmediate);
ret.setLocale(LocaleContextHolder.getLocale());
MessageSourceAccessor messageSourceAccessor = new MessageSourceAccessor(messageSource);

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

private Button createPinBtn(final Object itemId) {
  final Item item = getContainerDataSource().getItem(itemId);
  final String name = (String) item.getItemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
  final String version = (String) item.getItemProperty(SPUILabelDefinitions.VAR_VERSION).getValue();
  final DistributionSetIdName distributionSetIdName = new DistributionSetIdName((Long) itemId, name, version);
  final Button pinBtn = new Button();
  pinBtn.setIcon(FontAwesome.THUMB_TACK);
  pinBtn.setHeightUndefined();
  pinBtn.addStyleName(getPinStyle());
  pinBtn.setData(distributionSetIdName);
  pinBtn.setId(getPinButtonId(name, version));
  pinBtn.setImmediate(true);
  pinBtn.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_DISTRIBUTION_SET_PIN));
  return pinBtn;
}

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

private Button createPinBtn(final Object itemId) {
  final Item item = getContainerDataSource().getItem(itemId);
  final String name = (String) item.getItemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
  final String version = (String) item.getItemProperty(SPUILabelDefinitions.VAR_VERSION).getValue();
  final DistributionSetIdName distributionSetIdName = new DistributionSetIdName((Long) itemId, name, version);
  final Button pinBtn = new Button();
  pinBtn.setIcon(FontAwesome.THUMB_TACK);
  pinBtn.setHeightUndefined();
  pinBtn.addStyleName(getPinStyle());
  pinBtn.setData(distributionSetIdName);
  pinBtn.setId(getPinButtonId(name, version));
  pinBtn.setImmediate(true);
  pinBtn.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_DISTRIBUTION_SET_PIN));
  return pinBtn;
}

代码示例来源:origin: org.opennms.features/vaadin-snmp-events-and-metrics

cancel.setImmediate(false);
cancel.addClickListener(this);
save = new Button("Save");
save.setImmediate(false);
save.addClickListener(this);

代码示例来源:origin: apache/ace

approveButton.setImmediate(true);
approveButton.setEnabled(getApproveButtonEnabledState(target));

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

public GatewaySecurityTokenAuthenticationConfigurationItem(
    final TenantConfigurationManagement tenantConfigurationManagement, final VaadinMessageSource i18n,
    final SecurityTokenGenerator securityTokenGenerator) {
  super(TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, tenantConfigurationManagement,
      i18n);
  this.securityTokenGenerator = securityTokenGenerator;
  super.init("label.configuration.auth.gatewaytoken");
  configurationEnabled = isConfigEnabled();
  detailLayout = new VerticalLayout();
  detailLayout.setImmediate(true);
  final Button gatewaytokenBtn = SPUIComponentProvider.getButton("TODO-ID", "Regenerate Key", "",
      ValoTheme.BUTTON_TINY + " " + "redicon", true, null, SPUIButtonStyleSmall.class);
  gatewaytokenBtn.setImmediate(true);
  gatewaytokenBtn.setIcon(FontAwesome.REFRESH);
  gatewaytokenBtn.addClickListener(event -> generateGatewayToken());
  gatewayTokenkeyLabel = new LabelBuilder().id("gatewaysecuritytokenkey").name("").buildLabel();
  gatewayTokenkeyLabel.addStyleName("gateway-token-label");
  gatewayTokenkeyLabel.setImmediate(true);
  final HorizontalLayout keyGenerationLayout = new HorizontalLayout();
  keyGenerationLayout.setSpacing(true);
  keyGenerationLayout.setImmediate(true);
  keyGenerationLayout.addComponent(gatewayTokenkeyLabel);
  keyGenerationLayout.addComponent(gatewaytokenBtn);
  detailLayout.addComponent(keyGenerationLayout);
  if (isConfigEnabled()) {
    gatewayTokenkeyLabel.setValue(getSecurityTokenKey());
    setDetailVisible(true);
  }
}

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

public GatewaySecurityTokenAuthenticationConfigurationItem(
    final TenantConfigurationManagement tenantConfigurationManagement, final VaadinMessageSource i18n,
    final SecurityTokenGenerator securityTokenGenerator) {
  super(TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, tenantConfigurationManagement,
      i18n);
  this.securityTokenGenerator = securityTokenGenerator;
  super.init("label.configuration.auth.gatewaytoken");
  configurationEnabled = isConfigEnabled();
  detailLayout = new VerticalLayout();
  detailLayout.setImmediate(true);
  final Button gatewaytokenBtn = SPUIComponentProvider.getButton("TODO-ID", "Regenerate Key", "",
      ValoTheme.BUTTON_TINY + " " + "redicon", true, null, SPUIButtonStyleSmall.class);
  gatewaytokenBtn.setImmediate(true);
  gatewaytokenBtn.setIcon(FontAwesome.REFRESH);
  gatewaytokenBtn.addClickListener(event -> generateGatewayToken());
  gatewayTokenkeyLabel = new LabelBuilder().id("gatewaysecuritytokenkey").name("").buildLabel();
  gatewayTokenkeyLabel.addStyleName("gateway-token-label");
  gatewayTokenkeyLabel.setImmediate(true);
  final HorizontalLayout keyGenerationLayout = new HorizontalLayout();
  keyGenerationLayout.setSpacing(true);
  keyGenerationLayout.setImmediate(true);
  keyGenerationLayout.addComponent(gatewayTokenkeyLabel);
  keyGenerationLayout.addComponent(gatewaytokenBtn);
  detailLayout.addComponent(keyGenerationLayout);
  if (isConfigEnabled()) {
    gatewayTokenkeyLabel.setValue(getSecurityTokenKey());
    setDetailVisible(true);
  }
}

相关文章