本文整理汇总了Java中com.vaadin.ui.renderers.ClickableRenderer类的典型用法代码示例。如果您正苦于以下问题:Java ClickableRenderer类的具体用法?Java ClickableRenderer怎么用?Java ClickableRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClickableRenderer类属于com.vaadin.ui.renderers包,在下文中一共展示了ClickableRenderer类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addTestColumnButton
import com.vaadin.ui.renderers.ClickableRenderer; //导入依赖的package包/类
/**
* 添加按钮列
* @param pId
*/
private void addTestColumnButton(String pId) {
Grid.Column column = grid.addColumn(pId,String.class);
column.setWidth(100d);
column.setRenderer(new ButtonRenderer((ClickableRenderer.RendererClickListener) rendererClickEvent -> {
Object itemId = rendererClickEvent.getItemId();
Item item = grid.getContainerDataSource().getItem(itemId);
String ip = (String) item.getItemProperty("IP").getValue();
String port = (String) item.getItemProperty("端口").getValue();
boolean isConnected = DubboSwitchTool.isConnected(ip + ":" + port);
if (isConnected) {
Notification.show("连接成功!",Notification.Type.HUMANIZED_MESSAGE);
return;
}
Notification.show("连接失败!",Notification.Type.ERROR_MESSAGE);
}));
}
开发者ID:xburning,项目名称:dubbo-switch,代码行数:21,代码来源:ZookeeperConsumerManageUI.java
示例2: addColumnButton
import com.vaadin.ui.renderers.ClickableRenderer; //导入依赖的package包/类
/**
* 添加按钮列
* @param pId
*/
private void addColumnButton(String pId) {
Grid.Column column = grid.addColumn(pId,String.class);
column.setWidth(100d);
column.setRenderer(new ButtonRenderer((ClickableRenderer.RendererClickListener) rendererClickEvent -> {
Object itemId = rendererClickEvent.getItemId();
Item item = grid.getContainerDataSource().getItem(itemId);
Long appId = (Long) item.getItemProperty("序号").getValue();
String appName = (String) item.getItemProperty("应用名称").getValue();
if ("清理".equals(pId)) {
zookeeperAppClearUI.show(appId,appName);
UI.getCurrent().addWindow(zookeeperAppClearUI);
} else if ("切换".equals(pId)) {
zookeeperAppSwitchUI.show(appId,appName);
UI.getCurrent().addWindow(zookeeperAppSwitchUI);
}
}));
}
开发者ID:xburning,项目名称:dubbo-switch,代码行数:22,代码来源:ZookeeperAppManageUI.java
示例3: getCityClickListener
import com.vaadin.ui.renderers.ClickableRenderer; //导入依赖的package包/类
/**
* Listener which determines what happens when a city is clicked upon.
*/
private ClickableRenderer.RendererClickListener<DemoPerson> getCityClickListener() {
return (ClickableRenderer.RendererClickEvent<DemoPerson> event) -> {
DemoPerson rowClicked = event.getItem();
Notification.show("You clicked",
"A city : " + rowClicked.getCity(),
Notification.Type.HUMANIZED_MESSAGE);
};
}
开发者ID:phansson,项目名称:vaadin-clickabletextrenderer-v8,代码行数:13,代码来源:DemoUI.java
示例4: getCompanyClickListener
import com.vaadin.ui.renderers.ClickableRenderer; //导入依赖的package包/类
/**
* Listener which determines what happens when a company is clicked upon.
*/
private ClickableRenderer.RendererClickListener<DemoPerson> getCompanyClickListener() {
return (ClickableRenderer.RendererClickEvent<DemoPerson> event) -> {
DemoPerson rowClicked = event.getItem();
Notification.show("You clicked",
"A company : " + rowClicked.getCompany(),
Notification.Type.HUMANIZED_MESSAGE);
};
}
开发者ID:phansson,项目名称:vaadin-clickabletextrenderer-v8,代码行数:13,代码来源:DemoUI.java
示例5: addViewColumnButton
import com.vaadin.ui.renderers.ClickableRenderer; //导入依赖的package包/类
/**
* 添加查看列
* @param pId
*/
private void addViewColumnButton(String pId) {
Grid.Column column = grid.addColumn(pId, String.class);
column.setWidth(100d);
column.setRenderer(new ButtonRenderer((ClickableRenderer.RendererClickListener) rendererClickEvent -> {
Object itemId = rendererClickEvent.getItemId();
Item item = grid.getContainerDataSource().getItem(itemId);
String appName = (String) item.getItemProperty("应用名称").getValue();
zookeeperAppViewUI.show(appName);
UI.getCurrent().addWindow(zookeeperAppViewUI);
}));
}
开发者ID:xburning,项目名称:dubbo-switch,代码行数:16,代码来源:ZookeeperAppManageUI.java
示例6: createClickListenerWrapper
import com.vaadin.ui.renderers.ClickableRenderer; //导入依赖的package包/类
protected ClickableRenderer.RendererClickListener createClickListenerWrapper(DataGrid.RendererClickListener listener) {
return (ClickableRenderer.RendererClickListener) e -> {
DataGrid.Column column = getColumnByGridColumn(e.getColumn());
DataGrid.RendererClickEvent event = new DataGrid.RendererClickEvent(
getDataGrid(), WebWrapperUtils.toMouseEventDetails(e), e.getItemId(), column.getId());
listener.onClick(event);
};
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:9,代码来源:WebAbstractClickableRenderer.java
注:本文中的com.vaadin.ui.renderers.ClickableRenderer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论