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

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

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

Text.setTextBaseLine介绍

[英]Sets the TextBaseLine
[中]设置文本基线

代码示例

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

@Override
protected Text makeShape() {
  final Text text = new Text("T",
                "normal",
                FONT_POINT);
  text.setStrokeColor(ShapesUtils.RGB_STROKE_TEXT)
      .setFillColor(ShapesUtils.RGB_FILL_TEXT)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER)
      .setDraggable(false);
  return text;
}

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

@Override
public Text getBodyText() {
  final Text t = new Text("")
      .setFillColor(ColorName.GREY)
      .setFontSize(12)
      .setFontFamily("serif")
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getBodyText() {
  final Text t = new Text("")
      .setFillColor(ColorName.RED)
      .setFontSize(12)
      .setFontFamily("serif")
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getHeaderText() {
  final Text t = new Text("")
      .setFillColor(ColorName.DARKGREEN)
      .setFontSize(12)
      .setFontStyle("bold")
      .setFontFamily("serif")
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getBodyText() {
  final Text t = new Text("")
      .setFillColor(KIEColours.TABLE_TEXT)
      .setFontSize(GRID_FONT_SIZE)
      .setTextUnit(TextUnit.PT)
      .setFontFamily(GRID_FONT_FAMILY)
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getBodyText() {
  return new Text("")
      .setFillColor(ColorName.BLACK)
      .setFontSize(FONT_SIZE)
      .setFontFamily(FONT_FAMILY_LABEL)
      .setTextUnit(TextUnit.PT)
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
}

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

@Override
public Text getHeaderText() {
  final Text t = new Text("")
      .setFillColor(ColorName.DARKBLUE)
      .setFontSize(12)
      .setFontStyle("bold")
      .setFontFamily("serif")
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getHeaderText() {
  final Text t = new Text("")
      .setFillColor(ColorName.DARKGREEN)
      .setFontSize(12)
      .setFontStyle("bold")
      .setFontFamily("serif")
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getBodyText() {
  final Text t = new Text("")
      .setFillColor(KIEColours.TABLE_TEXT)
      .setFontSize(GRID_FONT_SIZE)
      .setTextUnit(TextUnit.PT)
      .setFontFamily(GRID_FONT_FAMILY)
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

@Override
public Text getHeaderText() {
  final Text t = new Text("")
      .setFillColor(ColorName.DARKBLUE)
      .setFontSize(12)
      .setFontStyle("bold")
      .setFontFamily("serif")
      .setListening(false)
      .setTextBaseLine(TextBaseLine.MIDDLE)
      .setTextAlign(TextAlign.CENTER);
  return t;
}

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

private void build() {
  label = new Text(axisLabel.getText(), FONT_FAMILY, FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.TOP);
  label.setID("label" + axisLabel.getIndex());
  labelContainer = new Rectangle(1,1);
  add(label);
  add(labelContainer);
  labelContainer.setAlpha(0.01);
  labelContainer.moveToTop();
}

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

private void build()
{
  label = new Text(axisLabel.getText(), FONT_FAMILY, FONT_STYLE, FONT_SIZE).setFillColor(LABEL_COLOR).setTextAlign(TextAlign.LEFT).setTextBaseLine(TextBaseLine.TOP);
  label.setID("label" + axisLabel.getIndex());
  labelContainer = new Rectangle(1, 1);
  add(label);
  add(labelContainer);
  labelContainer.setAlpha(0.01);
  labelContainer.moveToTop();
}

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

protected void buildTitle() {
  if (isShowTitle()) {
    chartTitle = new Text(getName(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.BLACK).setTextAlign(TextAlign.CENTER).setTextBaseLine(TextBaseLine.MIDDLE);
    setShapeAttributes(chartTitle,getChartWidth() / 2, 10d, null, null, true);
    topArea.add(chartTitle);
  }
}

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

相关文章