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

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

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

Button.click介绍

[英]Simulates a button click, notifying all server-side listeners.

No action is taken if the button is disabled.
[中]模拟按钮单击,通知所有服务器端侦听器。
如果按钮被禁用,则不采取任何操作。

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

@Override
  public void handleAction(Object sender, Object target) {
    button.click();
  }
}

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin

@Override
  public void handleAction(Object sender, Object target) {
    signin.click();
  }
};

代码示例来源:origin: stackoverflow.com

Button button = progressDialog.getButton(ProgressDialog.BUTTON1);
button.click();

代码示例来源:origin: stackoverflow.com

static boolean clickOnButton(String name, Solo solo){
  Button view = null;
  try{
      ArrayList<Button> temp = solo.getCurrentViews(Button.class);
      for (int i = 0; i < temp.size(); i++) {
        if (temp.get(i).getText().toString().equals(name)){
          view = temp.get(i);
          break;
        }
      }
      view.click();
      return true;
  } catch (Error err) {
      return false;
  } 
}

代码示例来源:origin: stackoverflow.com

public class ApplicationPage {

   // how driver object is put here is your own business.
   private static WebDriver driver;

   @FindBy(id = "id")
   private Button triggerButton;

   public ApplicationPage() {
      PageFactory.initElements(driver, this);
   }

   public static ApplicationPage open(){
      driver.get("http://page.net");
      return new ApplicationPage();
   }

   public void trigger() {
      triggerButton.click();  
   }
}

代码示例来源:origin: stackoverflow.com

WebForm form = curPage.getForms()[0];
form.getScriptableObject().setParameterValue("UID_PATIENTID", "1");
Button btn = form.getButtons()[1];
btn.click();
curPage = wc.getCurrentPage();

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin

@Override
public void handleAction(Object sender, Object target) {
  for (Component c : buttonBar) {
    if (
      c instanceof Button 
      && 
      ((Button)c).getData() != null 
      &&
      ((Action) ((Button)c).getData() ).isDefaultAction()
      ) {
        ((Button)c).click();
        return;
    }
  }
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void linkFieldResolvesSelfAppReference() throws Exception {
  // GIVEN
  definition.setAppName(SELF_APP_REFERENCE);
  AppContext appContext = mock(AppContext.class);
  doReturn("products").when(appContext).getName();
  uiContext = appContext;
  AppController appController = mock(AppController.class);
  linkFieldFactory = new LinkFieldFactory<>(definition, baseItem, uiContext, i18NAuthoringSupport, appController, null, null);
  linkFieldFactory.setComponentProvider(componentProvider);
  LinkField field = (LinkField) linkFieldFactory.createField();
  // WHEN
  field.getSelectButton().click();
  // THEN
  verify(appController).openChooseDialog(eq("products"), any(UiContext.class), anyString(), any(ChooseDialogCallback.class));
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void linkFieldResolvesContentTypeAppReference() throws Exception {
  // GIVEN
  definition.setAppName(CONTENT_TYPE_REFERENCE_PREFIX + "car");
  AppController appController = mock(AppController.class);
  AppDescriptorRegistry appRegistry = mock(AppDescriptorRegistry.class);
  DefinitionProvider appProvider = mock(DefinitionProvider.class);
  ContentTypeAppDescriptor appDescriptor = mock(ContentTypeAppDescriptor.class);
  doReturn("cars").when(appDescriptor).getName();
  doReturn("car").when(appDescriptor).getContentType();
  doReturn(true).when(appProvider).isValid();
  doReturn(appDescriptor).when(appProvider).get();
  doReturn(Arrays.asList(appProvider)).when(appRegistry).getAllProviders();
  linkFieldFactory = new LinkFieldFactory<>(definition, baseItem, uiContext, i18NAuthoringSupport, appController, null, appRegistry);
  linkFieldFactory.setComponentProvider(componentProvider);
  LinkField field = (LinkField) linkFieldFactory.createField();
  // WHEN
  field.getSelectButton().click();
  // THEN
  verify(appController).openChooseDialog(eq("cars"), any(UiContext.class), anyString(), any(ChooseDialogCallback.class));
}

代码示例来源:origin: jpos/jPOS-EE

@Override
public void showSpecificView (String parameter) {
  forcePasswordChange = parameter.contains("password_change");
  super.showSpecificView(parameter);
  if (forcePasswordChange && passwordBinder != null) {
    getEditBtn().click();
    passwordBinder.setReadOnly(false);
    binderIsReadOnly = false;
    changePassBtn.setEnabled(false);
    getCancelBtn().setEnabled(false);
    getApp().scrollIntoView(passwordPanel);
    newPasswordField.setReadOnly(false);
    currentPasswordField.setReadOnly(false);
    repeatPasswordField.setReadOnly(false);
  }
}

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

window.addCloseListener(e -> {
  if (!isImplicitClose) {
    cancelButton.click();

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

window.addCloseListener(e -> {
  if (!isImplicitClose) {
    cancelButton.click();

相关文章