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

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

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

Text.setX介绍

暂无

代码示例

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

public void setTitleXOffsetPosition(final double xOffset) {
  this.text.setX(xOffset);
}

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

protected void doAnimateChartTitle(final Text chartTitle, final Double x, final Double y)
{
  chartTitle.setX(x).setY(y);
}

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

protected Text drawText(final String description,
              final int fontSize,
              final int positionX,
              final int positionY) {
    return new Text(description,
            "Times",
            fontSize).setX(positionX).setY(positionY);
  }
}

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

protected Text drawText(final String description,
              final int fontSize,
              final int positionX,
              final int positionY) {
    return new Text(description,
            "Times",
            fontSize).setX(positionX).setY(positionY);
  }
}

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

/**
 * Constructor for the widget.
 * @param cellWidth Width of the containing cell.
 * @param cellHeight Height of the containing cell.
 * @param isGrouped true is the cell is collapsed.
 */
@SuppressWarnings("unused")
public GroupingToggle(final double cellWidth,
           final double cellHeight,
           final boolean isGrouped) {
  toggle.setText(isGrouped ? TOGGLE_ICON_EXPAND : TOGGLE_ICON_COLLAPSE);
  toggle.setX(cellWidth - TOGGLE_FONT_SIZE - PADDING);
  toggle.setY(TOGGLE_FONT_SIZE + PADDING);
  add(toggle);
}

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

/**
 * Constructor for the widget.
 * @param cellWidth Width of the containing cell.
 * @param cellHeight Height of the containing cell.
 * @param isGrouped true is the cell is collapsed.
 */
@SuppressWarnings("unused")
public GroupingToggle(final double cellWidth,
           final double cellHeight,
           final boolean isGrouped) {
  toggle.setText(isGrouped ? TOGGLE_ICON_EXPAND : TOGGLE_ICON_COLLAPSE);
  toggle.setX(cellWidth - TOGGLE_FONT_SIZE - PADDING);
  toggle.setY(TOGGLE_FONT_SIZE + PADDING);
  add(toggle);
}

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

private Text drawDescription(final String templateName) {
    Text text = new Text(templateName,
               ShapeFactoryUtil.FONT_FAMILY_DESCRIPTION,
               ShapeFactoryUtil.FONT_SIZE_DESCRIPTION);
    text.setFillColor(ShapeFactoryUtil.RGB_TEXT_DESCRIPTION);
    text.setTextBaseLine(TextBaseLine.MIDDLE);
    text.setX(30);
    text.setY(10);
    return text;
  }
}

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

private Text drawDescription(final String description) {
    Text text = new Text(description,
               ShapeFactoryUtil.FONT_FAMILY_DESCRIPTION,
               ShapeFactoryUtil.FONT_SIZE_DESCRIPTION);
    text.setFillColor(ShapeFactoryUtil.RGB_TEXT_DESCRIPTION);
    text.setTextBaseLine(TextBaseLine.MIDDLE);
    text.setX(40);
    text.setY(15);
    return text;
  }
}

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

private Text drawDescription(final String description) {
    Text text = new Text(description,
               ShapeFactoryUtil.FONT_FAMILY_DESCRIPTION,
               ShapeFactoryUtil.FONT_SIZE_DESCRIPTION);
    text.setFillColor(ShapeFactoryUtil.RGB_TEXT_DESCRIPTION);
    text.setTextBaseLine(TextBaseLine.MIDDLE);
    text.setX(40);
    text.setY(15);
    return text;
  }
}

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

private Text drawDescription(final String templateName) {
    Text text = new Text(templateName,
               ShapeFactoryUtil.FONT_FAMILY_DESCRIPTION,
               ShapeFactoryUtil.FONT_SIZE_DESCRIPTION);
    text.setFillColor(ShapeFactoryUtil.RGB_TEXT_DESCRIPTION);
    text.setTextBaseLine(TextBaseLine.MIDDLE);
    text.setX(30);
    text.setY(10);
    return text;
  }
}

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

private static Group getExpressionText(final GridRendererTheme theme,
                    final String text) {
  final Group g = GWT.create(Group.class);
  final Text t = makeExpressionText(theme);
  t.setText(text);
  t.setListening(false);
  t.setX(EXPRESSION_TEXT_PADDING);
  t.setY(EXPRESSION_TEXT_PADDING);
  t.setTextAlign(TextAlign.LEFT);
  t.setWrapper(new TextLineBreakWrap(t));
  g.add(t);
  return g;
}

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

private ChartLegend buildVertical() {
  
  // Build legend entries.
  for (int x = 0; x < entries.size(); x++) {
    final ChartLegendEntry serie = entries.get(x);
    final double legendX = 0;
    final double legendY = 30 + (LEGEND_HEIGHT_SEPARATION * x ) + (LEGEND_RECTANGLE_HEIGHT * x);
    final Rectangle rectangle = new Rectangle(LEGEND_RECTANGLE_WIDTH,LEGEND_RECTANGLE_HEIGHT).setX(legendX).setY(legendY).setFillColor(serie.getColor());
    final Text text = new Text(serie.getName(), FONT_FAMILY, FONT_STYLE, FONT_SIZE).setFillColor(ColorName.BLACK).setX(legendX + LEGEND_RECTANGLE_WIDTH + 10).setY(legendY + (LEGEND_HEIGHT_SEPARATION / 2)).setTextBaseLine(TextBaseLine.MIDDLE);
    add(rectangle);
    add(text);
  }
  return this;
}

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

private ChartLegend buildVertical()
{
  // Build legend entries.
  for (int x = 0; x < entries.size(); x++)
  {
    final ChartLegendEntry serie = entries.get(x);
    final double legendX = 0;
    final double legendY = 30 + (LEGEND_HEIGHT_SEPARATION * x) + (LEGEND_RECTANGLE_HEIGHT * x);
    final Rectangle rectangle = new Rectangle(LEGEND_RECTANGLE_WIDTH, LEGEND_RECTANGLE_HEIGHT).setX(legendX).setY(legendY).setFillColor(serie.getColor());
    final Text text = new Text(serie.getName(), FONT_FAMILY, FONT_STYLE, FONT_SIZE).setFillColor(ColorName.BLACK).setX(legendX + LEGEND_RECTANGLE_WIDTH + 10).setY(legendY + (LEGEND_HEIGHT_SEPARATION / 2)).setTextBaseLine(TextBaseLine.MIDDLE);
    add(rectangle);
    add(text);
  }
  return this;
}

代码示例来源: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.uberfire/uberfire-wires-core-client

public void center() {
  int x = (int) (width / 2 - substrate.getWidth() / 2);
  int y = (int) (height / 2 - substrate.getHeight() / 2);
  substrate.setX(x).setY(y);
  progress.setX(x + 2).setY(y + 2);
  progressPercentage.setX(x + substrate.getWidth() / 2).setY(y + 2 + progress.getHeight() / 2);
  layer.batch();
}

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

public void center() {
  int x = (int) (width / 2 - substrate.getWidth() / 2);
  int y = (int) (height / 2 - substrate.getHeight() / 2);
  substrate.setX(x).setY(y);
  progress.setX(x + 2).setY(y + 2);
  progressPercentage.setX(x + substrate.getWidth() / 2).setY(y + 2 + progress.getHeight() / 2);
  layer.batch();
}

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

public VerticalBarChartBuilder buildCategoriesAxisTitle() {
  if (isShowCategoriesAxisTitle()) {
    // Build the X axis line and title.
    categoriesAxisTitle = new Text(getCategoriesAxis().getTitle(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.SILVER).setX(getChartWidth() / 2).setY(30).setTextAlign(TextAlign.CENTER).setTextBaseLine(TextBaseLine.MIDDLE);
    bottomArea.add(categoriesAxisTitle);
  }
  return this;
}

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

public HorizontalBarChartBuilder buildValuesAxisTitle() {
  if (isShowValuesAxisTitle()) {
    // Build the Y axis line and title.
    valuesAxisTitle = new Text(getValuesAxis().getTitle(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.SILVER).setX(getChartWidth() / 2).setY(30).setTextAlign(TextAlign.CENTER).setTextBaseLine(TextBaseLine.MIDDLE);
    bottomArea.add(valuesAxisTitle);
  }
  return this;
}

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

public VerticalBarChartBuilder buildValuesAxisTitle() {
  if (isShowValuesAxisTitle()) {
    // Build the Y axis line and title.
    valuesAxisTitle = new Text(getValuesAxis().getTitle(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.SILVER).setX(10).setY(getChartHeight() / 2).setTextAlign(TextAlign.RIGHT).setTextBaseLine(TextBaseLine.MIDDLE).setRotationDegrees(270);
    leftArea.add(valuesAxisTitle);
  }
  return this;
}

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

public HorizontalBarChartBuilder buildCategoriesAxisTitle() {
  if (isShowCategoriesAxisTitle()) {
    // Build the X axis line and title.
    categoriesAxisTitle = new Text(getCategoriesAxis().getTitle(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.SILVER).setX(10).setY(getChartHeight() / 2).setTextAlign(TextAlign.RIGHT).setTextBaseLine(TextBaseLine.MIDDLE).setRotationDegrees(270);
    leftArea.add(categoriesAxisTitle);
  }
  return this;
}

相关文章