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

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(155)

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

Rectangle.moveToTop介绍

暂无

代码示例

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

/**
 * Formats the label Text shapes in the given axis by cutting text value.
 */
private void cut(BarChartLabel label, double maxWidth, double maxHeight, double rotation)
{
  String text = label.getLabel().getText();
  // Cut text.
  cutLabelText(label, maxWidth - 5, maxHeight - 5, rotation);
  String cutText = label.getLabel().getText();
  // If text is cut, add suffix characters.
  if (text.length() != cutText.length()) {
    label.getLabel().setText(label.getLabel().getText() + "...");
  }
  // TODO: Animate.
  // animate(label, text, cutText, originalRotation);
  // Move label to top.
  label.getLabelContainer().moveToTop();
}

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

/**
 * Formats the label Text shapes in the given axis by cutting text value.
 */
private void cut(XYChartLabel label, double maxWidth, double maxHeight, double rotation)
{
  String text = label.getLabel().getText();
  // Cut text.
  cutLabelText(label, maxWidth - 5, maxHeight - 5, rotation);
  String cutText = label.getLabel().getText();
  // If text is cut, add suffix characters.
  if (text.length() != cutText.length())
  {
    label.getLabel().setText(label.getLabel().getText() + "...");
  }
  // TODO: Animate.
  // animate(label, text, cutText, originalRotation);
  // Move label to top.
  label.getLabelContainer().moveToTop();
}

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

barObject.moveToTop();
barObject.setDraggable(true);

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

@Override
public void setVisibleBounds( final Bounds bounds ) {
  radarLayer.remove( visibleBounds );
  visibleBounds.setLocation( new Point2D( bounds.getX(),
                      bounds.getY() ) );
  visibleBounds.setHeight( bounds.getHeight() );
  visibleBounds.setWidth( bounds.getWidth() );
  radarLayer.add( visibleBounds );
  visibleBounds.moveToTop();
  radarLayer.batch();
}

代码示例来源: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: com.ahome-it/lienzo-charts

barObject.moveToTop();
barObject.setDraggable(true);

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

@Override
public void setVisibleBounds( final Bounds bounds ) {
  radarLayer.remove( visibleBounds );
  visibleBounds.setLocation( new Point2D( bounds.getX(),
                      bounds.getY() ) );
  visibleBounds.setHeight( bounds.getHeight() );
  visibleBounds.setWidth( bounds.getWidth() );
  radarLayer.add( visibleBounds );
  visibleBounds.moveToTop();
  radarLayer.batch();
}

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

public IPrimitive<?> build(final IPrimitive<?> item,
              final double width,
              final double height) {
  decorator = createRectangle(width,
                height);
  this.add(decorator);
  this.add(item);
  decorator.setX(item.getX() - (padding / 4));
  decorator.setY(item.getY() - (padding / 4));
  decorator.addNodeMouseEnterHandler(nodeMouseEnterEvent -> show(nodeMouseEnterEvent.getMouseEvent().getClientX(),
                                  nodeMouseEnterEvent.getMouseEvent().getClientY()));
  decorator.addNodeMouseExitHandler(nodeMouseExitEvent -> hide());
  decorator.addNodeMouseMoveHandler(nodeMouseMoveEvent -> timer.cancel());
  item.setDraggable(false);
  decorator.setDraggable(false).moveToTop();
  return this;
}

相关文章