com.google.gwt.user.client.ui.Button.setStyleName()方法的使用及代码示例

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

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

Button.setStyleName介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Creates a button with no caption.
 */
public Button() {
 super(Document.get().createPushButtonElement());
 setStyleName("gwt-Button");
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Creates a button with no caption.
 */
public Button() {
 super(Document.get().createPushButtonElement());
 setStyleName("gwt-Button");
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Creates a button with no caption.
 */
public Button() {
 super(Document.get().createPushButtonElement());
 setStyleName("gwt-Button");
}

代码示例来源:origin: bedatadriven/activityinfo

public Button addDeleteButton() { // used for collection subforms
  deleteButton = Optional.of(new Button());
  deleteButton.get().setHTML(ButtonWithIcon.TEMPLATES.withIcon(Icons.INSTANCE.remove()));
  deleteButton.get().setStyleName("btn btn-default btn-xs pull-right");
  this.panel.add(deleteButton.get());
  return deleteButton.get();
}

代码示例来源:origin: com.blackducksoftware.tools/common-framework

/**
 * Builds the login button.
 *
 * @return the button
 */
private Button buildLoginButton() {
  Button loginButton = new Button("Send");
  loginButton.setStyleName("gwt-Login-Button");
  loginButton.setText("Login");
  loginButton.setSize("166px", "44px");
  loginButton.addStyleName("sendButton");
  return loginButton;
}

代码示例来源:origin: org.eagle-i/eagle-i-search-gwt

private void initializeButtons() {
  sendButton = new Button();
  sendButton.setText("Send");
  sendButton.setStyleName( BUTTON_STYLE );
  sendButton.addClickHandler( new ClickHandler() {
  cancelButton.setStyleName( BUTTON_STYLE );
  cancelButton.addClickHandler( new ClickHandler() {

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

private void addCloseToTab(final TabPanelEntry tab) {
  final Button close = new Button("×");
  close.setStyleName("close");
  close.addStyleName(WorkbenchResources.INSTANCE.CSS().tabCloseButton());
  close.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(final ClickEvent event) {
      final WorkbenchPartPresenter.View partToDeselect = tabInvertedIndex.get(tab);
      panelManager.closePlace(partToDeselect.getPresenter().getDefinition().getPlace());
    }
  });
  tab.getTabWidget().addToAnchor(close);
}

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

private void addCloseToTab(final TabPanelEntry tab) {
  final Button close = new Button("×");
  close.setStyleName("close");
  close.addStyleName(WorkbenchResources.INSTANCE.CSS().tabCloseButton());
  close.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(final ClickEvent event) {
      final WorkbenchPartPresenter.View partToDeselect = tabInvertedIndex.get(tab);
      panelManager.closePlace(partToDeselect.getPresenter().getDefinition().getPlace());
    }
  });
  tab.getTabWidget().addToAnchor(close);
}

代码示例来源:origin: bedatadriven/activityinfo

private Button createClearButton() {
  final Button clearButton = new Button();
  clearButton.setHTML(ButtonWithIcon.TEMPLATES.withIcon(Icons.INSTANCE.remove()));
  clearButton.setStyleName("btn btn-default btn-xs pull-right");
  clearButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      for (int i = 0; i < boxPanel.getWidgetCount(); i++) {
        Widget widget = boxPanel.getWidget(i);
        if (widget instanceof CheckBox) {
          CheckBox checkBox = (CheckBox) widget;
          if (checkBox.getValue() != null && checkBox.getValue()) {
            checkBox.setValue(false, true);
          }
        }
      }
    }
  });
  clearButton.setVisible(false);
  return clearButton;
}

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

private void applystyles(final Button button, final boolean buttonEnable) {
  button.setStyleName(VButton.CLASSNAME);
  button.addStyleName(getStyle("tiny"));
  button.addStyleName(getStyle("borderless-colored"));
  button.addStyleName(getStyle("button-no-border"));
  button.addStyleName(getStyle("action-type-padding"));
  if (buttonEnable) {
    return;
  }
  button.addStyleName("v-disabled");
}

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

private void applystyles(final Button button, final boolean buttonEnable) {
  button.setStyleName(VButton.CLASSNAME);
  button.addStyleName(getStyle("tiny"));
  button.addStyleName(getStyle("borderless-colored"));
  button.addStyleName(getStyle("button-no-border"));
  button.addStyleName(getStyle("action-type-padding"));
  if (buttonEnable) {
    return;
  }
  button.addStyleName("v-disabled");
}

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

private static void applyStyles(final Button button, final boolean buttonDisabled, final String additionalStyle) {
  button.setStyleName(VButton.CLASSNAME);
  button.addStyleName(getStyle("tiny"));
  button.addStyleName(getStyle("borderless"));
  button.addStyleName(getStyle("button-no-border"));
  button.addStyleName(getStyle("action-type-padding"));
  button.addStyleName(getStyle(additionalStyle));
  if (buttonDisabled) {
    button.addStyleName("v-disabled");
  }
}

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

private static void applyStyles(final Button button, final boolean buttonDisabled, final String additionalStyle) {
  button.setStyleName(VButton.CLASSNAME);
  button.addStyleName(getStyle("tiny"));
  button.addStyleName(getStyle("borderless"));
  button.addStyleName(getStyle("button-no-border"));
  button.addStyleName(getStyle("action-type-padding"));
  button.addStyleName(getStyle(additionalStyle));
  if (buttonDisabled) {
    button.addStyleName("v-disabled");
  }
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

public void construct() {
  closeButton.addStyleDependentName("dialog");
  closeButton.setVisible(false);
  headerPanel.appendChild(closeButton.getElement());
  addDomHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      Element target = event.getNativeEvent().getEventTarget().cast();
      if (closeButton.getElement().isOrHasChild(target)) {
        callback.onCloseFired();
      }
    }
  }, ClickEvent.getType());
  headerPanel.addClassName(CLASSNAME_HEADER);
  descriptionPanel.addStyleName(ClASSNAME_DESCRIPTION);
  wideButton.setStyleName(CLASSNAME_WIDEBUTTON);
  setWideIcon();
  helpButton.setStyleName(CLASSNAME_HELPBUTTON);
  toolbarEl.addClassName(CLASSNAME_HEADER_TOOLBAR);
  getElement().appendChild(headerPanel);
  caption.addClassName("title");
  headerPanel.appendChild(caption);
  add(wideButton, headerPanel);
  add(helpButton, headerPanel);
  headerPanel.appendChild(toolbarEl);
  descriptionPanel.setVisible(false);
  add(descriptionPanel);
}

代码示例来源:origin: org.eagle-i/eagle-i-search-gwt

nextResultBtn.setStyleName(NEXT_RESULT_BTN_STYLE);
nextResultBtn.setVisible(false);
nextResultBtn.addClickHandler(new ClickHandler() {
prevResultBtn.setStyleName(PREV_RESULT_BTN_STYLE);
prevResultBtn.setVisible(false);
prevResultBtn.addClickHandler(new ClickHandler() {
backBtn.setStyleName(BACK_TO_RESULTS_BTN_STYLE);
backBtn.addClickHandler(new ClickHandler() {

代码示例来源:origin: net.sf.javaprinciples.client/client-presentation

protected void injectButton(final ControlContainer container)
{
  ViewExtension extension = clientContext.getModelSupport().findExtension(model.getExtensions(), ViewExtension.class);
  String action = extension.getAction();
  if (StringUtilsShared.isBlank(action))
  {
    action = model.getLabel();
  }
  Button submit = new Button(action);
  submit.setStyleName("btn btn-default");
  submit.addClickHandler(new ClickHandler()
  {
    @Override
    public void onClick(ClickEvent event)
    {
      handleSubmit(container);
    }
  });
  // For search we want the button to be at the end of the input fields
  // If we got the css correct for the panel holding the attributes it would not be necessary
  // to try and find the panel.
  ComplexPanel p1 = (ComplexPanel)view.getWidget();
  ComplexPanel p2 = (ComplexPanel)p1.getWidget(1);
  ComplexPanel p3 = (ComplexPanel)p2.getWidget(1);
  ComplexPanel p4 = (ComplexPanel)p3.getWidget(2);
  p4.add(submit);
}

代码示例来源:origin: net.sf.javaprinciples.client/client-presentation

submit.setStyleName("btn btn-default");
submit.addClickHandler(new ClickHandler()

相关文章