本文整理汇总了Java中com.vaadin.client.MouseEventDetailsBuilder.buildMouseEventDetails方法的典型用法代码示例。如果您正苦于以下问题:Java MouseEventDetailsBuilder.buildMouseEventDetails方法的具体用法?Java MouseEventDetailsBuilder.buildMouseEventDetails怎么用?Java MouseEventDetailsBuilder.buildMouseEventDetails使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.client.MouseEventDetailsBuilder
的用法示例。
在下文中一共展示了MouseEventDetailsBuilder.buildMouseEventDetails方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClick
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
public void onClick(final ClickEvent event) {
final MouseEventDetails mouseDetails = MouseEventDetailsBuilder
.buildMouseEventDetails(event.getNativeEvent(), getWidget()
.getElement());
rpc.clicked(mouseDetails);
if (!mouseDetails.isCtrlKey() && !mouseDetails.isAltKey()
&& !mouseDetails.isShiftKey() && !mouseDetails.isMetaKey()) {
// RPC gets lost if we don't delay
event.preventDefault();
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
getWidget().onClick(mouseDetails);
}
});
}
}
示例2: onClick
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
@Override
public void onClick(NativeEvent event) {
Element e = Element.as(event.getEventTarget());
String nodeId = getWidget().getNodeId(e.getParentElement());
MouseEventDetails details = MouseEventDetailsBuilder
.buildMouseEventDetails(event, getWidget().getElement());
rpc.nodeClicked(nodeId, details);
event.stopPropagation();
event.preventDefault();
}
示例3: contextHelpIconClick
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
@Override
public void contextHelpIconClick(NativeEvent event) {
MouseEventDetails details = MouseEventDetailsBuilder
.buildMouseEventDetails(event, getWidget().getElement());
getRpcProxy(HasContextHelpServerRpc.class).iconClick(details);
}
示例4: stepClicked
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
@Override
public void stepClicked(String stepUid, NativeEvent event, Element relativeToElement) {
MouseEventDetails details = MouseEventDetailsBuilder.buildMouseEventDetails(event, relativeToElement);
rpc.stepClicked(stepUid, details);
}
示例5: onMove
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
@Override
public void onMove(String stepUid, String newStepUid, long startDate, long endDate, NativeEvent event,
Element relativeToElement) {
MouseEventDetails details = MouseEventDetailsBuilder.buildMouseEventDetails(event, relativeToElement);
rpc.onMove(stepUid, newStepUid, startDate, endDate, details);
}
示例6: onResize
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
@Override
public void onResize(String stepUid, long startDate, long endDate, NativeEvent event,
Element relativeToElement) {
MouseEventDetails details = MouseEventDetailsBuilder.buildMouseEventDetails(event, relativeToElement);
rpc.onResize(stepUid, startDate, endDate, details);
}
示例7: getMouseEventDetails
import com.vaadin.client.MouseEventDetailsBuilder; //导入方法依赖的package包/类
/**
* Gets a {@link MouseEventDetails} object from native mouse event.
*
* @param event
* native mouse event
* @return mouse event details
*/
protected MouseEventDetails getMouseEventDetails(NativeEvent event) {
return MouseEventDetailsBuilder.buildMouseEventDetails(event);
}