Package com.sencha.gxt.chart.client.draw.sprite

Examples of com.sencha.gxt.chart.client.draw.sprite.TextSprite.redraw()


              TextSprite text = (TextSprite) sprite;
              if (labelConfig.getLabelProvider() != null) {
                text.setText(labelConfig.getLabelProvider().getLabel(chart.getCurrentStore().get(j),
                    getValueProvider(j)));
              }
              text.redraw();
            }
            double offsetY = sprite.getBBox().getHeight() / 2.0;
            PrecisePoint point = getPointFromCommand(areasCommands.get(j).get(i));
            if (chart.isAnimated() && sprite.getTranslation() != null) {
              DrawFx.createTranslationAnimator(sprite, point.getX(), point.getY() - offsetY).run(
View Full Code Here


        labels.add(label);
      } else {
        label = labels.get((int) i);
      }
      label.setText(labelProvider.getLabel((Math.round(i / gaugeSteps * maximum))));
      label.redraw();
      double height = label.getBBox().getHeight() / 2.0;
      label.setX(center.getX() + rho * Math.cos(i / gaugeSteps * Math.PI - Math.PI));
      label.setY(center.getY() + rho * Math.sin(i / gaugeSteps * Math.PI - Math.PI) - height);
      label.redraw();
    }
View Full Code Here

      label.setText(labelProvider.getLabel((Math.round(i / gaugeSteps * maximum))));
      label.redraw();
      double height = label.getBBox().getHeight() / 2.0;
      label.setX(center.getX() + rho * Math.cos(i / gaugeSteps * Math.PI - Math.PI));
      label.setY(center.getY() + rho * Math.sin(i / gaugeSteps * Math.PI - Math.PI) - height);
      label.redraw();
    }

  }

  /**
 
View Full Code Here

          scales.add(scale);
        }
        scale.setText(scaleLabelProvider.getLabel((Math.round((i + 1) / (double) radialSteps * maxValue))));
        scale.setX(centerX);
        scale.setY(centerY - rho * (i + 1) / radialSteps);
        scale.redraw();
      }
    }

    for (int j = labelNames.size(); j < labels.size(); j++) {
      labels.get(j).setHidden(true);
View Full Code Here

          labels.add(label);
        }
        double dx = Math.cos(i / size * pi2) * (rho + margin);
        double dy = Math.sin(i / size * pi2) * (rho + margin);
        label.setText(labelProvider.getLabel((labelNames.get(i))));
        label.redraw();
        label.setX(centerX + dx);
        label.setY(centerY + dy - (label.getBBox().getHeight() / 2.0));
        if (dx * dx <= 0.001) {
          label.setTextAnchor(TextAnchor.MIDDLE);
        } else {
View Full Code Here

            label.setTextAnchor(TextAnchor.END);
          } else {
            label.setTextAnchor(TextAnchor.START);
          }
        }
        label.redraw();
      }
    }
  }

  /**
 
View Full Code Here

      textLabel.setX(x);
      textLabel.setY(y);
      if (labelRotation != null) {
        textLabel.setRotation(new Rotation(x, y, labelRotation.getDegrees()));
      }
      textLabel.redraw();
      bbox = textLabel.getBBox();

      // Skip label if there isn't available minimum space
      if (labelOverlapHiding && previousBBox != null) {
        furthestLabel = Math.max(furthestLabel, previousBBox.getX() + previousBBox.getWidth());
View Full Code Here

      // Skip label if there isn't available minimum space
      if (labelOverlapHiding && previousBBox != null) {
        furthestLabel = Math.max(furthestLabel, previousBBox.getX() + previousBBox.getWidth());
        if (bbox.getX() <= furthestLabel - labelTolerance) {
          textLabel.setHidden(true);
          textLabel.redraw();
          continue;
        }
      }
      previousBBox = bbox;
    }
View Full Code Here

      }

      textLabel.setHidden(false);
      textLabel.setX(x);
      textLabel.setY(y);
      textLabel.redraw();
      bbox = textLabel.getBBox();

      // Skip label if there isn't available minimum space
      if (labelOverlapHiding) {
        if (previousBBox != null) {
View Full Code Here

      if (labelOverlapHiding) {
        if (previousBBox != null) {
          furthestLabel = Math.min(furthestLabel, previousBBox.getY());
          if (bbox.getY() + bbox.getHeight() >= furthestLabel + labelTolerance) {
            textLabel.setHidden(true);
            textLabel.redraw();
            continue;
          }
        } else {
          furthestLabel = bbox.getY();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.