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

Examples of com.sencha.gxt.chart.client.draw.RGB


  @Override
  public void highlight(Sprite sprite) {
    Color fill = sprite.getFill();
    if (fill instanceof RGB) {
      RGB rgb = (RGB) fill;
      sprite.setFill(rgb.getLighter(0.2));
      sprite.redraw();
    }
  }
View Full Code Here


  @Override
  public void unHighlight(Sprite sprite) {
    Color fill = sprite.getFill();
    if (fill instanceof RGB) {
      RGB rgb = (RGB) fill;
      sprite.setFill(rgb.getDarker(0.2));
      sprite.redraw();
    }
  }
View Full Code Here

    // setup shadow attributes
    shadowAttributes = new ArrayList<Sprite>();
    PathSprite config = new PathSprite();
    config.setStrokeWidth(6);
    config.setStrokeOpacity(1);
    config.setStroke(new RGB(200, 200, 200));
    config.setTranslation(1.2, 2);
    config.setStrokeLineJoin(LineJoin.ROUND);
    shadowAttributes.add(config);
    config = new PathSprite();
    config.setStrokeWidth(4);
    config.setStrokeOpacity(1);
    config.setStroke(new RGB(150, 150, 150));
    config.setTranslation(0.9, 1.5);
    config.setStrokeLineJoin(LineJoin.ROUND);
    shadowAttributes.add(config);
    config = new PathSprite();
    config.setStrokeWidth(2);
    config.setStrokeOpacity(1);
    config.setStroke(new RGB(100, 100, 100));
    config.setTranslation(0.6, 1);
    config.setStrokeLineJoin(LineJoin.ROUND);
    shadowAttributes.add(config);

    // initialize the shadow groups
View Full Code Here

  /**
   * Creates a radial {@link Axis}.
   */
  public RadialAxis() {
    circleConfig = new CircleSprite();
    circleConfig.setStroke(new RGB("#ccc"));
    circleConfig.setFill(Color.NONE);
    axisConfig.setStroke(new RGB("#ccc"));
  }
View Full Code Here

  protected void setLabelContrast(Sprite label, SeriesLabelConfig<M> config, Sprite sprite) {
    Color fill = config.getSpriteConfig().getFill();
    Color spriteFill = sprite.getFill();
    double labelBrightness;
    if (fill instanceof RGB && spriteFill instanceof RGB) {
      RGB rgb = (RGB) fill;
      RGB rgbSprite = (RGB) spriteFill;
      if (config.getLabelPosition() != LabelPosition.OUTSIDE) {
        labelBrightness = rgbSprite.getGrayScale() / 255.0;
      } else {
        labelBrightness = 1;
      }
      HSL hsl = new HSL(rgb);
      hsl.setLightness(labelBrightness > 0.5 ? 0.2 : 0.8);
      label.setFill(new RGB(hsl));
      label.redraw();
    }

  }
View Full Code Here

  public BarSeries() {
    // setup shadow attributes
    Sprite config = new PathSprite();
    config.setStrokeWidth(6);
    config.setStrokeOpacity(0.05);
    config.setStroke(new RGB(200, 200, 200));
    config.setTranslation(1.2, 1.2);
    shadowAttributes.add(config);
    config = new PathSprite();
    config.setStrokeWidth(4);
    config.setStrokeOpacity(0.1);
    config.setStroke(new RGB(150, 150, 150));
    config.setTranslation(0.9, 0.9);
    shadowAttributes.add(config);
    config = new PathSprite();
    config.setStrokeWidth(2);
    config.setStrokeOpacity(0.15);
    config.setStroke(new RGB(100, 100, 100));
    config.setTranslation(0.6, 0.6);
    shadowAttributes.add(config);

    // initialize shadow groups
    if (shadowGroups.size() == 0) {
View Full Code Here

  /**
   * Create a Cartesian axis.
   */
  public CartesianAxis() {
    defaultGridConfig.setStroke(new RGB(204, 204, 204));
    defaultGridConfig.setZIndex(1);
  }
View Full Code Here

  @Override
  public void highlight(Sprite sprite) {
    if (sprite instanceof RectangleSprite) {
      RectangleSprite bar = (RectangleSprite) sprite;
      bar.setStroke(new RGB(85, 85, 204));
      if (sprite.getComponent().isAnimated()) {
        DrawFx.createStrokeWidthAnimator(bar, 3).run(250);
        DrawFx.createOpacityAnimator(bar, 0.8).run(250);
      } else {
        bar.setStrokeWidth(3);
View Full Code Here

  private BarSeries<TimeSeriesDataVO> createBar(String seriesName) {
    MapValueProvider valueProvider = new MapValueProvider(seriesName);
    BarSeries<TimeSeriesDataVO> series = new BarSeries<TimeSeriesDataVO>();
    series.setYAxisPosition(Position.LEFT);
    Color color = new RGB((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255));
    series.setStroke(color);
    series.setStrokeWidth(3);
    series.setColumn(true);
    //series.setShowMarkers(true);
    Sprite marker = Primitives.circle(0, 0, 6);
View Full Code Here

  private LineSeries<TimeSeriesDataVO> createLine(String seriesName) {
    MapValueProvider valueProvider = new MapValueProvider(seriesName);
    LineSeries<TimeSeriesDataVO> series = new LineSeries<TimeSeriesDataVO>();
    series.setYAxisPosition(Position.LEFT);
    Color color = new RGB((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255));
    series.setStroke(color);
    series.setStrokeWidth(3);
    series.setShowMarkers(true);
    Sprite marker = Primitives.circle(0, 0, 6);
    marker.setFill(color);
View Full Code Here

TOP

Related Classes of com.sencha.gxt.chart.client.draw.RGB

Copyright © 2018 www.massapicom. 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.