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


Java RgbaColor类代码示例

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


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

示例1: SplatterChartOptions

import com.googlecode.wickedcharts.highcharts.options.color.RgbaColor; //导入依赖的package包/类
public SplatterChartOptions(final ChartConfiguration configuration) throws Exception {
	this.eventType = configuration.getEventType();
	this.attributeName = configuration.getAttributeName();
	this.title = configuration.getTitle();

	final ChartOptions chartOptions = new ChartOptions();
	chartOptions.setType(SeriesType.SCATTER);
	this.setChartOptions(chartOptions);

	this.setTitle(new Title(this.title));

	// X-Achse
	final Axis xAxis = new Axis();
	xAxis.setType(AxisType.DATETIME);

	final DateTimeLabelFormat dateTimeLabelFormat = new DateTimeLabelFormat().setProperty(DateTimeProperties.DAY, "%e.%m.%Y").setProperty(DateTimeProperties.MONTH, "%m/%Y").setProperty(DateTimeProperties.YEAR, "%Y");

	xAxis.setDateTimeLabelFormats(dateTimeLabelFormat);

	this.setxAxis(xAxis);

	// Y-Achse
	final Axis yAxis = new Axis();
	yAxis.setTitle(new Title(this.attributeName));
	yAxis.setType(AxisType.LINEAR);

	this.setyAxis(yAxis);

	// Tooltip
	final Tooltip tooltip = new Tooltip();
	tooltip.setFormatter(new Function("return '<b>'+ this.series.name +'</b><br/>'+Highcharts.dateFormat('%e.%m.%Y', this.x) +': '+ this.y ;"));
	this.setTooltip(tooltip);

	final CustomCoordinatesSeries<String, Number> series = new CustomCoordinatesSeries<String, Number>();
	series.setColor(new RgbaColor(119, 152, 191, 0.5f));
	series.setName(this.eventType.getTypeName());
	series.setData(this.getSeriesData());
	this.addSeries(series);

}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:41,代码来源:SplatterChartOptions.java

示例2: createJacksonMapper

import com.googlecode.wickedcharts.highcharts.options.color.RgbaColor; //导入依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private ObjectMapper createJacksonMapper() {

	this.jacksonModule.addSerializer(Center.class, new CenterSerializer());
	this.jacksonModule.addSerializer(SimpleColor.class, new SimpleColorReferenceSerializer());
	this.jacksonModule.addSerializer(HighchartsColor.class, new HighchartsColorReferenceSerializer());
	this.jacksonModule.addSerializer(HexColor.class, new HexColorReferenceSerializer());
	this.jacksonModule.addSerializer(LowercaseEnum.class, new LowercaseEnumSerializer());
	this.jacksonModule.addSerializer(PixelOrPercent.class, new PixelOrPercentSerializer());
	this.jacksonModule.addSerializer(Symbol.class, new SymbolSerializer());
	this.jacksonModule.addSerializer(RgbaColor.class, new RgbaColorReferenceSerializer());
	this.jacksonModule.addSerializer(NullColor.class, new NullColorReferenceSerializer());
	this.jacksonModule.addSerializer(MinorTickInterval.class, new MinorTickIntervalSerializer());
	this.jacksonModule.addSerializer(Function.class, new FunctionSerializer());
	this.jacksonModule.addSerializer(CssStyle.class, new CssStyleSerializer());
	this.jacksonModule.addSerializer(DateTimeLabelFormat.class, new DateTimeLabelFormatSerializer());
	this.jacksonModule.addSerializer(Coordinate.class, new CoordinateSerializer());
	this.jacksonModule.addSerializer(Crosshair.class, new CrosshairSerializer());
	this.jacksonModule.addSerializer(RangeCoordinate.class, new RangeCoordinateSerializer());
	this.jacksonModule.addSerializer(Bubble.class, new BubbleSerializer());

	ObjectMapper mapper = createDefaultObjectMapper();
	mapper.setLocale(Locale.ENGLISH);
	mapper.registerModule(this.jacksonModule);
	return mapper;
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:27,代码来源:JsonRenderer.java

示例3: serializeIfNotNull

import com.googlecode.wickedcharts.highcharts.options.color.RgbaColor; //导入依赖的package包/类
@Override
protected void serializeIfNotNull(final RgbaColor color, final JsonGenerator jgen, final SerializerProvider provider)
    throws IOException, JsonProcessingException {
	if (color.getBrightness() == null) {
		jgen.writeString(String.format(Locale.ENGLISH, RGBA, color.getRed(), color.getGreen(), color.getBlue(),
		    color.getAlpha()));
	} else {
		String colorString = brighten(
		    "\""
		        + String.format(Locale.ENGLISH, RGBA, color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha())
		        + "\"", color.getBrightness());
		jgen.writeRawValue(colorString);
	}

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

示例4: SkiesTheme

import com.googlecode.wickedcharts.highcharts.options.color.RgbaColor; //导入依赖的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

示例5: GridTheme

import com.googlecode.wickedcharts.highcharts.options.color.RgbaColor; //导入依赖的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

示例6: GrayTheme

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