com.ait.lienzo.client.core.shape.Text.addNodeMouseClickHandler()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中com.ait.lienzo.client.core.shape.Text.addNodeMouseClickHandler()方法的一些代码示例,展示了Text.addNodeMouseClickHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.addNodeMouseClickHandler()方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Text
类名称:Text
方法名:addNodeMouseClickHandler

Text.addNodeMouseClickHandler介绍

暂无

代码示例

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo

private void registerClickHandler() {
  HandlerRegistration registration = text.addNodeMouseClickHandler(event -> {
    if (null != textClickEventViewHandler) {
      eventHandlerManager.get().skipClickHandler();
      final TextClickEvent e = new TextClickEvent(event.getX(),
                            event.getY(),
                            event.getMouseEvent().getClientX(),
                            event.getMouseEvent().getClientY());
      textClickEventViewHandler.handle(e);
      eventHandlerManager.get().restoreClickHandler();
    }
  });
  eventHandlerManager.get().addHandlersRegistration(ViewEventType.TEXT_CLICK,
                           registration);
}

代码示例来源:origin: kiegroup/appformer

public TemplateShape build(final String templateName,
              final NodeMouseClickHandler clickHandler) {
  final TemplateShape templateShape = new TemplateShape();
  final Shape shape = drawShape();
  final Rectangle bounding = drawBoundingBox();
  final Text description = drawDescription(templateName);
  //Attach handles for drag operation
  shape.addNodeMouseClickHandler(clickHandler);
  bounding.addNodeMouseClickHandler(clickHandler);
  description.addNodeMouseClickHandler(clickHandler);
  //Build Template Shape
  templateShape.setBounding(bounding);
  templateShape.setShape(shape);
  templateShape.setDescription(description);
  return templateShape;
}

代码示例来源:origin: org.uberfire/uberfire-wires-bayesian-network-client

public TemplateShape build(final String templateName,
              final NodeMouseClickHandler clickHandler) {
  final TemplateShape templateShape = new TemplateShape();
  final Shape shape = drawShape();
  final Rectangle bounding = drawBoundingBox();
  final Text description = drawDescription(templateName);
  //Attach handles for drag operation
  shape.addNodeMouseClickHandler(clickHandler);
  bounding.addNodeMouseClickHandler(clickHandler);
  description.addNodeMouseClickHandler(clickHandler);
  //Build Template Shape
  templateShape.setBounding(bounding);
  templateShape.setShape(shape);
  templateShape.setDescription(description);
  return templateShape;
}

相关文章

微信公众号

最新文章

更多