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

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

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

Text.animate介绍

暂无

代码示例

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

public void clear() {
  // Create the animation properties.
  AnimationProperties animationProperties = new AnimationProperties();
  animationProperties.push(AnimationProperty.Properties.ALPHA(0d));
  // Apply animation to axis titles.
  label.animate(AnimationTweener.LINEAR, animationProperties, BarChart.CLEAR_ANIMATION_DURATION);
}

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

@Override
  public void onNodeMouseExit(NodeMouseExitEvent event)
  {
    // Animate other slices.
    alphaToOtherSlices(slice.getID(), 1);
    // Hide tooltip.
    if (tooltip != null) tooltip.hide();
    // Show text.
    Text _text = texts.get(_i);
    if (_text != null) _text.animate(LINEAR, toPropertyList(ALPHA(1)), getDefaultAnimationDuration());
  }
});

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

@Override
  public void onNodeMouseExit(NodeMouseExitEvent event) {
    // Animate other slices.
    alphaToOtherSlices(slice.getID(), 1);
    // Hide tooltip.
    if (tooltip != null) tooltip.hide();
    // Show text.
    AnimationProperties animationProperties = new AnimationProperties();
    animationProperties.push(AnimationProperty.Properties.ALPHA(1));
    Text _text = texts.get(_i);
    if (_text != null)
      _text.animate(AnimationTweener.LINEAR, animationProperties, CLEAR_ANIMATION_DURATION);
  }
});

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

animationProperties.push(AnimationProperty.Properties.HEIGHT(0d));
if (categoriesAxisTitle != null) categoriesAxisTitle.animate(AnimationTweener.LINEAR, animationProperties, CLEAR_ANIMATION_DURATION, animationCallback);
if (valuesAxisTitle != null) valuesAxisTitle.animate(AnimationTweener.LINEAR, animationProperties, CLEAR_ANIMATION_DURATION, animationCallback);

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event)
  {
    // Animate other slices.
    alphaToOtherSlices(slice.getID(), 0.7);
    // Show the tooltip.
    tooltip.setValues(category, getValue(tv));
    tooltip.show(getChartWidth() / 2, getChartHeight() / 2);
    Text _text = texts.get(_i);
    if (_text != null) _text.animate(LINEAR, toPropertyList(ALPHA(0)), getDefaultAnimationDuration());
  }
});

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

@Override
  public void onNodeMouseEnter(NodeMouseEnterEvent event)
  {
    // Animate other slices.
    alphaToOtherSlices(slice.getID(), 0.5);
    // Show the tooltip.
    tooltip.setX(xToolTip + getChartWidth()/2).setY(yToolTip + getChartHeight()/2);
    tooltip.show(category, getLabel(value * 100));
    
    // Hide text.
    AnimationProperties animationProperties = new AnimationProperties();
    animationProperties.push(AnimationProperty.Properties.ALPHA(0));
    Text _text = texts.get(_i);
    if (_text != null) _text.animate(AnimationTweener.LINEAR, animationProperties, CLEAR_ANIMATION_DURATION);
  }
});

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

private void highlight(final BarChartLabel label, final String text, final String cutText, final boolean highlighting, final double rotation) {
  label.getLabel().setText(highlighting ? text : cutText);
  AnimationProperties animationProperties = new AnimationProperties();
  animationProperties.push(AnimationProperty.Properties.ROTATION_DEGREES(rotation));
  label.getLabel().animate(AnimationTweener.LINEAR, animationProperties, ANIMATION_DURATION, new AnimationCallback() {
    @Override
    public void onClose(IAnimation animation, IAnimationHandle handle) {
      super.onClose(animation, handle);
      label.getLabelContainer().setRotationDegrees(rotation);
    }
  });
  for (Text _label : getLabelTexts()) {
    if (!_label.getID().equals(label.getLabel().getID())) {
      AnimationProperties animationProperties2 = new AnimationProperties();
      animationProperties2.push(AnimationProperty.Properties.ALPHA(highlighting ? 0d : 1d));
      _label.animate(AnimationTweener.LINEAR, animationProperties2, ANIMATION_DURATION);
    }
  }
  if (callback != null && highlighting) callback.onLabelHighlighed(label);
  if (callback != null && !highlighting) callback.onLabelUnHighlighed(label);
}

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

if (texts != null ) {
  for (Text text : texts) {
    if (text != null) text.animate(AnimationTweener.LINEAR, animationProperties2, CLEAR_ANIMATION_DURATION, animationCallback);

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

相关文章