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

x33g5p2x  于2022-01-29 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(78)

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

Rectangle.addNodeMouseClickHandler介绍

暂无

代码示例

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

private Rectangle getBoundingImage(final NodeMouseClickHandler clickHandler) {
    final Rectangle bounding = new Rectangle(WIDTH_BOUNDING,
                         HEIGHT_BOUNDING).setX(0).setY(0).setStrokeColor(ColorName.WHITE.getValue());
    bounding.addNodeMouseClickHandler(clickHandler);
    return bounding;
  }
}

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

private Rectangle getBoundingImage(final NodeMouseClickHandler clickHandler) {
    final Rectangle bounding = new Rectangle(WIDTH_BOUNDING,
                         HEIGHT_BOUNDING).setX(0).setY(0).setStrokeColor(ColorName.WHITE.getValue());
    bounding.addNodeMouseClickHandler(clickHandler);
    return bounding;
  }
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts

protected void buildSerieValues(final XYChartSerie serie, int numSerie) {
  List<AxisBuilder.AxisValue> xAxisValues = categoriesAxisBuilder[0].getValues(getData().getCategoryAxisProperty());
  if (xAxisValues != null) {
    List<Rectangle> bars = new LinkedList();
    for (int i = 0; i < xAxisValues.size(); i++) {
      final AxisBuilder.AxisValue axisValue = xAxisValues.get(i);
      Object value = axisValue.getValue();
      final String formattedValue = categoriesAxisBuilder[0].format(value);
      final Rectangle bar = new Rectangle(0,0);
      bar.setID(getBarId(numSerie, i));
      bars.add(bar);
      
      // Click handler (filtering).
      final int row = i;
      bar.addNodeMouseClickHandler(new NodeMouseClickHandler() {
        @Override
        public void onNodeMouseClick(NodeMouseClickEvent event) {
          String columnId = formattedValue;
          BarChart.this.fireEvent(new ValueSelectedEvent(serie.getName(), getData().getCategoryAxisProperty(), row));
        }
      });
      chartArea.add(bar);
    }
    seriesValues.put(serie.getName(), bars);
  }
  
}

代码示例来源:origin: com.ahome-it/lienzo-charts

bar.addNodeMouseClickHandler(new NodeMouseClickHandler()

代码示例来源: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;
}

相关文章

微信公众号

最新文章

更多