当前位置: 首页>>代码示例>>Java>>正文


Java LinearGradient类代码示例

本文整理汇总了Java中com.googlecode.wickedcharts.highcharts.options.color.LinearGradient的典型用法代码示例。如果您正苦于以下问题:Java LinearGradient类的具体用法?Java LinearGradient怎么用?Java LinearGradient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LinearGradient类属于com.googlecode.wickedcharts.highcharts.options.color包,在下文中一共展示了LinearGradient类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SkiesTheme

import com.googlecode.wickedcharts.highcharts.options.color.LinearGradient; //导入依赖的package包/类
public SkiesTheme() {
  this.addColor(new HexColor("#514F78"));
  this.addColor(new HexColor("#42A07B"));
  this.addColor(new HexColor("#9B5E4A"));
  this.addColor(new HexColor("#72727F"));
  this.addColor(new HexColor("#1F949A"));
  this.addColor(new HexColor("#82914E"));
  this.addColor(new HexColor("#86777F"));
  this.addColor(new HexColor("#42A07B"));

  ChartOptions chartOptions = new ChartOptions()
      .setClassName("skies")
      .setBorderWidth(0)
      .setPlotShadow(Boolean.TRUE)
      .setPlotBackgroundImage("/img/skies.jpg")
      .setPlotBackgroundColor(
          new LinearGradient(0, 0, 250, 500).addStop(0, new RgbaColor(255, 255, 255, 1f)).addStop(1,
              new RgbaColor(255, 255, 255, 0f))).setPlotBorderWidth(1);
  this.setChartOptions(chartOptions);

  this.setTitle(new Title().setStyle(new CssStyle()));

  this.setSubtitle(new Title().setStyle(new CssStyle()));

  Axis xAxis = new Axis().setGridLineWidth(0).setLineColor(new HexColor("#C0D0E0"))
      .setTickColor(new HexColor("#C0D0E0")).setLabels(new Labels().setStyle(new CssStyle()))
      .setTitle(new Title().setStyle(new CssStyle()));
  this.setxAxis(xAxis);

  Axis yAxis = new Axis().setAlternateGridColor(new RgbaColor(255, 255, 255, .5f))
      .setLineColor(new HexColor("#C0D0E0")).setTickColor(new HexColor("#C0D0E0")).setTickWidth(1)
      .setLabels(new Labels().setStyle(new CssStyle())).setTitle(new Title().setStyle(new CssStyle()));
  this.setyAxis(yAxis);

  Legend legend = new Legend().setItemStyle(new CssStyle()).setItemHoverStyle(new CssStyle())
      .setItemHiddenStyle(new CssStyle());
  this.setLegend(legend);

  this.setLabels(new Labels().setStyle(new CssStyle()));
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:41,代码来源:SkiesTheme.java

示例2: GridTheme

import com.googlecode.wickedcharts.highcharts.options.color.LinearGradient; //导入依赖的package包/类
public GridTheme() {

    this.addColor(new HexColor("#058DC7"));
    this.addColor(new HexColor("#50B432"));
    this.addColor(new HexColor("#ED561B"));
    this.addColor(new HexColor("#DDDF00"));
    this.addColor(new HexColor("#24CBE5"));
    this.addColor(new HexColor("#64E572"));
    this.addColor(new HexColor("#FF9655"));
    this.addColor(new HexColor("#FFF263"));
    this.addColor(new HexColor("#6AF9C4"));

    ChartOptions chartOptions = new ChartOptions()
        .setBackgroundColor(
            new LinearGradient(0, 0, 500, 500).addStop(0, new RgbaColor(255, 255, 255)).addStop(1,
                new RgbaColor(240, 240, 255))).setBorderWidth(2)
        .setPlotBackgroundColor(new RgbaColor(255, 255, 255, .9f)).setPlotShadow(Boolean.TRUE).setPlotBorderWidth(1);
    this.setChartOptions(chartOptions);

    Title title = new Title();
    title.setStyle(new CssStyle());
    this.setTitle(title);

    Title subTitle = new Title();
    subTitle.setStyle(new CssStyle());
    this.setSubtitle(subTitle);

    Axis xAxis = new Axis().setGridLineWidth(1).setLineColor(new HexColor("#000000"))
        .setTickColor(new HexColor("#000000")).setLabels(new Labels().setStyle(new CssStyle()))
        .setTitle(new Title().setStyle(new CssStyle()));
    this.setxAxis(xAxis);

    Axis yAxis = new Axis().setMinorTickInterval(new MinorTickInterval().setAuto(true))
        .setLineColor(new HexColor("#000000")).setLineWidth(1).setTickWidth(1).setTickColor(new HexColor("#000000"))
        .setLabels(new Labels().setStyle(new CssStyle())).setTitle(new Title().setStyle(new CssStyle()));
    this.setyAxis(yAxis);

    Legend legend = new Legend().setItemStyle(new CssStyle()).setItemHoverStyle(new CssStyle())
        .setItemHiddenStyle(new CssStyle());
    this.setLegend(legend);

    Labels labels = new Labels().setStyle(new CssStyle());
    this.setLabels(labels);

  }
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:46,代码来源:GridTheme.java

示例3: GrayTheme

import com.googlecode.wickedcharts.highcharts.options.color.LinearGradient; //导入依赖的package包/类
public GrayTheme() {
  this.setColors(HexColor.fromStrings("#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
      "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"));

  this.setChartOptions(new ChartOptions()
      .setBackgroundColor(
          new LinearGradient(0, 0, 0, 400).addStop(0, new RgbaColor(96, 96, 96))
              .addStop(1, new RgbaColor(16, 16, 16))).setBorderWidth(0).setBorderRadius(15)
      .setPlotBackgroundColor(new NullColor()).setPlotShadow(Boolean.FALSE).setPlotBorderWidth(0));

  this.setTitle(new Title().setStyle(new CssStyle().setProperty("color", "#FFF").setProperty("font",
      "16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif")));

  this.setSubtitle(new Title().setStyle(new CssStyle().setProperty("color", "#DDD").setProperty("font",
      "12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif")));

  this.setxAxis(new Axis()
      .setGridLineWidth(0)
      .setLineColor(HexColor.fromString("#999999"))
      .setTickColor(HexColor.fromString("#999999"))
      .setLabels(new Labels().setStyle(new CssStyle().setProperty("color", "#DDD").setProperty("fontWeight", "bold")))
      .setTitle(
          new Title().setStyle(new CssStyle().setProperty("color", "#999").setProperty("font",
              "bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"))));

  this.setyAxis(new Axis()
      .setAlternateGridColor(new NullColor())
      .setMinorTickInterval(new MinorTickInterval().setNull())
      .setGridLineColor(new RgbaColor(255, 255, 255, .1f))
      .setLineWidth(0)
      .setTickWidth(0)
      .setLabels(new Labels().setStyle(new CssStyle().setProperty("color", "#DDD").setProperty("fontWeight", "bold")))
      .setTitle(
          new Title().setStyle(new CssStyle().setProperty("color", "#999").setProperty("font",
              "bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"))));

  this.setLegend(new Legend().setItemStyle(new CssStyle().setProperty("color", "#CCC"))
      .setItemHoverStyle(new CssStyle().setProperty("color", "#FFF"))
      .setItemHiddenStyle(new CssStyle().setProperty("color", "#333")));

  this.setLabels(new Labels().setStyle(new CssStyle().setProperty("color", "#CCC")));

  this.setTooltip(new Tooltip()
      .setBackgroundColor(
          new LinearGradient(0, 0, 0, 50).addStop(0, new RgbaColor(96, 96, 96, .8f)).addStop(1,
              new RgbaColor(16, 16, 16, .8f))).setBorderWidth(0)
      .setStyle(new CssStyle().setProperty("color", "#FFF")));

  this.setPlotOptions(new PlotOptionsChoice()
      .setLine(
          new PlotOptions().setDataLabels(new DataLabels().setColor(HexColor.fromString("#cccccc"))).setMarker(
              new Marker().setLineColor(HexColor.fromString("#333333"))))
      .setSpline(new PlotOptions().setMarker(new Marker().setLineColor(HexColor.fromString("#333333"))))
      .setScatter(new PlotOptions().setMarker(new Marker().setLineColor(HexColor.fromString("#333333"))))
      .setCandleStick(new PlotOptions().setLineColor(HexColor.fromString("#ffffff"))));

  this.setToolbar(new DummyOption());

  this.setNavigation(new Navigation().setButtonOptions(new ButtonOptions()
      .setBackgroundColor(
          new LinearGradient(0, 0, 0, 20).addStop(0.4f, HexColor.fromString("#606060")).addStop(0.6f,
              HexColor.fromString("#333333"))).setBorderColor(HexColor.fromString("#000000"))
      .setSymbolStroke(HexColor.fromString("#c0c0c0")).setHoverSymbolStroke(HexColor.fromString("#ffffff"))));

  this.setExporting(new ExportingOptions().setButtons(new ExportingButtons().setExportButton(
      new ButtonOptions().setSymbolFill(HexColor.fromString("#55be3b"))).setPrintButton(
      new ButtonOptions().setSymbolFill(HexColor.fromString("#7797be")))));

  this.setRangeSelector(new DummyOption());

  this.setNavigator(new DummyOption());

  this.setScrollbar(new DummyOption());

  this.setLegendBackgroundColor(new RgbaColor(48, 48, 48, .8f));
  this.setLegendBackgroundColorSolid(new RgbaColor(70, 70, 70));
  this.setDataLabelsColor(HexColor.fromString("#444444"));
  this.setTextColor(HexColor.fromString("#e0e0e0"));
  this.setMaskColor(new RgbaColor(255, 255, 255, 0f));

}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:82,代码来源:GrayTheme.java


注:本文中的com.googlecode.wickedcharts.highcharts.options.color.LinearGradient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。