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

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

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

Text.setDraggable介绍

暂无

代码示例

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

@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: 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: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo

private void initialize(final BoundingBox boundingBox) {
  this.text = new Text("")
      .setAlpha(TEXT_ALPHA)
      .setFontFamily(TEXT_FONT_FAMILY)
      .setFontSize(TEXT_FONT_SIZE)
      .setFillColor(TEXT_FILL_COLOR)
      .setStrokeColor(TEXT_STROKE_COLOR)
      .setStrokeWidth(TEXT_STROKE_WIDTH)
      .setTextAlign(TEXT_ALIGN)
      .setDraggable(false);
  this.textWrapper = new TextBoundsWrap(text,
                     new BoundingBox(0,
                             0,
                             1,
                             1));
  this.text.setWrapper(textWrapper);
  this.currentTextLayout = TEXT_LAYOUT_ALIGN;
  textContainer.add(text);
  textContainer.add(textSpacer);
  // Ensure path bounds are available on the selection context.
  text.setFillBoundsForSelection(true);
  initializeHandlers();
  resize(boundingBox.getWidth(), boundingBox.getHeight());
}

相关文章

微信公众号

最新文章

更多