本文整理汇总了Java中org.gwtbootstrap3.client.ui.constants.Toggle类的典型用法代码示例。如果您正苦于以下问题:Java Toggle类的具体用法?Java Toggle怎么用?Java Toggle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Toggle类属于org.gwtbootstrap3.client.ui.constants包,在下文中一共展示了Toggle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getPanelHeader
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private PanelHeader getPanelHeader() {
PanelHeader header = new PanelHeader();
header.addStyleName("small-header");
header.setDataTarget("#" + this.target);
header.setDataToggle(Toggle.COLLAPSE);
header.setDataParent("#" + this.parentid);
anchor = new Anchor();
anchor.setIcon(IconType.FILTER);
anchor.setText(facetId);
anchor.setIconSize(IconSize.LARGE);
anchor.setDataToggle(Toggle.COLLAPSE);
anchor.setDataTarget("#" + this.target);
anchor.setDataParent("#" + this.parentid);
header.add(anchor);
return header;
}
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:19,代码来源:FacetSelector.java
示例2: addButtons
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private ButtonGroup addButtons() {
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.setHeight("4em");
buttonGroup.setJustified(true);
buttonGroup.setDataToggle(Toggle.BUTTONS);
for (final ButtonType t : ButtonType.values()) {
RadioButton radioButton = new RadioButton(t.toString());
radioButton.setType(t);
radioButton.setSize(ButtonSize.SMALL);
radioButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
userColor = t.name();
}
});
buttonGroup.add(radioButton);
}
return buttonGroup;
}
开发者ID:treblereel,项目名称:ErraiMessageBusChat,代码行数:20,代码来源:PropertyModalPanel.java
示例3: createPanelHeader
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
static PanelHeader createPanelHeader(final PropertyEditorCategory category,
final PanelGroup propertyMenu,
PanelCollapse panelCollapse) {
final Heading heading = new Heading(HeadingSize.H4);
final Anchor anchor = GWT.create(Anchor.class);
anchor.setText(category.getName());
anchor.setDataToggle(Toggle.COLLAPSE);
anchor.setDataParent(propertyMenu.getId());
anchor.setDataTargetWidget(panelCollapse);
anchor.addStyleName("collapsed");
heading.add(anchor);
final PanelHeader header = GWT.create(PanelHeader.class);
header.add(heading);
return header;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:PropertyEditorHelper.java
示例4: addDropdownTab
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的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
示例5: makeDropDownMenuButton
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = GWT.create(ButtonGroup.class);
final Button dropdownButton = GWT.create(Button.class);
dropdownButton.setText(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
dropDownMenu.setPull(Pull.RIGHT);
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:ListBarWidgetImpl.java
示例6: addGroupMenuItem
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
@Override
public void addGroupMenuItem(final String id,
final String label,
final MenuPosition position) {
final ListDropDown listDropDown = GWT.create(ListDropDown.class);
final AnchorButton anchor = GWT.create(AnchorButton.class);
anchor.setDataToggle(Toggle.DROPDOWN);
anchor.setText(label);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
listDropDown.add(anchor);
listDropDown.add(dropDownMenu);
positionMenuItem(listDropDown,
position);
navbarNav.add(listDropDown);
getMenuItemWidgetMap().put(id,
dropDownMenu);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:WorkbenchMenuStandardNavBarView.java
示例7: addContextGroupMenuItem
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
@Override
public void addContextGroupMenuItem(final String menuItemId,
final String id,
final String label,
final MenuPosition position) {
final ListDropDown listDropDown = GWT.create(ListDropDown.class);
listDropDown.setStyleName("dropdown-submenu");
final Anchor anchor = GWT.create(Anchor.class);
anchor.addStyleName(Styles.DROPDOWN_TOGGLE);
anchor.setDataToggle(Toggle.DROPDOWN);
anchor.setText(label);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
listDropDown.add(anchor);
listDropDown.add(dropDownMenu);
positionMenuItem(listDropDown,
position);
ComplexPanel contextContainer = getMenuItemContextWidgetMap().get(menuItemId);
if (contextContainer == null) {
contextContainer = getContextContainer(menuItemId);
}
contextContainer.add(listDropDown);
getMenuItemContextWidgetMap().put(id,
dropDownMenu);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:27,代码来源:WorkbenchMenuStandardNavBarView.java
示例8: setup
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
@PostConstruct
public void setup() {
anchor.addStyleName(Styles.DROPDOWN_TOGGLE);
anchor.addStyleName(PatternFlyStyles.NAV_ITEM_ICONIC);
anchor.setDataToggle(Toggle.DROPDOWN);
final Span userIcon = new Span();
userIcon.addStyleName("pficon");
userIcon.addStyleName("pficon-user");
anchor.add(userIcon);
anchor.add(userNameWidget);
final Span caret = new Span();
caret.addStyleName(Styles.CARET);
anchor.add(caret);
addStyleName(Styles.DROPDOWN);
add(anchor);
add(menu);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:21,代码来源:UserMenuViewImpl.java
示例9: addContextGroupMenuItem
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
@Override
public void addContextGroupMenuItem(final String menuItemId,
final String id,
final String label,
final MenuPosition position) {
final ListDropDown listDropDown = GWT.create(ListDropDown.class);
listDropDown.addStyleName(UF_PERSPECTIVE_CONTEXT_MENU);
final AnchorButton anchor = GWT.create(AnchorButton.class);
anchor.setDataToggle(Toggle.DROPDOWN);
anchor.setText(label);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
listDropDown.add(anchor);
listDropDown.add(dropDownMenu);
menuItemContextMenus.get(menuItemId).add(listDropDown);
getMenuItemContextWidgetMap().put(id,
dropDownMenu);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:WorkbenchMenuCompactNavBarView.java
示例10: getMenuActionsButton
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的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
示例11: setDataToggle
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
/**
* Specifies that this button acts as a toggle, for instance for a parent {@link org.gwtbootstrap3.client.ui.DropDown}
* or {@link org.gwtbootstrap3.client.ui.ButtonGroup}
* <p/>
* Adds a {@link Caret} as a child widget.
*
* @param toggle Kind of toggle
*/
@Override
public void setDataToggle(final Toggle toggle) {
toggleMixin.setDataToggle(toggle);
// We defer to make sure the elements are available to manipulate their position
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
separator.removeFromParent();
caret.removeFromParent();
if (toggle == Toggle.DROPDOWN) {
addStyleName(Styles.DROPDOWN_TOGGLE);
add(separator, (Element) getElement());
add(caret, (Element) getElement());
}
}
});
}
开发者ID:gwtbootstrap3,项目名称:gwtbootstrap3,代码行数:29,代码来源:AbstractToggleButton.java
示例12: makePanelGroup
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private PanelGroup makePanelGroup(final String className,
final boolean isReadOnly) {
return new PanelGroup() {{
final PanelCollapse collapse = new PanelCollapse() {{
add(new PanelBody() {{
add(makeStencils(className,
isReadOnly));
}});
}};
add(new PanelHeader() {{
setDataToggle(Toggle.COLLAPSE);
setDataParent(getId());
setDataTargetWidget(collapse);
add(new Heading(HeadingSize.H4) {{
setText(className);
}});
}});
add(collapse);
}};
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:21,代码来源:GuidedDecisionTreePalette.java
示例13: makeTriggerWidget
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private TriggerWidget makeTriggerWidget(final ClientResourceType resourceType,
final PanelCollapse collapse) {
final String description = getResourceTypeDescription(resourceType);
if (resourceType.getIcon() != null) {
return new TriggerWidget(resourceType.getIcon(),
description,
!collapse.isIn()) {{
setDataToggle(Toggle.COLLAPSE);
setDataParent(itemsContainer.getId());
setDataTargetWidget(collapse);
}};
}
return new TriggerWidget(description,
!collapse.isIn()) {{
setDataToggle(Toggle.COLLAPSE);
setDataParent(itemsContainer.getId());
setDataTargetWidget(collapse);
}};
}
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:BusinessViewWidget.java
示例14: buildDevMenuItem
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的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
示例15: getPanelHeader
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private PanelHeader getPanelHeader() {
final PluginNotification me = this;
PanelHeader header = new PanelHeader();
header.addStyleName("small-header");
header.setDataTarget("#" + this.target);
header.setDataToggle(Toggle.COLLAPSE);
header.setDataParent("#" + this.parentid);
Anchor anchor = new Anchor();
Plugin plugin = response.getPlugin();
// int numsug = response.getSuggestedMetadata().keySet().size();
// String summary = (numsug > 0 ) ? numsug + " suggestions" :
// ( response.getMessage() != null ? "a message" : " some data");
anchor.setIcon(IconType.fromStyleName(plugin.getIcon()));
anchor.setColor("white");
anchor.setText("Found some information from "+plugin.getName());
anchor.setIconSize(IconSize.LARGE);
anchor.setDataToggle(Toggle.COLLAPSE);
anchor.setDataTarget("#" + this.target);
anchor.setDataParent("#" + this.parentid);
Anchor delanchor = new Anchor();
delanchor.setIcon(IconType.REMOVE);
delanchor.setPull(Pull.RIGHT);
delanchor.setColor("white");
delanchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
me.removeFromParent();
}
});
header.add(anchor);
header.add(delanchor);
return header;
}
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:39,代码来源:PluginNotification.java
示例16: createToggleButton
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
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;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:30,代码来源:UberfireColumnPicker.java
示例17: init
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
@Override
public void init(MultiplePermissionNodeViewer presenter) {
this.presenter = presenter;
String collapseId = Document.get().createUniqueId();
collapsePanel.setId(collapseId);
nodeAnchor.setDataToggle(Toggle.COLLAPSE);
nodeAnchor.setDataTarget("#" + collapseId);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:11,代码来源:MultiplePermissionNodeViewerView.java
示例18: makeDropDownMenuButton
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = new ButtonGroup();
final Button dropdownButton = new Button(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = new DropDownMenu();
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:MenuBuilder.java
示例19: getNewButton
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
public IsWidget getNewButton() {
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.addStyleName("pull-right");
buttonGroup.add(new Button() {{
setSize(ButtonSize.SMALL);
setDataToggle(Toggle.DROPDOWN);
}});
DropDownMenu dropDownMenu = new DropDownMenu();
addNewAnchorLink(dropDownMenu,
CommonConstants.INSTANCE.NewPerspective(),
PluginType.PERSPECTIVE_LAYOUT,
pluginController.canCreatePerspectives());
addNewAnchorLink(dropDownMenu,
CommonConstants.INSTANCE.NewScreen(),
PluginType.SCREEN,
true);
addNewAnchorLink(dropDownMenu,
CommonConstants.INSTANCE.NewEditor(),
PluginType.EDITOR,
true);
addNewAnchorLink(dropDownMenu,
CommonConstants.INSTANCE.NewSplashScreen(),
PluginType.SPLASH,
true);
addNewAnchorLink(dropDownMenu,
CommonConstants.INSTANCE.NewDynamicMenu(),
PluginType.DYNAMIC_MENU,
true);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:32,代码来源:PluginExplorerScreen.java
示例20: addCaretToText
import org.gwtbootstrap3.client.ui.constants.Toggle; //导入依赖的package包/类
/**
* Checks whether or not caret should be added/removed
*/
protected void addCaretToText() {
if (hideOnSingleElement && dropDownMenu.getWidgetCount() == 1) {
button.setToggleCaret(false);
button.setDataToggle(null);
this.removeStyleName("open");
toggleStyles(true);
} else if ((dropDownMenu.getWidgetCount() > 1 || hideOnSingleElement == false && dropDownMenu.getWidgetCount() == 1)) {
button.setToggleCaret(true);
button.setDataToggle(Toggle.DROPDOWN);
button.setDataTargetWidget(this);
toggleStyles(false);
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:ListDropdown.java
注:本文中的org.gwtbootstrap3.client.ui.constants.Toggle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论