本文整理汇总了Java中com.smartgwt.client.widgets.events.ClickHandler类的典型用法代码示例。如果您正苦于以下问题:Java ClickHandler类的具体用法?Java ClickHandler怎么用?Java ClickHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClickHandler类属于com.smartgwt.client.widgets.events包,在下文中一共展示了ClickHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: DisMaDesc
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public DisMaDesc(MarkerManagement markerManagement,
AMarker parentMarker, String htmlDescription) {
super(parentMarker, htmlDescription, "2px solid Grey");
VLayout reactivateVL = new VLayout();
reactivateVL.setWidth100();
reactivateVL.addMember(new ClickableLabel("Reaktivieren", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
DisMaDesc.this.parentMarker.changeState(MarkerState.ACTIVE);
}
}));
this.addMember(reactivateVL);
}
开发者ID:UKPLab,项目名称:naacl-bea2016-writing-study,代码行数:17,代码来源:DisMaDesc.java
示例2: loadRemoteHint
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
private void loadRemoteHint(final RemoteHint hint, final ListGridRecord rec) {
String taskId = rec.getAttributeAsString(TasksColumnsFactory.ID_ATTR.getName());
String jobId = this.controller.getModel()
.getParentModel()
.getExecutionsModel()
.getJobsModel()
.getSelectedJob()
.getId()
.toString();
final String taskName = rec.getAttributeAsString(NAME_ATTR.getName());
if (taskId.equals(hint.taskId) && jobId.equals(hint.jobId)) {
ImgButton button = visuButtons.get(taskId);
button.setSrc(SchedulerImages.instance.visu_16().getSafeUri().asString());
if (visuButtonsClickHandlers.containsKey(button)) {
visuButtonsClickHandlers.get(button).removeHandler();
}
HandlerRegistration clickHandler = button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
showRemoteVisuChoices(hint, taskName);
}
});
visuButtonsClickHandlers.put(button, clickHandler);
}
}
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:25,代码来源:TasksListGrid.java
示例3: downloadUsageData
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
private ClickHandler downloadUsageData() {
return new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
String from = DATE_FORMAT.format(readDateFromFormItem(datesForm.getItem("From")));
String to = DATE_FORMAT.format(readDateFromFormItem(datesForm.getItem("To")));
String url = GWT.getModuleBaseURL() + "usageexporter";
url += "?sessionId=" + LoginModel.getInstance().getSessionId();
url += "&user=" + userSelect.getValue().toString();
url += "&startDate=" + URL.encodeQueryString(from);
url += "&endDate=" + URL.encodeQueryString(to);
Window.open(url, "_blank", "");
}
};
}
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:17,代码来源:UsageView.java
示例4: getLogoutButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的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
示例5: asToolStripButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的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
示例6: createButtons
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
private Canvas createButtons() {
IButton btnSubmit = new IButton(i18nSgwt.dialog_LoginButtonTitle(), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
submitCredentials();
}
});
HStack btnLayout = new HStack(5);
btnLayout.setAutoHeight();
btnLayout.setLayoutTopMargin(20);
btnLayout.setLayoutAlign(Alignment.CENTER);
btnLayout.setMembers(btnSubmit);
return btnLayout;
}
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:LoginWindow.java
示例7: createToolbar
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
private ToolStrip createToolbar() {
ToolStrip toolbar = Actions.createToolStrip();
IconButton btnFilter = new IconButton();
btnFilter.setActionType(SelectionType.CHECKBOX);
btnFilter.setIcon("[SKIN]/actions/filter.png");
btnFilter.setTitle(i18n.DigitalObjectSearchView_FilterButton_Title());
btnFilter.setTooltip(i18n.DigitalObjectSearchView_FilterButton_Hint());
btnFilter.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (filters.isVisible()) {
filters.hide();
} else {
filters.show();
}
}
});
btnFilter.setSelected(filters.isVisible());
toolbar.addMember(btnFilter);
return toolbar;
}
开发者ID:proarc,项目名称:proarc,代码行数:25,代码来源:DigitalObjectSearchView.java
示例8: createButtons
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public void createButtons() {
final IButton createRunButton = new IButton("Create Run");
final IButton copyButton = new IButton("Copy Game");
buttonLayout = new HLayout();
buttonLayout.setAlign(Alignment.CENTER);
buttonLayout.setLayoutMargin(6);
buttonLayout.setMembersMargin(6);
buttonLayout.setHeight(30);
buttonLayout.addMember(createRunButton);
buttonLayout.addMember(copyButton);
createRunButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
}
});
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:19,代码来源:GameDisplay.java
示例9: createButtonLayout
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
private void createButtonLayout() {
final IButton addRoles = new IButton("Add roles");
buttonLayout = new HLayout();
buttonLayout.setAlign(Alignment.CENTER);
buttonLayout.setLayoutMargin(6);
buttonLayout.setMembersMargin(6);
buttonLayout.addMember(addRoles);
addRoles.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
addRoles.setDisabled(true);
selectedRoles = roleSelect.getValues();
RoleWindow.this.destroy();
proceedToRunCreation();
}
});
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:20,代码来源:RegisterForGame.java
示例10: createHomeButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的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
示例11: createProfileButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的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
示例12: ImageWidget
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
/**
*
* @param imageInfo
*/
public ImageWidget(final ImageInfo imageInfo) {
setShowEdges(true);
setDefaultLayoutAlign(Alignment.CENTER);
image = new Img();
UrlBuilder url = new UrlBuilder(Geomajas.getDispatcherUrl() + imageInfo.getUrl());
image.setSrc(url.toString());
image.setAltText(imageInfo.getAlt());
image.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
com.google.gwt.user.client.Window.open(imageInfo.getHref(), "_blank", "");
}
});
// centralize
image.setImageType(ImageStyle.CENTER);
image.setWidth(imageInfo.getWidth());
image.setHeight(imageInfo.getHeight());
addMember(image);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:25,代码来源:ImageWidget.java
示例13: LayerTreeButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public LayerTreeButton(final CombinedLayertree tree, final LayerTreeAction action) {
super();
this.tree = tree;
this.action = action;
setWidth(GltLayout.layerTreeButtonSize);
setHeight(GltLayout.layerTreeButtonSize);
setIconSize(GltLayout.layerTreeButtonSize - 8);
setIcon(action.getIcon());
setTooltip(action.getTooltip());
setActionType(SelectionType.BUTTON);
setShowDisabledIcon(false);
addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
try {
action.onClick(tree.rollOverLayerTreeNode.getLayer());
update();
} catch (Throwable t) {
GWT.log("LayerTreeButton onClick error", t);
}
}
});
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:24,代码来源:CombinedLayertree.java
示例14: getViewPanel
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的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
示例15: getViewPanel
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的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
示例16: CancelMergeProcessButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public CancelMergeProcessButton(final MapWidget mapWidget, final GeometryMergeService service) {
setIcon("[ISOMORPHIC]/geomajas/silk/cancel.png");
setDisabled(true);
setHoverWidth(400);
setTooltip("Cancel the merging process. This will also clear the selection on the map.");
addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
try {
mapWidget.getMapModel().clearSelectedFeatures();
service.cancel();
} catch (GeometryMergeException e) {
Window.alert(e.getMessage());
}
}
});
service.addGeometryMergeStartHandler(this);
service.addGeometryMergeStopHandler(this);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:20,代码来源:CancelMergeProcessButton.java
示例17: CancelSplitProcessButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public CancelSplitProcessButton(final GeometrySplitService service) {
setIcon("[ISOMORPHIC]/geomajas/silk/cancel.png");
setIconSize(24);
setHeight(32);
setDisabled(true);
setHoverWrap(false);
setTooltip("Cancel the splitting process. Nothing will be saved.");
addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
service.stop(null);
}
});
service.addGeometrySplitStartHandler(this);
service.addGeometrySplitStopHandler(this);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:17,代码来源:CancelSplitProcessButton.java
示例18: SplitCountryButton
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public SplitCountryButton(final GeometrySplitService service, final MapWidget mapWidget) {
this.service = service;
this.mapWidget = mapWidget;
setHoverWidth(300);
setTitle("Start splitting process");
setTooltip("Select a country on the map. Then draw a splitting line.");
setIconSize(24);
setHeight(32);
addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
previousController = mapWidget.getController();
mapWidget.setController(new SelectForSplitController(mapWidget));
}
});
mapWidget.getMapModel().addFeatureSelectionHandler(this);
service.addGeometrySplitStartHandler(this);
service.addGeometrySplitStopHandler(this);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:23,代码来源:SplitCountryButton.java
示例19: SuspendBtn
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public SuspendBtn(final GeometryEditService service) {
setIcon("[ISOMORPHIC]/geomajas/silk/control_pause.png");
setIconSize(24);
setHeight(32);
setDisabled(true);
setHoverWrap(false);
setTooltip("Suspend the editing process");
addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (service.isStarted() && !service.isSuspended()) {
service.suspend();
setIcon("[ISOMORPHIC]/geomajas/silk/control_play.png");
setTooltip("Resume the editing process");
} else if (service.isSuspended()) {
service.resume();
setIcon("[ISOMORPHIC]/geomajas/silk/control_pause.png");
setTooltip("Suspend the editing process");
}
}
});
service.addGeometryEditStartHandler(this);
service.addGeometryEditStopHandler(this);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:25,代码来源:SuspendBtn.java
示例20: CancelEditingBtn
import com.smartgwt.client.widgets.events.ClickHandler; //导入依赖的package包/类
public CancelEditingBtn(final GeometryEditService service) {
setIcon("[ISOMORPHIC]/geomajas/silk/cancel.png");
setIconSize(24);
setHeight(32);
setDisabled(true);
setHoverWidth(400);
setTooltip("Cancel the editing process. This will undo all operations - nothing will be saved.");
addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
service.stop();
}
});
service.addGeometryEditStartHandler(this);
service.addGeometryEditStopHandler(this);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:17,代码来源:CancelEditingBtn.java
注:本文中的com.smartgwt.client.widgets.events.ClickHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论