public void setNextIcon(final IconType icon) { next.setIcon(icon); next.setIconPosition(IconPosition.RIGHT); }
public void setNextIcon(final IconType icon) { next.setIcon(icon); next.setIconPosition(IconPosition.RIGHT); }
private AnchorListItem makeExportMenuItemWidget(final String caption, final Command onClickCommand) { final AnchorListItem exportMenuItemWidget = GWT.create(AnchorListItem.class); exportMenuItemWidget.setIcon(IconType.FILE_IMAGE_O); exportMenuItemWidget.setIconPosition(IconPosition.LEFT); exportMenuItemWidget.setText(caption); exportMenuItemWidget.setTitle(caption); exportMenuItemWidget.addClickHandler(event -> onClickCommand.execute()); return exportMenuItemWidget; }
/** * Adds a new tab to this panel that doesn't have any contents itself, but can contain multiple items that appear in * a dropdown menu when the tab is clicked. This dropdown menu is initially empty. Items can be added and removed * using the {@link DropDownTab#addItem(String, Widget)} and * {@link DropDownTab#removeItem(String, Widget)} methods. * @param label The text that should appear on the dropdown tab. * @return the container for the items that appear when the tab is clicked. */ public DropDownTab addDropdownTab(String label) { AnchorListItem tab = new AnchorListItem(label); // FIXME should actually subclass AnchorListItem and add a <b class=caret/> to the anchor elem tab.setIcon(IconType.ANGLE_DOWN); tab.setIconPosition(IconPosition.RIGHT); tab.addStyleName(Styles.DROPDOWN_TOGGLE); tab.setDataToggle(Toggle.DROPDOWN); DropDownTab dropDownTab = new DropDownTab(tab); tab.add(dropDownTab); addDropdownTab(dropDownTab); return dropDownTab; }
/** * Adds a new tab to this panel that doesn't have any contents itself, but can contain multiple items that appear in * a dropdown menu when the tab is clicked. This dropdown menu is initially empty. Items can be added and removed * using the {@link DropDownTab#addItem(String, Widget)} and * {@link DropDownTab#removeItem(String, Widget)} methods. * @param label The text that should appear on the dropdown tab. * @return the container for the items that appear when the tab is clicked. */ public DropDownTab addDropdownTab(String label) { AnchorListItem tab = new AnchorListItem(label); // FIXME should actually subclass AnchorListItem and add a <b class=caret/> to the anchor elem tab.setIcon(IconType.ANGLE_DOWN); tab.setIconPosition(IconPosition.RIGHT); tab.addStyleName(Styles.DROPDOWN_TOGGLE); tab.setDataToggle(Toggle.DROPDOWN); DropDownTab dropDownTab = new DropDownTab(tab); tab.add(dropDownTab); addDropdownTab(dropDownTab); return dropDownTab; }