本文整理汇总了Java中org.gwtbootstrap3.client.ui.AnchorListItem类的典型用法代码示例。如果您正苦于以下问题:Java AnchorListItem类的具体用法?Java AnchorListItem怎么用?Java AnchorListItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AnchorListItem类属于org.gwtbootstrap3.client.ui包,在下文中一共展示了AnchorListItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addDropDownOption
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void addDropDownOption(TerminationConfigOption terminationConfigOption) {
if (terminationConfigOption == TerminationConfigOption.NESTED) {
return;
}
AnchorListItem li1 = new AnchorListItem(dropDownNameMap.get(terminationConfigOption));
li1.addClickHandler(h -> {
presenter.onTerminationTypeSelected(terminationConfigOption.name());
});
for (int i = 0; i < dropdownMenuList.getWidgetCount(); i++) {
AnchorListItem item = (AnchorListItem) dropdownMenuList.getWidget(i);
TerminationConfigOption dropDownTerminationConfigOption = getDropDownOption(item.getText());
if (dropDownTerminationConfigOption == null || terminationConfigOption.ordinal() < dropDownTerminationConfigOption.ordinal()) {
dropdownMenuList.insert(li1,
i);
break;
}
if (i == dropdownMenuList.getWidgetCount() - 1) {
dropdownMenuList.add(li1);
}
}
}
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:23,代码来源:TerminationTreeItemContentViewImpl.java
示例2: createTimeSelector
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
protected AnchorListItem createTimeSelector(int time,
String name,
int configuredSeconds,
final AnchorListItem refreshDisableButton) {
final AnchorListItem oneMinuteRadioButton = GWT.create(AnchorListItem.class);
oneMinuteRadioButton.setText(name);
oneMinuteRadioButton.setIconFixedWidth(true);
final int selectedRefreshTime = time;
if (configuredSeconds == selectedRefreshTime) {
oneMinuteRadioButton.setIcon(IconType.CHECK);
}
oneMinuteRadioButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
oneMinuteRadioButton.setIcon(IconType.CHECK);
supportsRefreshInterval.onUpdateRefreshInterval(true,
selectedRefreshTime);
refreshDisableButton.setActive(false);
refreshDisableButton.setEnabled(true);
refreshDisableButton.setText(constants.Disable_autorefresh());
}
});
return oneMinuteRadioButton;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:27,代码来源:RefreshSelectorMenuBuilder.java
示例3: addDropdownTab
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
/**
* 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;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:TabPanelWithDropdowns.java
示例4: setSplashScreenList
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void setSplashScreenList(final List<SplashScreenListEntry> splashScreens) {
dropdown.clear();
for (final SplashScreenListEntry entry : splashScreens) {
final AnchorListItem item = new AnchorListItem(entry.getScreenName());
item.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
entry.getShowCommand().execute();
}
});
dropdown.add(item);
}
if (dropdown.getWidgetCount() == 0) {
dropdown.add(new DropDownHeader(WorkbenchConstants.INSTANCE.splashScreenNoneAvailable()));
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:SplashScreenMenuView.java
示例5: addMenuItem
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void addMenuItem(final String id,
final String label,
final String parentId,
final Command command,
final MenuPosition position) {
final AnchorListItem menuItem = GWT.create(AnchorListItem.class);
menuItem.setText(label);
if (command != null) {
menuItem.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
command.execute();
}
});
}
getMenuItemWidgetMap().put(id,
menuItem);
menuLabelMap.put(id,
label);
dropDownMenu.add(menuItem);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:WorkbenchMenuCompactNavBarView.java
示例6: getMenuActionsButton
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
protected ButtonGroup getMenuActionsButton() {
return new ButtonGroup() {{
add(new Button( Constants.INSTANCE.menu_button_actions()) {{
setSize(ButtonSize.EXTRA_SMALL);
addStyleName(Pull.RIGHT.getCssName());
setDataToggle(Toggle.DROPDOWN);
}} );
add(new DropDownMenu() {{
add(new AnchorListItem(Constants.INSTANCE.menu_edit()) {{
addClickHandler(event -> getEditCommand().execute());
}} );
add(new AnchorListItem(Constants.INSTANCE.menu_clone() ) {{
addClickHandler(event -> getCloneCommand().execute());
}} );
add(new AnchorListItem(Constants.INSTANCE.menu_export_csv() ) {{
addClickHandler(event -> getExportCsvCommand().execute());
}} );
add(new AnchorListItem(Constants.INSTANCE.menu_export_excel()) {{
addClickHandler(event -> getExportExcelCommand().execute());
}} );
}} );
}};
}
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:DisplayerScreenPresenter.java
示例7: buildDevMenuItem
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
private MenuItem buildDevMenuItem() {
final DropDownMenu menu = new DropDownMenu() {{
addStyleName("pull-right");
}};
for (final MenuDevCommand command : devCommands) {
menu.add(new AnchorListItem(command.getText()) {{
setIcon(command.getIcon());
addClickHandler(event -> command.execute());
}});
}
final IsWidget group = new ButtonGroup() {{
add(new Button() {{
setToggleCaret(false);
setDataToggle(Toggle.DROPDOWN);
setIcon(IconType.COG);
setSize(ButtonSize.SMALL);
setTitle("Development");
}});
add(menu);
}};
return MenuUtils.buildItem(group);
}
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:23,代码来源:MenuDevCommandsBuilder.java
示例8: PhaseConfigFormViewImpl
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Inject
public PhaseConfigFormViewImpl(final DropDownMenu dropdownMenuList,
final TranslationService translationService) {
this.dropdownMenuList = dropdownMenuList;
AnchorListItem constructionHeuristicListItem = new AnchorListItem(translationService.getTranslation(SolverEditorConstants.PhaseConfigFormViewImplConstructionHeuristic));
constructionHeuristicListItem.addClickHandler(h -> presenter.addConstructionHeuristic());
this.dropdownMenuList.add(constructionHeuristicListItem);
AnchorListItem localSearchListItem = new AnchorListItem(translationService.getTranslation(SolverEditorConstants.PhaseConfigFormViewImplLocalSearch));
localSearchListItem.addClickHandler(h -> presenter.addLocalSearch());
this.dropdownMenuList.add(localSearchListItem);
// TODO add Exhaustive search, ...
}
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:15,代码来源:PhaseConfigFormViewImpl.java
示例9: removeDropDownOption
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void removeDropDownOption(TerminationConfigOption option) {
for (int i = 0; i < dropdownMenuList.getWidgetCount(); i++) {
AnchorListItem item = (AnchorListItem) dropdownMenuList.getWidget(i);
if (dropDownNameMap.get(option).equals(item.getText())) {
dropdownMenuList.remove(item);
break;
}
}
}
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:11,代码来源:TerminationTreeItemContentViewImpl.java
示例10: initSelectFieldDropdownOptions
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void initSelectFieldDropdownOptions(List<ObjectProperty> options) {
selectFieldDropdown.clear();
for (ObjectProperty option : options) {
AnchorListItem listItem = new AnchorListItem(option.getName());
listItem.addClickHandler(c -> presenter.onFieldAdded(option,
true));
selectFieldDropdown.add(listItem);
}
}
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:11,代码来源:DataObjectFieldPickerItemViewImpl.java
示例11: testUpdateRefreshInterval
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Test
public void testUpdateRefreshInterval() {
int time = 1;
refreshSelectorMenuBuilder.createTimeSelector(time,
"",
time,
mock(AnchorListItem.class));
clickHandler.onClick(new ClickEvent() {
});
verify(supportsRefreshInterval).onUpdateRefreshInterval(true,
time);
verify(oneMinuteRadioButton,
times(2)).setIcon(IconType.CHECK);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:16,代码来源:RefreshSelectorMenuBuilderTest.java
示例12: testSelectedRefreshInterval
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Test
public void testSelectedRefreshInterval() {
int time = 1;
int selectedTime = 2;
refreshSelectorMenuBuilder.createTimeSelector(time,
"",
selectedTime,
mock(AnchorListItem.class));
verify(oneMinuteRadioButton,
never()).setIcon(any(IconType.class));
}
开发者ID:kiegroup,项目名称:appformer,代码行数:13,代码来源:RefreshSelectorMenuBuilderTest.java
示例13: addNewAnchorLink
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
private void addNewAnchorLink(DropDownMenu dropDownMenu,
String text,
PluginType pluginType,
boolean available) {
if (available) {
AnchorListItem anchor = new AnchorListItem(text);
anchor.addClickHandler(event -> newPluginPopUp.show(pluginType));
dropDownMenu.add(anchor);
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:11,代码来源:PluginExplorerScreen.java
示例14: setupBreadcrumbs
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void setupBreadcrumbs(List<DirectoryBreadcrumb> breadcrumbs,
final ParameterizedCommand<String> breadcrumbAction) {
dirs.clear();
for (final DirectoryBreadcrumb breadCrumb : breadcrumbs) {
final AnchorListItem bread = new AnchorListItem(breadCrumb.getName());
bread.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
breadcrumbAction.execute(breadCrumb.getUri());
}
});
dirs.add(bread);
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:16,代码来源:AppsHomeView.java
示例15: makeMenuItemCommand
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
private Widget makeMenuItemCommand(final MenuItemCommand cmdItem,
final boolean isRoot) {
if (isRoot) {
final Button button = GWT.create(Button.class);
button.setText(cmdItem.getCaption());
button.setSize(ButtonSize.SMALL);
button.setEnabled(cmdItem.isEnabled());
button.addClickHandler(event -> cmdItem.getCommand().execute());
cmdItem.addEnabledStateChangeListener(button::setEnabled);
return button;
} else {
final AnchorListItem navbarLink = GWT.create(AnchorListItem.class);
navbarLink.setText(cmdItem.getCaption());
if (!cmdItem.isEnabled()) {
navbarLink.addStyleName("disabled");
}
navbarLink.addClickHandler(event -> cmdItem.getCommand().execute());
cmdItem.addEnabledStateChangeListener(enabled -> {
if (enabled) {
navbarLink.removeStyleName("disabled");
} else {
navbarLink.addStyleName("disabled");
}
});
return navbarLink;
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:28,代码来源:ListBarWidgetImpl.java
示例16: addMenuItem
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void addMenuItem(final String id,
final String label,
final String parentId,
final Command command,
final MenuPosition position) {
final AnchorListItem menuItem = GWT.create(AnchorListItem.class);
menuItem.setText(label);
if (command != null) {
menuItem.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
command.execute();
}
});
}
getMenuItemWidgetMap().put(id,
menuItem);
if (parentId == null) {
positionMenuItem(menuItem,
position);
navbarNav.add(menuItem);
} else {
final ComplexPanel parent = getMenuItemWidgetMap().get(parentId);
if (parent != null) {
parent.add(menuItem);
}
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:30,代码来源:WorkbenchMenuStandardNavBarView.java
示例17: addContextMenuItem
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void addContextMenuItem(
final String menuItemId,
final String id,
final String label,
final String parentId,
final Command command,
final MenuPosition position) {
final AnchorListItem menuItem = GWT.create(AnchorListItem.class);
menuItem.setText(label);
if (command != null) {
menuItem.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
command.execute();
}
});
}
positionMenuItem(menuItem,
position);
ComplexPanel contextContainer = getMenuItemContextWidgetMap().get(parentId);
if (contextContainer == null) {
contextContainer = getContextContainer(menuItemId);
}
contextContainer.add(menuItem);
getMenuItemContextWidgetMap().put(id,
menuItem);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:33,代码来源:WorkbenchMenuStandardNavBarView.java
示例18: visit
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
@Override
public void visit(final MenuCustom<?> menuCustom) {
final IsWidget customMenuItem = ((IsWidget) menuCustom.build()).asWidget();
if (customMenuItem instanceof AnchorListItem) {
final AnchorListItem view = (AnchorListItem) customMenuItem;
setupEnableDisable(menuCustom,
view);
this.hasMenuItems.addMenuItem(menuCustom.getPosition(),
view);
} else {
buildMenuCustom(menuCustom,
this.hasMenuItems);
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:DropdownMenuVisitor.java
示例19: buildMenuCommand
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
protected Widget buildMenuCommand(final MenuItemCommand menuItemCommand,
final HasMenuItems hasMenuItems) {
final AnchorListItem item = createListItem(menuItemCommand,
hasMenuItems);
item.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
menuItemCommand.getCommand().execute();
}
});
return item;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:13,代码来源:DropdownMenuVisitor.java
示例20: buildMenuPerspective
import org.gwtbootstrap3.client.ui.AnchorListItem; //导入依赖的package包/类
protected Widget buildMenuPerspective(final MenuItemPerspective menuItemPerspective,
final HasMenuItems hasMenuItems) {
final AnchorListItem item = createListItem(menuItemPerspective,
hasMenuItems);
item.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
IOC.getBeanManager().lookupBean(PlaceManager.class).getInstance().goTo(menuItemPerspective.getPlaceRequest());
}
});
return item;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:13,代码来源:DropdownMenuVisitor.java
注:本文中的org.gwtbootstrap3.client.ui.AnchorListItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论