org.gwtbootstrap3.client.ui.Button.addStyleName()方法的使用及代码示例

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

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

Button.addStyleName介绍

暂无

代码示例

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

Button pdfLink = new Button("Printable version");
pdfLink.addStyleName(BaseTheme.BUTTON_LINK);

BrowserWindowOpener windowOpener = new BrowserWindowOpener(createFormLink(...));
windowOpener.setFeatures("width=500,height=400,resizable=yes");
windowOpener.extend(pdfLink);

代码示例来源:origin: oVirt/ovirt-engine

private Button createKebabButton() {
  Button button = new Button();
  button.addStyleName(Styles.DROPDOWN_TOGGLE);
  button.addStyleName(BTN_LINK);
  button.removeStyleName(BTN_DEFAULT);
  button.setDataToggle(Toggle.DROPDOWN);
  return button;
}

代码示例来源:origin: oVirt/ovirt-engine

private Button createButton(IconType iconType, ClickHandler handler) {
  final Button button = new Button("", iconType, handler);
  button.addStyleName(style.buttonStyle());
  return button;
}

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

// Have an Login button and set it as the default button
Button login = new Button("Login");
login.setClickShortcut(KeyCode.ENTER);
login.addStyleName(Reindeer.BUTTON_DEFAULT);

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

final Button downloadInvisibleButton = new Button();
downloadInvisibleButton.setId("DownloadButtonId");
downloadInvisibleButton.addStyleName("InvisibleButton");

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

Button label = new Button("Your label text here.");
label.setIcon(FontAwesome.USER);
label.addStyleName(ValoTheme.BUTTON_BORDERLESS + " labelButton");

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

public class MySubSetSelector<ET> extends SubSetSelector<ET> {

  public MySubSetSelector(Class<ET> elementType) {
    super(elementType);
  }

  protected Object getToolColumnContent(final ET entity) {
    Button button = new Button(FontAwesome.MINUS);
    button.setDescription("Removes the selection from the list"); // Change this
    button.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
    button.addClickListener(new Button.ClickListener() {
      @Override
      public void buttonClick(ClickEvent event) {
        removeSelectedOption(entity);
      }
    });
    button.setStyleName(Reindeer.BUTTON_SMALL);
    return button;
  }
}

代码示例来源:origin: oVirt/ovirt-engine

public void init() {
  filterListEditor = createFilterListEditor();
  filterListEditor.hideLabel();
  initWidget(ViewUiBinder.uiBinder.createAndBindUi(this));
  addSelectedItemButton.addStyleName(Styles.PULL_RIGHT);
}

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

Button btnLogout = new Button();
btnLogout.setIcon(new ThemeResource("icons/logout.png"));
btnLogout.addStyleName(Reindeer.BUTTON_LINK); // define it as a link button => no borders, just the icon. Every theme has this style-name.
btnLogout.setDescription("Logout"); // set hint

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

private void createButtom() {
  itemButton.addStyleName(CSS.CSS().singleDockItem());
  itemButton.addStyleName(CSS.CSS().sideDockItem());
  itemButton.setIcon(IconType.CHEVRON_RIGHT);
  itemButton.setIconFixedWidth(true);
  itemButton.setSize(ButtonSize.SMALL);
  itemButton.setType(ButtonType.LINK);
  itemButton.addClickHandler(event -> openAndExecuteExpandCommand());
}

代码示例来源:origin: org.uberfire/uberfire-simple-docks-client

private void createButtom() {
  itemButton.addStyleName(CSS.CSS().singleDockItem());
  itemButton.addStyleName(CSS.CSS().sideDockItem());
  itemButton.setIcon(IconType.CHEVRON_RIGHT);
  itemButton.setIconFixedWidth(true);
  itemButton.setSize(ButtonSize.SMALL);
  itemButton.setType(ButtonType.LINK);
  itemButton.addClickHandler(event -> openAndExecuteExpandCommand());
}

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

protected void setupToggle() {
  final Button btnToggle = GWT.create(Button.class);
  btnToggle.removeStyleName("btn-default");
  btnToggle.addStyleName(Styles.NAVBAR_TOGGLE);
  btnToggle.setDataToggle(Toggle.COLLAPSE);
  btnToggle.setDataTargetWidget(navbarCollapse);
  btnToggle.add(createToggleBar());
  btnToggle.add(createToggleBar());
  btnToggle.add(createToggleBar());
  navbarHeader.add(btnToggle);
}

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

protected void setupToggle() {
  final Button btnToggle = GWT.create(Button.class);
  btnToggle.removeStyleName("btn-default");
  btnToggle.addStyleName(Styles.NAVBAR_TOGGLE);
  btnToggle.setDataToggle(Toggle.COLLAPSE);
  btnToggle.setDataTargetWidget(navbarCollapse);
  btnToggle.add(createToggleBar());
  btnToggle.add(createToggleBar());
  btnToggle.add(createToggleBar());
  navbarHeader.add(btnToggle);
}

代码示例来源:origin: org.uberfire/uberfire-simple-docks-client

private void setupCSS() {
  if (position == UberfireDockPosition.SOUTH) {
    titlePanel.addStyleName(CSS.CSS().dockExpandedContentPanelSouth());
    title.addStyleName(CSS.CSS().dockExpandedLabelSouth());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonSouth());
    collapse.setIcon(IconType.CHEVRON_DOWN);
  } else if (position == UberfireDockPosition.WEST) {
    title.addStyleName(CSS.CSS().dockExpandedLabelWest());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonWest());
    collapse.setIcon(IconType.CHEVRON_LEFT);
  } else if (position == UberfireDockPosition.EAST) {
    title.addStyleName(CSS.CSS().dockExpandedLabelEast());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonEast());
    collapse.setIcon(IconType.CHEVRON_RIGHT);
  }
  setupDockContentSize();
}

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

private void setupCSS() {
  if (position == UberfireDockPosition.SOUTH) {
    titlePanel.addStyleName(CSS.CSS().dockExpandedContentPanelSouth());
    title.addStyleName(CSS.CSS().dockExpandedLabelSouth());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonSouth());
    collapse.setIcon(IconType.CHEVRON_DOWN);
  } else if (position == UberfireDockPosition.WEST) {
    title.addStyleName(CSS.CSS().dockExpandedLabelWest());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonWest());
    collapse.setIcon(IconType.CHEVRON_LEFT);
  } else if (position == UberfireDockPosition.EAST) {
    title.addStyleName(CSS.CSS().dockExpandedLabelEast());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonEast());
    collapse.setIcon(IconType.CHEVRON_RIGHT);
  }
  setupDockContentSize();
}

代码示例来源:origin: oVirt/ovirt-engine

protected Container createItemContainerPanel(Row content, boolean hidden) {
  Container panel = new Container();
  panel.addStyleName(LIST_GROUP_ITEM_CONTAINER);
  if (hidden) {
    panel.addStyleName(ExpandableListViewItem.HIDDEN);
    panel.setFluid(true);
    Button closeButton = new Button();
    closeButton.addStyleName(Styles.CLOSE);
    getClickHandlerRegistrations().add(closeButton.addClickHandler(this));
    Span icon = new Span();
    icon.addStyleName(PatternflyConstants.PFICON);
    icon.addStyleName(PatternflyConstants.PFICON_CLOSE);
    closeButton.add(icon);
    panel.add(closeButton);
  }
  panel.add(content);
  return panel;
}

代码示例来源:origin: oVirt/ovirt-engine

private AnchorListItem createSelectionDropDown(SafeHtml currentName) {
  OvirtAnchorListItem dropDown = new OvirtAnchorListItem();
  Button exchangeButton = new Button();
  exchangeButton.setIcon(IconType.EXCHANGE);
  exchangeButton.addStyleName(QUICK_SWITCH);
  exchangeButton.getElement().getStyle().setMarginLeft(10, Unit.PX);
  exchangeButton.getElement().getStyle().setMarginTop(-5, Unit.PX);
  Anchor anchor = dropDown.getAnchor();
  anchor.getElement().setInnerHTML(currentName.asString());
  anchor.getElement().getStyle().setFontSize(28, Unit.PX);
  anchor.addClickHandler(e -> {
    if (popover.isVisible()) {
      popover.hide();
    } else {
      popover.show();
    }
  });
  anchor.add(exchangeButton);
  createPopover(anchor);
  dropDown.add(anchor);
  return dropDown;
}

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

public Button createToggleButton() {
  final Button button = GWT.create(Button.class);
  button.addStyleName(UFTableResources.INSTANCE.CSS().columnPickerButton());
  button.setDataToggle(Toggle.BUTTON);
  button.setIcon(IconType.LIST_UL);
  button.setTitle(CommonConstants.INSTANCE.ColumnPickerButtonTooltip());
  popup.addStyleName(UFTableResources.INSTANCE.CSS().columnPickerPopup());
  popup.addAutoHidePartner(button.getElement());
  popup.addCloseHandler(new CloseHandler<PopupPanel>() {
    public void onClose(CloseEvent<PopupPanel> popupPanelCloseEvent) {
      if (popupPanelCloseEvent.isAutoClosed()) {
        button.setActive(false);
      }
    }
  });
  button.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
      if (!button.isActive()) {
        showColumnPickerPopup(button.getAbsoluteLeft() + button.getOffsetWidth(),
                   button.getAbsoluteTop() + button.getOffsetHeight());
      } else {
        popup.hide(false);
      }
    }
  });
  return button;
}

代码示例来源:origin: org.uberfire/uberfire-simple-docks-client

void createButton() {
  itemButton.setSize(ButtonSize.SMALL);
  itemButton.setType(ButtonType.LINK);
  configureIcon(itemButton,
         getDock().getImageIcon());
  mouseEventHandler = new MouseEventHandler();
  itemButton.addDomHandler(mouseEventHandler,
               MouseOverEvent.getType());
  itemButton.addStyleName(CSS.CSS().sideDockItem());
  itemButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      if (!isOpened()) {
        openAndExecuteExpandCommand();
      } else {
        closeAndExecuteCommand();
      }
    }
  });
}

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

void createButton() {
  itemButton.setSize(ButtonSize.SMALL);
  itemButton.setType(ButtonType.LINK);
  configureIcon(itemButton,
         getDock().getImageIcon());
  mouseEventHandler = new MouseEventHandler();
  itemButton.addDomHandler(mouseEventHandler,
               MouseOverEvent.getType());
  itemButton.addStyleName(CSS.CSS().sideDockItem());
  itemButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      if (!isOpened()) {
        openAndExecuteExpandCommand();
      } else {
        closeAndExecuteCommand();
      }
    }
  });
}

相关文章