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

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

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

Rectangle.animate介绍

暂无

代码示例

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

protected void seriesValuesAlpha(int numSerie, int numValue, double alpha) {
  String barId = getBarId(numSerie, numValue);
  for (Map.Entry<String, List<Rectangle>> entry : seriesValues.entrySet()) {
    List<Rectangle> values = entry.getValue();
    if (values != null && !values.isEmpty()) {
      for (Rectangle value : values) {
        String id = value.getID();
        if (!barId.equals(id)) {
          AnimationProperties animationProperties = new AnimationProperties();
          animationProperties.push(AnimationProperty.Properties.ALPHA(alpha));
          value.animate(AnimationTweener.LINEAR, animationProperties, ANIMATION_DURATION);
        }
      }
    }
  }
}

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

protected void seriesValuesAlpha(int numSeries, int numValue, double alpha)
{
  final String barId = BarChart.buildId("value", numSeries, numValue);
  for (Map.Entry<String, List<Rectangle>> entry : seriesValues.entrySet())
  {
    List<Rectangle> values = entry.getValue();
    if (values != null && !values.isEmpty())
    {
      for (Rectangle value : values)
      {
        String id = value.getID();
        if (!barId.equals(id))
        {
          value.animate(LINEAR, toPropertyList(ALPHA(alpha)), getDefaultAnimationDuration());
        }
      }
    }
  }
}

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event) {
    // Apply alphas.
    AnimationProperties animationProperties = new AnimationProperties();
    animationProperties.push(AnimationProperty.Properties.ALPHA(0.5));
    resizeRectangleButton.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeRectangle.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow1.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow2.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow3.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow4.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
  }
});

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

public Decorator hide() {
  if (!timer.isRunning()) {
    decorator.animate(AnimationTweener.LINEAR,
             AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(0)),
             ANIMATION_DURATION,
             createHideAnimationCallback());
  }
  return this;
}

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

public Decorator show(final double x,
           final double y) {
  if (!timer.isRunning()) {
    decorator.animate(AnimationTweener.LINEAR,
             AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(1)),
             ANIMATION_DURATION,
             createShowAnimationCallback(x,
                           y));
    timer.schedule(TIMER_DELAY);
  }
  return this;
}

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

@Override
  public void onNodeMouseExit(NodeMouseExitEvent event) {
    // Apply alphas.
    AnimationProperties animationProperties = new AnimationProperties();
    animationProperties.push(AnimationProperty.Properties.ALPHA(RECTANGLE_INITIA_ALPHA));
    resizeRectangleButton.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    // Apply alphas.
    AnimationProperties animationProperties2 = new AnimationProperties();
    animationProperties2.push(AnimationProperty.Properties.ALPHA(0));
    resizeRectangle.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow1.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow2.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow3.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow4.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
  }
});

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event)
  {
    // Apply alphas.
    AnimationProperties animationProperties = new AnimationProperties();
    animationProperties.push(AnimationProperty.Properties.ALPHA(0.5));
    resizeRectangleButton.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeRectangle.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow1.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow2.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow3.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    resizeArrow4.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    showSizeText(sizeText, ChartResizer.this.width, ChartResizer.this.height);
    sizeText.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    // Fire the event for entering resize area.
    ChartResizer.this.fireEvent(new ChartResizeAreaEvent(true));
  }
});

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

for (Map.Entry<String, List<Rectangle>> entry : seriesValues.entrySet()) {
  for (Rectangle rectangle : entry.getValue()) {
    rectangle.animate(AnimationTweener.LINEAR, animationProperties2, CLEAR_ANIMATION_DURATION, animationCallback);

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

for (Map.Entry<String, List<Rectangle>> entry : seriesValues.entrySet()) {
  for (Rectangle rectangle : entry.getValue()) {
    rectangle.animate(AnimationTweener.LINEAR, animationProperties2, CLEAR_ANIMATION_DURATION, animationCallback);

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

@Override
  public void onNodeMouseExit(NodeMouseExitEvent event)
  {
    // Apply alphas.
    AnimationProperties animationProperties = new AnimationProperties();
    animationProperties.push(AnimationProperty.Properties.ALPHA(RECTANGLE_INITIA_ALPHA));
    resizeRectangleButton.animate(AnimationTweener.LINEAR, animationProperties, RECTANGLE_ANIMATION_DURATION);
    // Apply alphas.
    AnimationProperties animationProperties2 = new AnimationProperties();
    animationProperties2.push(AnimationProperty.Properties.ALPHA(0));
    resizeRectangle.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow1.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow2.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow3.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    resizeArrow4.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    sizeText.animate(AnimationTweener.LINEAR, animationProperties2, RECTANGLE_ANIMATION_DURATION);
    // Fire the event for entering resize area.
    ChartResizer.this.fireEvent(new ChartResizeAreaEvent(false));
  }
});

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

@Override
  public void onNodeDragEnd(NodeDragEndEvent event) {
    int currentX = event.getX();
    int currentY = event.getY();
    int incrementX = currentX - initialXPosition;
    int incrementY = currentY - initialYPosition;
    initialXPosition = currentX;
    initialYPosition = currentY;
    double finalWidth = ChartResizer.this.width + incrementX;
    double finalHeight = ChartResizer.this.height + incrementY;
    // Animate the resize rectangle to its final position.
    AnimationProperties rectangleAnimationProperties = new AnimationProperties();
    rectangleAnimationProperties.push(AnimationProperty.Properties.X(finalWidth - RECTANGLE_SIZE));
    rectangleAnimationProperties.push(AnimationProperty.Properties.Y(finalHeight - RECTANGLE_SIZE));
    IAnimationHandle rectangleAnimationHandle = resizeRectangleButton.animate(AnimationTweener.LINEAR, rectangleAnimationProperties, ANIMATION_DURATION);
    // Fire the resize event with apply flag set (final size).
    ChartResizer.this.fireEvent(new ChartResizeEvent(finalWidth, finalHeight, true));
    ChartResizer.this.width = finalWidth;
    ChartResizer.this.height = finalHeight;
  }
});

相关文章