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

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

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

Text.setRotationDegrees介绍

暂无

代码示例

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

@SuppressWarnings("unchecked")
public void setTitleRotation(final double degrees) {
  text.setRotationDegrees(degrees);
}

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

public void format(double maxWidth, double maxHeight) {
  double rotation = checkRotation(maxWidth);
  if (labels != null && !labels.isEmpty()) {
    for (BarChartLabel label : labels) {
      // label.getLabelContainer().setAlpha(1);
      // label.getLabelContainer().setFillColor(new Color(40 * label.getAxisLabel().getIndex(), 0, 0));
      label.getLabelContainer().setRotationDegrees(rotation);
      label.getLabel().setRotationDegrees(rotation);
      label.getLabelContainer().setWidth(maxWidth);
      label.getLabelContainer().setHeight(maxHeight);
      cut(label, maxWidth, maxHeight, rotation);
    }
  }
  
}

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

public void format(double maxWidth, double maxHeight)
{
  double rotation = checkRotation(maxWidth);
  if (labels != null && !labels.isEmpty())
  {
    for (XYChartLabel label : labels)
    {
      // label.getLabelContainer().setAlpha(1);
      // label.getLabelContainer().setFillColor(new Color(40 * label.getAxisLabel().getIndex(), 0, 0));
      label.getLabelContainer().setRotationDegrees(rotation);
      label.getLabel().setRotationDegrees(rotation);
      label.getLabelContainer().setWidth(maxWidth);
      label.getLabelContainer().setHeight(maxHeight);
      cut(label, maxWidth, maxHeight, rotation);
    }
  }
}

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

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

final TextAlign textAlign = isVertical ? TextAlign.CENTER : TextAlign.RIGHT;
final double rotation = isVertical ? 0 : 270;
Text categoriesAxisTitle = new Text(getCategoriesAxis().getTitle(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.SILVER).setX(x).setY(y).setTextAlign(textAlign).setTextBaseLine(TextBaseLine.MIDDLE).setRotationDegrees(rotation);
if (isVertical) bottomArea.add(categoriesAxisTitle);
else leftArea.add(categoriesAxisTitle);
final TextAlign textAlign = isVertical ? TextAlign.RIGHT : TextAlign.CENTER;
final double rotation = isVertical ? 270 : 0;
Text valuesAxisTitle = new Text(getValuesAxis().getTitle(), getFontFamily(), getFontStyle(), getFontSize()).setFillColor(ColorName.SILVER).setX(x).setY(y).setTextAlign(textAlign).setTextBaseLine(TextBaseLine.MIDDLE).setRotationDegrees(rotation);
if (isVertical) leftArea.add(valuesAxisTitle);
else bottomArea.add(valuesAxisTitle);

相关文章