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

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

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

Rectangle.getX介绍

暂无

代码示例

代码示例来源:origin: kiegroup/drools-wb

@Override
  public void onNodeDragMove( final NodeDragMoveEvent event ) {
    presenter.onDragVisibleBounds( visibleBounds.getX(),
                    visibleBounds.getY() );
  }
} );

代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client

@Override
  public void onNodeDragMove( final NodeDragMoveEvent event ) {
    presenter.onDragVisibleBounds( visibleBounds.getX(),
                    visibleBounds.getY() );
  }
} );

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

public void setWidth(final double width) {
  rectangle.setWidth(width);
  bounding.setWidth(width + BOUNDARY_SIZE);
  controlPoint2.setX(getX() + rectangle.getX() + width);
  controlPoint4.setX(getX() + rectangle.getX() + width);
  magnet2.setX(getX() + rectangle.getX() + width);
  magnet3.setX(getX() + rectangle.getX() + width / 2);
  magnet4.setX(getX() + rectangle.getX() + width / 2);
}

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

public void setWidth(final double width) {
  rectangle.setWidth(width);
  bounding.setWidth(width + BOUNDARY_SIZE);
  controlPoint2.setX(getX() + rectangle.getX() + width);
  controlPoint4.setX(getX() + rectangle.getX() + width);
  magnet2.setX(getX() + rectangle.getX() + width);
  magnet3.setX(getX() + rectangle.getX() + width / 2);
  magnet4.setX(getX() + rectangle.getX() + width / 2);
}

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

@Override
public boolean contains(final double cx,
            final double cy) {
  final double _x = cx - getX();
  final double _y = cy - getY();
  if (_x < rectangle.getX()) {
    return false;
  } else if (_x > rectangle.getX() + rectangle.getWidth()) {
    return false;
  } else if (_y < rectangle.getY()) {
    return false;
  } else if (_y > rectangle.getY() + rectangle.getHeight()) {
    return false;
  }
  return true;
}

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

@Override
public boolean contains(final double cx,
            final double cy) {
  final double _x = cx - getX();
  final double _y = cy - getY();
  if (_x < rectangle.getX()) {
    return false;
  } else if (_x > rectangle.getX() + rectangle.getWidth()) {
    return false;
  } else if (_y < rectangle.getY()) {
    return false;
  } else if (_y > rectangle.getY() + rectangle.getHeight()) {
    return false;
  }
  return true;
}

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

@Override
public boolean contains(final double cx,
            final double cy) {
  final double _x = cx - getX();
  final double _y = cy - getY();
  if (_x < rectangle.getX()) {
    return false;
  } else if (_x > rectangle.getX() + rectangle.getWidth()) {
    return false;
  } else if (_y < rectangle.getY()) {
    return false;
  } else if (_y > rectangle.getY() + rectangle.getHeight()) {
    return false;
  }
  return true;
}

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

@Override
public boolean contains(final double cx,
            final double cy) {
  final double _x = cx - getX();
  final double _y = cy - getY();
  if (_x < rectangle.getX()) {
    return false;
  } else if (_x > rectangle.getX() + rectangle.getWidth()) {
    return false;
  } else if (_y < rectangle.getY()) {
    return false;
  } else if (_y > rectangle.getY() + rectangle.getHeight()) {
    return false;
  }
  return true;
}

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

public EditableBayesianNode(final Rectangle shape) {
  this(shape.getWidth(),
     shape.getHeight(),
     shape.getX(),
     shape.getY(),
     BayesianUtils.getNodeColors()[0][0]);
}

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

public EditableBayesianNode(final Rectangle shape) {
  this(shape.getWidth(),
     shape.getHeight(),
     shape.getX(),
     shape.getY(),
     BayesianUtils.getNodeColors()[0][0]);
}

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event) {
    double x = barObject.getX();
    double y = barObject.getY();
    double width = barObject.getWidth();
    double height = barObject.getHeight();
    double xTooltip = x + width;
    double yTooltip = y + height/2;
    seriesValuesAlpha(numSerie, numValue, 0.5d);
    tooltip.setX(xTooltip).setY(yTooltip);
    tooltip.show(yValueFormatted, xValueFormatted);
  }
});

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event) {
    double x = barObject.getX();
    double y = barObject.getY();
    double width = barObject.getWidth();
    double height = barObject.getHeight();
    double xTooltip = x + width/2;
    double yTooltip = y - BarChartTooltip.TRIANGLE_SIZE;
    seriesValuesAlpha(numSerie, numValue, 0.5d);
    tooltip.setX(xTooltip).setY(yTooltip);
    tooltip.show(xValueFormatted, yValueFormatted);
  }
});

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event)
  {
    double x = bar.getX();
    double y = bar.getY();
    double width = bar.getWidth();
    double height = bar.getHeight();
    double xTooltip = isVertical() ? x + width / 2 : x + width;
    double yTooltip = isVertical() ? y - XYChartTooltip.TRIANGLE_SIZE : y + height / 2;
    seriesValuesAlpha(numSeries, numValue, 0.5d);
    tooltip.setX(xTooltip).setY(yTooltip);
    tooltip.show(xValueFormatted, yValueFormatted);
  }
});

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

private void setHeader(BayesVariable node,
            EditableBayesianNode bayesianNode) {
  bayesianNode.setHeader(new Rectangle(bayesianNode.getWidth(),
                     BayesianUtils.HEIGHT_HEADER));
  bayesianNode.getHeader().setFillColor(colors[0][1]);
  bayesianNode.getHeader().setX(bayesianNode.getHeader().getX());
  bayesianNode.setTextHeader(drawText(node.getName(),
                    BayesianUtils.FONT_SIZE_HEADER_NODE,
                    BayesianUtils.LABEL_POSITION_X_DEFAULT,
                    BayesianUtils.LABEL_POSITION_Y_DEFAULT));
}

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

private void setHeader(BayesVariable node,
            EditableBayesianNode bayesianNode) {
  bayesianNode.setHeader(new Rectangle(bayesianNode.getWidth(),
                     BayesianUtils.HEIGHT_HEADER));
  bayesianNode.getHeader().setFillColor(colors[0][1]);
  bayesianNode.getHeader().setX(bayesianNode.getHeader().getX());
  bayesianNode.setTextHeader(drawText(node.getName(),
                    BayesianUtils.FONT_SIZE_HEADER_NODE,
                    BayesianUtils.LABEL_POSITION_X_DEFAULT,
                    BayesianUtils.LABEL_POSITION_Y_DEFAULT));
}

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

@Override
  public void onMove(double x,
            double y) {
    controlPoint1.setX(controlPoint3.getX());
    controlPoint4.setY(controlPoint3.getY());
    rectangle.setX(x - getX());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setX(rectangle.getX() - (BOUNDARY_SIZE / 2));
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

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

@Override
  public void onMove(double x,
            double y) {
    controlPoint1.setX(controlPoint3.getX());
    controlPoint4.setY(controlPoint3.getY());
    rectangle.setX(x - getX());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setX(rectangle.getX() - (BOUNDARY_SIZE / 2));
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

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

@Override
  public void onMove(final double x,
            final double y) {
    controlPoint2.setY(controlPoint1.getY());
    controlPoint3.setX(controlPoint1.getX());
    rectangle.setX(x - getX());
    rectangle.setY(y - getY());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setX(rectangle.getX() - (BOUNDARY_SIZE / 2));
    bounding.setY(rectangle.getY() - (BOUNDARY_SIZE / 2));
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

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

@Override
  public void onMove(final double x,
            final double y) {
    controlPoint2.setY(controlPoint1.getY());
    controlPoint3.setX(controlPoint1.getX());
    rectangle.setX(x - getX());
    rectangle.setY(y - getY());
    rectangle.setWidth(controlPoint2.getX() - controlPoint1.getX());
    rectangle.setHeight(controlPoint3.getY() - controlPoint1.getY());
    bounding.setX(rectangle.getX() - (BOUNDARY_SIZE / 2));
    bounding.setY(rectangle.getY() - (BOUNDARY_SIZE / 2));
    bounding.setWidth(rectangle.getWidth() + BOUNDARY_SIZE);
    bounding.setHeight(rectangle.getHeight() + BOUNDARY_SIZE);
  }
}

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

public PieChartTooltip show(final double x, final double y)
{
  this.categoriesText.setText(_categoriesText);
  BoundingBox bb = categoriesText.getBoundingBox();
  final double ctw = bb.getWidth();
  final double cth = bb.getHeight();
  this.valuesText.setText(_valuesText);
  bb = valuesText.getBoundingBox();
  final double vtw = bb.getWidth();
  final double vth = bb.getHeight();
  final double rw = (ctw > vtw ? ctw : vtw) + TOOLTIP_PADDING_WIDTH;
  final double rh = (cth + vth) + TOOLTIP_PADDING_HEIGHT;
  rectangle.setWidth(rw).setHeight(rh).setCornerRadius(5);
  final double rx = rectangle.getX();
  final double ry = rectangle.getY();
  triangle.setPoints(new Point2D(rx + rw / 2 - TRIANGLE_SIZE, ry + rh), new Point2D(rx + rw / 2, rh + TRIANGLE_SIZE), new Point2D(rx + rw / 2 + TRIANGLE_SIZE, ry + rh));
  tmasking.setPoints(new Point2D(rx + rw / 2 - TRIANGLE_SIZE - 3, ry + rh - 3), new Point2D(rx + rw / 2, rh + TRIANGLE_SIZE - 3), new Point2D(rx + rw / 2 + TRIANGLE_SIZE + 3, ry + rh - 3));
  final double vtx = rw / 2 - vtw / 2;
  final double ctx = rw / 2 - ctw / 2;
  final double vty = rh / 2 - vth / 2;
  final double cty = vty + cth + 1;
  this.categoriesText.setX(ctx).setY(cty);
  this.valuesText.setX(vtx).setY(vty);
  setX(x - rw / 2);
  setY(y - rh);
  moveToTop();
  setVisible(true);
  getLayer().batch();
  return this;
}

相关文章