• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ToolStripButton类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.smartgwt.client.widgets.toolbar.ToolStripButton的典型用法代码示例。如果您正苦于以下问题:Java ToolStripButton类的具体用法?Java ToolStripButton怎么用?Java ToolStripButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ToolStripButton类属于com.smartgwt.client.widgets.toolbar包,在下文中一共展示了ToolStripButton类的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getLogoutButton

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getLogoutButton(String login, final Controller controller) {
    ToolStripButton logoutButton = getSimpleToolStripButton(Images.instance.logout_30(), "Logout" + login);
    logoutButton.setIconOrientation("right");
    logoutButton.setTooltip("Logout");
    logoutButton.setBorder(GREY_BUTTON_BORDER);

    logoutButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            SC.confirm("Logout", "Are you sure you want to exit?", new BooleanCallback() {
                public void execute(Boolean value) {
                    if (value) {
                        controller.logout();
                    }
                }
            });
        }
    });
    return logoutButton;
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:20,
代码来源:ToolButtonsRender.java

示例2: asToolStripButton

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public static ToolStripButton asToolStripButton(final Action action, final Object source) {
    ToolStripButton tsb = new ToolStripButton();
    String title = action.getTitle();
    if (title != null) {
        tsb.setTitle(title);
    }
    String icon = action.getIcon();
    if (icon != null) {
        tsb.setIcon(icon);
    }
    String tooltip = action.getTooltip();
    if (tooltip != null) {
        tsb.setTooltip(tooltip);
    }
    tsb.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            ActionEvent aEvent = new ActionEvent(source);
            action.performAction(aEvent);
        }
    });
    return tsb;
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:25,
代码来源:Actions.java

示例3: createHomeButton

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
private void createHomeButton() {
        homeButton = new ToolStripButton();
        if (AccountManager.getInstance().getAccount()!= null) {
            homeButton.setIcon("home.png");
//            profileButton.setTitle(AccountManager.getInstance().getAccount().getName());
        }
        homeButton.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                            Window.open("/index.html", "_self", "");


            }
        });
    }
 

开发者ID:WELTEN,
项目名称:dojo-ibl,
代码行数:17,
代码来源:ToolBar.java

示例4: createProfileButton

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
private void createProfileButton() {
	profileButton = new ToolStripButton();  
	if (AccountManager.getInstance().getAccount()!= null) {
	profileButton.setIcon(AccountManager.getInstance().getAccount().getPicture());  
       profileButton.setTitle(AccountManager.getInstance().getAccount().getName());
	}
       loadButtons();
	profileButton.addClickHandler(new ClickHandler() {
		
		@Override
		public void onClick(ClickEvent event) {
			SC.ask("Logout?", new BooleanCallback() {
				
				@Override
				public void execute(Boolean value) {
					if (value) {
						OauthClient.disAuthenticate();
						Window.open("/oauth.html", "_self", "");
					}
					
				}
			});
			
		}
	});
}
 

开发者ID:WELTEN,
项目名称:dojo-ibl,
代码行数:27,
代码来源:ToolBar.java

示例5: onSelectionChanged

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public void onSelectionChanged(SelectionEvent event) {
	int count = event.getSelection().length;
	if (count == 0) {
		focusButton.setDisabled(true);
		showButton.setDisabled(true);
	} else if (count == 1) {
		focusButton.setDisabled(false);
		showButton.setDisabled(false);
	} else {
		focusButton.setDisabled(false);
		showButton.setDisabled(true);
	}
	for (ToolStripButton button : extraButtons) {
		button.setDisabled(count == 0);
	}
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:17,
代码来源:FeatureListGridTab.java

示例6: getViewPanel

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
/**
 * Get view panel.
 *
 * @return The viewPanel Canvas
 */
public Canvas getViewPanel() {
	VLayout layout = new VLayout(5);
	layout.setPadding(5);

	MapWidget mapWidget = new MapWidget("mapGuwOsm", "appGuw");
	final RibbonBarLayout ribbonBar = new RibbonBarLayout(mapWidget, "appGuw", "guwRibbonBar1");
	ribbonBar.setSize("100%", "94px");

	ToolStrip toolStrip = new ToolStrip();
	toolStrip.setWidth100();
	ToolStripButton btn1 = new ToolStripButton("Toggle group title");
	btn1.addClickHandler(new ClickHandler() {

		public void onClick(ClickEvent event) {
			ribbonBar.setShowGroupTitles(!ribbonBar.isShowGroupTitles());
		}
	});
	toolStrip.addButton(btn1);
	layout.addMember(toolStrip);
	layout.addMember(ribbonBar);
	layout.addMember(mapWidget);
	return layout;
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:29,
代码来源:DefaultRibbonPanel.java

示例7: getViewPanel

点赞 3

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
/**
 * Get view panel.
 *
 * @return The viewPanel Canvas
 */
public Canvas getViewPanel() {
	VLayout layout = new VLayout(5);
	layout.setPadding(5);

	MapWidget mapWidget = new MapWidget("mapGuwWmsCountries", "appGuw");
	final RibbonTabLayout ribbon = new RibbonTabLayout(mapWidget, "appGuw", "guwRibbon1");
	ribbon.setSize("100%", "120px");

	ToolStrip toolStrip = new ToolStrip();
	toolStrip.setWidth100();
	ToolStripButton btn1 = new ToolStripButton("Toggle group title");
	btn1.addClickHandler(new ClickHandler() {

		public void onClick(ClickEvent event) {
			ribbon.getRibbonBar(0).setShowGroupTitles(!ribbon.getRibbonBar(0).isShowGroupTitles());
		}
	});
	toolStrip.addButton(btn1);
	layout.addMember(toolStrip);
	layout.addMember(ribbon);
	layout.addMember(mapWidget);
	return layout;
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:29,
代码来源:TabbedRibbonPanel.java

示例8: getStudioLinkButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getStudioLinkButton() {
    ImageResource imageResource = Images.instance.studio_30();
    String title = "Workflow Studio";
    String url = "/studio";

    return getToolStripButton(imageResource, title, url);
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:8,
代码来源:ToolButtonsRender.java

示例9: getToolStripButtonWithoutBorder

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
private ToolStripButton getToolStripButtonWithoutBorder(ImageResource imageResource, String title,
        final String url) {
    ToolStripButton toolStripButton = getSimpleToolStripButton(imageResource, title);

    toolStripButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            Window.open(url, "", "");
        }
    });
    return toolStripButton;
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:12,
代码来源:ToolButtonsRender.java

示例10: getSchedulerLinkButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getSchedulerLinkButton() {
    return getToolStripButton(Images.instance.scheduler_30(), "Scheduling & Orchestration", "/scheduler");
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:4,
代码来源:ToolButtonsRender.java

示例11: getResourceManagerLinkButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getResourceManagerLinkButton() {
    return getToolStripButton(Images.instance.rm_30(), "Resource Manager", "/rm");
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:4,
代码来源:ToolButtonsRender.java

示例12: getAutomationDashboardLinkButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getAutomationDashboardLinkButton() {
    return getToolStripButton(Images.instance.pca_30(), "Automation Dashboard", "/automation-dashboard");
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:4,
代码来源:ToolButtonsRender.java

示例13: getToolStripButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
private ToolStripButton getToolStripButton(ImageResource imageResource, String title, final String url) {
    ToolStripButton toolStripButton = getToolStripButtonWithoutBorder(imageResource, title, url);

    toolStripButton.setBorder(GREY_BUTTON_BORDER);
    return toolStripButton;
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:7,
代码来源:ToolButtonsRender.java

示例14: getSimpleToolStripButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
private ToolStripButton getSimpleToolStripButton(ImageResource imageResource, String title) {
    ToolStripButton toolStripButton = new ToolStripButton(title);
    toolStripButton.setIcon(imageResource.getSafeUri().asString());
    toolStripButton.setIconSize(25);
    return toolStripButton;
}
 

开发者ID:ow2-proactive,
项目名称:scheduling-portal,
代码行数:7,
代码来源:ToolButtonsRender.java

示例15: getButtonSwitch

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getButtonSwitch() {
    return btnSwitch;
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:4,
代码来源:ListFormItem.java

示例16: setButtonSwitch

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public void setButtonSwitch(ToolStripButton btnSwitch) {
    this.btnSwitch = btnSwitch;
}
 

开发者ID:proarc,
项目名称:proarc,
代码行数:4,
代码来源:ListFormItem.java

示例17: ExtraButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ExtraButton(String idSaveLayerId, ToolStripButton button, int position) {
	this.idSaveLayerId = idSaveLayerId;
	this.button = button;
	this.position = position;
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:6,
代码来源:MultiFeatureListGrid.java

示例18: getButton

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public ToolStripButton getButton() {
	return button;
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:4,
代码来源:MultiFeatureListGrid.java

示例19: MenuBar

点赞 2

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
public MenuBar(GeometryEditor editor) {
	this.editor = editor;
	eventBus = new SimpleEventBus();
	map = editor.getMapWidget();
	setWidth100();
	setHeight(36);

	// Add creation options:
	addMenuButton(getNewGeometryButton());
	addMenuButton(getEditGeometryButton());
	addMenuButton(getInfoButton());
	addSeparator();

	// Add buttons to help the editing process:
	addButton(new CancelEditingBtn(editor.getEditService()));

	UndoBtn undoBtn = new UndoBtn(editor.getEditService());
	addGeometryEditSuspensionHandler(undoBtn);
	addButton(undoBtn);

	RedoBtn redoBtn = new RedoBtn(editor.getEditService());
	addGeometryEditSuspensionHandler(redoBtn);
	addButton(redoBtn);

	SuspendBtn suspendBtn = new SuspendBtn(editor.getEditService());
	addButton(suspendBtn);

	addSeparator();

	AddRingBtn addRingBtn = new AddRingBtn(editor.getEditService());
	addGeometryEditSuspensionHandler(addRingBtn);
	addButton(addRingBtn);
	addButton(new DeleteRingBtn(this, editor.getEditService(), editor.getRenderer()));

	addSeparator();
	ToolStripButton snappingBtn = new ToolStripButton("Snapping options");
	snappingBtn.setHeight(32);
	snappingBtn.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {

		public void onClick(ClickEvent event) {
			if (wnd == null) {
				wnd = new SnappingOptionWindow(MenuBar.this.editor);
			}
			wnd.show();
		}
	});
	addButton(snappingBtn);
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:49,
代码来源:MenuBar.java

示例20: addButton

点赞 1

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
/**
 * Add a button in the tool strip at the requested position.
 *
 * @param layerId layer which needs the extra button
 * @param button button to add
 * @param position position
 */
@Api
public void addButton(String layerId, ToolStripButton button, int position) {
	extraButtons.add(new ExtraButton(constructIdSaveLayerId(layerId), button, position));
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:12,
代码来源:MultiFeatureListGrid.java

示例21: addButton

点赞 1

import com.smartgwt.client.widgets.toolbar.ToolStripButton; //导入依赖的package包/类
/**
 * Add a button in the tool strip at the requested position.
 *
 * @param button button to add
 * @param position position
 */
public void addButton(ToolStripButton button, int position) {
	toolStrip.addButton(button, position);
	extraButtons.add(button);
	button.setDisabled(true);
}
 

开发者ID:geomajas,
项目名称:geomajas-project-client-gwt,
代码行数:12,
代码来源:FeatureListGridTab.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)