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

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

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

Text.moveToTop介绍

暂无

代码示例

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

private static void showSizeText(final Text text, final double w, final double h)
{
  final String _t = buildSizeText(w, h);
  text.setText(_t);
  final double tw = text.getBoundingBox().getWidth();
  final double th = text.getBoundingBox().getHeight();
  final double tx = w / 2 - tw / 2;
  final double ty = h / 2 - th / 2;
  text.setX(tx).setY(ty).moveToTop();
}

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

protected IPrimitive build() {
  rectangle = new Rectangle(1,1).setFillColor(TOOLTIP_COLOR).setCornerRadius(30);
  triangle = new Triangle(new Point2D(1,1),new Point2D(1,1),new Point2D(1,1)).setFillColor(TOOLTIP_COLOR);
  categoriesText = new Text("", FONT_FAMILY, CATEGORIES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.TOP);
  valuesText = new Text("", FONT_FAMILY, VALUES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.TOP);
  add(rectangle);
  add(triangle);
  add(categoriesText);
  add(valuesText);
  categoriesText.moveToTop();
  valuesText.moveToTop();
  setVisible(false);
  return this;
  
}

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

protected IPrimitive build() {
  rectangle = new Rectangle(1,1).setFillColor(TOOLTIP_COLOR).setCornerRadius(30);
  triangle = new Triangle(new Point2D(1,1),new Point2D(1,1),new Point2D(1,1)).setFillColor(TOOLTIP_COLOR);
  categoriesText = new Text("", FONT_FAMILY, CATEGORIES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.TOP);
  valuesText = new Text("", FONT_FAMILY, VALUES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.TOP);
  add(rectangle);
  add(triangle);
  add(categoriesText);
  add(valuesText);
  categoriesText.moveToTop();
  valuesText.moveToTop();
  setVisible(false);
  return this;
  
}

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

protected PieChartTooltip build()
{
  rectangle = new Rectangle(1, 1).setFillColor(TOOLTIP_COLOR).setCornerRadius(5).setStrokeWidth(1).setShadow(SHADOW);
  triangle = new Triangle(new Point2D(1, 1), new Point2D(1, 1), new Point2D(1, 1)).setFillColor(TOOLTIP_COLOR).setStrokeWidth(1).setShadow(SHADOW);
  tmasking = new Triangle(new Point2D(1, 1), new Point2D(1, 1), new Point2D(1, 1)).setFillColor(TOOLTIP_COLOR);
  categoriesText = new Text("", FONT_FAMILY, CATEGORIES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.MIDDLE);
  valuesText = new Text("", FONT_FAMILY, VALUES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.MIDDLE);
  add(rectangle);
  add(triangle);
  add(tmasking);
  add(categoriesText);
  add(valuesText);
  categoriesText.moveToTop();
  valuesText.moveToTop();
  setVisible(false);
  setListening(false);
  return this;
}

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

protected XYChartTooltip build()
{
  rectangle = new Rectangle(1, 1).setFillColor(TOOLTIP_COLOR).setCornerRadius(5).setStrokeWidth(1).setShadow(SHADOW);
  triangle = new Triangle(new Point2D(1, 1), new Point2D(1, 1), new Point2D(1, 1)).setFillColor(TOOLTIP_COLOR).setStrokeWidth(1).setShadow(SHADOW);
  tmasking = new Triangle(new Point2D(1, 1), new Point2D(1, 1), new Point2D(1, 1)).setFillColor(TOOLTIP_COLOR);
  categoriesText = new Text("", FONT_FAMILY, CATEGORIES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.MIDDLE);
  valuesText = new Text("", FONT_FAMILY, VALUES_FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.MIDDLE);
  add(rectangle);
  add(triangle);
  add(tmasking);
  add(categoriesText);
  add(valuesText);
  categoriesText.moveToTop();
  valuesText.moveToTop();
  setVisible(false);
  setListening(false);
  return this;
}

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

descText.setY(_y + descTextBbH);
descText.moveToTop();
canvasLayer.draw();
startTimers();

相关文章