• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Options类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getTrafficLightOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
private Options getTrafficLightOptions(){
	Options options = new Options();
	if(lastBuildSuccess != null){
	    HexColor color = getTrafficLightColor(lastBuildSuccess.getValue());
	
   		options.setChartOptions(new ChartOptions()
   	        .setPlotBackgroundColor(new NullColor())
   	        .setPlotBorderWidth(null)
   	        .setHeight(250)
   	        .setPlotShadow(Boolean.FALSE));
   		options.setTitle(new Title("Latest Build Status"));
   		options.setSubtitle(new Title(projectName));
   		
   		options.setPlotOptions(new PlotOptionsChoice()
   	        .setPie(new PlotOptions()
   	            .setAllowPointSelect(Boolean.FALSE)
   	            .setBorderWidth(0) // to make it look like a "traffic light"
   	            .setCursor(Cursor.POINTER)));
    
   		options.addSeries(new PointSeries()
   	        .setType(SeriesType.PIE)
   	        .addPoint(new Point(lastBuildSuccess.getValue(), 100).setColor(color)));
	}
	return options;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:26,代码来源:JenkinsWidgetView.java


示例2: getPointWithWickedChartsId

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Retrieves the {@link Point} object with the given wickedChartsId from the
 * given {@link Options} object. Returns null if a Point with the given ID
 * does not exist.
 */
public static Point getPointWithWickedChartsId(final Options options, final int wickedChartsId) {
	for (Series<?> series : options.getSeries()) {
		for (Object object : series.getData()) {
			if (!(object instanceof Point)) {
				break;
			} else {
				Point point = (Point) object;
				if (point.getWickedChartsId() == wickedChartsId) {
					return point;
				}
			}
		}
	}
	return null;
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:21,代码来源:OptionsUtil.java


示例3: processOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
@Override
public void processOptions(final Options options, final OptionsProcessorContext context) {
	List<IProcessableOption> processables = options.getMarkedForProcessing(LiveDataSeries.PROCESSING_KEY);
	LiveDataFunction function = new LiveDataFunction();
	if (processables.size() > 1) {
		throw new RuntimeException("Only one LiveDataSeries per chart allowed!");
	}
	for (IProcessableOption processable : processables) {
		LiveDataSeries series = (LiveDataSeries) processable;

		LiveDataAjaxBehavior behavior = getBehaviorFromComponent(this.component, series);
		if (behavior == null) {
			behavior = new LiveDataAjaxBehavior(series);
			this.component.add(behavior);
		}
		behavior.addJavaScriptValues(series.getJavaScriptParameters());
		function.addLiveDataSeries(options, behavior);
	}
	OptionsUtil.getInstance().setChartEventsLoad(options, function);
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:21,代码来源:LiveDataProcessor.java


示例4: processOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
@Override
public void processOptions(final Options options, final OptionsProcessorContext context) {

	List<SelectionFunction> functions = context.getSelectionFunctions();
	for (final SelectionFunction function : functions) {

		// add server side AJAX event
		SelectionBehavior selectionBehavior = new SelectionBehavior() {
			@Override
			public void onSelection(final SelectionEvent event, final AjaxRequestTarget target) {
				WicketSelectionEvent wicketEvent = new WicketSelectionEvent(target, event);
				function.onSelect(wicketEvent);
			}
		};
		this.chart.add(selectionBehavior);

		// add client side javascript to trigger an AJAX call
		String functionBody = selectionBehavior.getCallbackScript().toString();
		function.setFunction(functionBody);
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:22,代码来源:SelectionProcessor.java


示例5: renderHead

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
@Override
public void renderHead(final Component component, final IHeaderResponse response) {

	component.setOutputMarkupId(true);
	Options options = this.chart.getOptions();
	final String id = component.getMarkupId();
	OptionsUtil.getInstance().setRenderTo(options, id);

	JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer();
	includeJavascriptDependencies(response, options);
	addTheme(response, renderer);

	OptionsProcessorContext context = new OptionsProcessorContext(options);

	DrilldownProcessor drilldownProcessor = new DrilldownProcessor(component, response);
	drilldownProcessor.processOptions(options, context);

	GlobalProcessor globalProcessor = new GlobalProcessor(response);
	globalProcessor.processOptions(options, context);

	includeChartJavascript(response, options, renderer, id);
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:23,代码来源:ChartBehavior.java


示例6: addDrilldownFunction

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Adds a {@link DrilldownFunction} to the {@link PlotOptions} of the given
 * {@link Options}.
 * 
 * @param options
 *          the {@link Options} to add a {@link DrilldownFunction} to
 */
private void addDrilldownFunction(Options options, OptionsProcessorContext context) {
  SeriesType chartType = options.getChartOptions().getType();
  if (options.getPlotOptions() == null) {
    options.setPlotOptions(new PlotOptionsChoice());
  }
  if (options.getPlotOptions().getPlotOptions(chartType) == null) {
    options.getPlotOptions().setPlotOptions(new PlotOptions(), chartType);
  }
  if (options.getPlotOptions().getPlotOptions(chartType).getPoint() == null) {
    options.getPlotOptions().getPlotOptions(chartType).setPoint(new PointOptions());
  }
  if (options.getPlotOptions().getPlotOptions(chartType).getPoint().getEvents() == null) {
    options.getPlotOptions().getPlotOptions(chartType).getPoint().setEvents(new Events());
  }
  options.getPlotOptions().getPlotOptions(chartType).getPoint().getEvents()
      .setClick(new DrilldownFunction(getDrilldownArrayName(component)));
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:25,代码来源:DrilldownProcessor.java


示例7: respond

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
@Override
protected void respond(final AjaxRequestTarget target) {
	Chart chart = (Chart) getComponent();
	Options options = chart.getOptions();

	InteractionEvent event = new InteractionEvent();
	event.setJavascriptChartName(chart.getJavaScriptVarName());

	StringValue selectedPointValue = getVariableValue(SELECTED_POINT);
	if (selectedPointValue != null && !"".equals(selectedPointValue.toString())) {
		Integer selectedPoint = selectedPointValue.toInteger();
		Point point = OptionsUtil.getPointWithWickedChartsId(options, selectedPoint);
		event.setSelectedPoint(point);
	}

	StringValue selectedSeriesValue = getVariableValue(SELECTED_SERIES);
	if (selectedSeriesValue != null && !"".equals(selectedSeriesValue.toString())) {
		Integer selectedSeries = selectedSeriesValue.toInteger();
		Series<?> series = OptionsUtil.getSeriesWithWickedChartsId(options, selectedSeries);
		event.setSelectedSeries(series);
	}

	event.setSelectedChart(options);

	onEvent(event, target);
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:27,代码来源:InteractionBehavior.java


示例8: processOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
@Override
public void processOptions(final Options options, final OptionsProcessorContext context) {

	List<InteractionFunction> functions = context.getInteractionFunctions();
	for (final InteractionFunction function : functions) {

		// add server side AJAX event
		InteractionBehavior interactionBehavior = new InteractionBehavior() {
			@Override
			public void onEvent(final InteractionEvent event, final AjaxRequestTarget target) {
				WicketInteractionEvent wicketEvent = new WicketInteractionEvent(target, event);
				function.onInteraction(wicketEvent);
			}
		};
		this.chart.add(interactionBehavior);

		// add client side javascript to trigger an AJAX call
		String functionBody = interactionBehavior.getCallbackScript().toString();
		function.setFunction(functionBody);
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:22,代码来源:InteractionProcessor.java


示例9: createChartBehavior

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Hack to make it run a StockChart instead of normal Chart.
 */
@Override
protected ChartBehavior createChartBehavior() {
    return new ChartBehavior(this) {
        @Override
        protected void includeChartJavascript(final IHeaderResponse response, final Options options,
                final JsonRenderer renderer, final String markupId) {
            final String chartVarname = RefreshingStockChart.this.getJavaScriptVarName();
            final String optionsVarname = markupId + "Options";
            response.render(OnDomReadyHeaderItem.forScript(
                    MessageFormat.format("var {0} = {1};window.{2} = new Highcharts.StockChart({0});",
                            optionsVarname, renderer.toJson(options), chartVarname)));
        }
    };
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:18,代码来源:StockChart.java


示例10: getChartOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * 
 * @param 
 * @return
 */
public Options getChartOptions(List<SonarMetricMeasurement> metrics ){			
		
		String group;
		if (settings.get("metric") == null) {
			group = "Code Lines related";
		} else {
			group = settings.get("metric");
		}
		
		// get latest
		List<SonarMetricMeasurement> latestMetrics = getLatestMetricDataSet(metrics);
		List<SonarMetricMeasurement> metricGroup = getMetricsForGroup(group, latestMetrics);
	
		Options options = new Options();
		ChartOptions chartOptions =  new ChartOptions();
		SeriesType seriesType = SeriesType.COLUMN; 
		chartOptions.setType(seriesType);    
		Title chartTitle = new Title(title + " of " + group + " Metrics");
		options.setTitle(chartTitle);

		for(SonarMetricMeasurement metric: metricGroup){				
			PointSeries series = new PointSeries();	
			series.setType(seriesType);
			series.addPoint(new Point(metric.getSonarMetric(), new Double(metric.getValue())));
			series.setName(metric.getSonarMetric());
			options.addSeries(series);
		}
		options.setChartOptions(chartOptions);	
		
		return options;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:37,代码来源:SonarQualityWidget.java


示例11: getChartOptionsDifferently

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
public Options getChartOptionsDifferently(List<SonarMetricMeasurement> metrics,String individualMetric) {

        String group;
        if (settings.get("metric") == null) {
            group = "Code Lines related";
        } else {
            group = settings.get("metric");
        }

        // get latest
        //List<SonarMetricMeasurement> latestMetrics = getLatestMetricDataSet(metrics);
       // List<SonarMetricMeasurement> metricGroup = getMetricsForGroup(group, latestMetrics);

        Options options = new Options();
        ChartOptions chartOptions = new ChartOptions();
        SeriesType seriesType = SeriesType.COLUMN;
        chartOptions.setType(seriesType);
        Title chartTitle = new Title(title + " of " + group + " Metrics");
        options.setTitle(chartTitle);

        for (SonarMetricMeasurement metric : metrics) {
            
            if(metric.getSonarMetric().compareToIgnoreCase(individualMetric) == 0){
            PointSeries series = new PointSeries();
            series.setType(seriesType);
            series.addPoint(new Point(metric.getSonarMetric(), new Double(metric.getValue())));
            series.setName(metric.getSonarMetric());
            options.addSeries(series);
            }
        }
        options.setChartOptions(chartOptions);

        return options;
    }
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:35,代码来源:SonarQualityWidget.java


示例12: getChartOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * 
 * @param
 * @return
 */
private Options getChartOptions() {

    Options options = new Options();
    options.setChartOptions(new ChartOptions().setType(SeriesType.valueOf(chartType)));
    options.setTitle(new Title("Jira Metrics (" + timeInterval + ")"));
    options.setxAxis(new Axis().setCategories(UQasarUtil.getJiraMetricNamesAbbreviated()));
    options.setyAxis(new Axis().setTitle(new Title("Number of issues")));

    List<Number> resItems = new ArrayList<>();
    for (JiraMetricMeasurement jiraMeasurement : measurements) {
        int count;
        try {
            if (timeInterval.compareToIgnoreCase("Latest") == 0) {
                count = getDataService().countMeasurementsPerProjectByMetricWithLatestDate(project,
                    jiraMeasurement.getJiraMetric());
            }
            count = getDataService().countMeasurementsPerProjectByMetricWithinPeriod(project,
                jiraMeasurement.getJiraMetric(), timeInterval);
            resItems.add(count);
        } catch (uQasarException e1) {
            e1.printStackTrace();
        }
    }

    options.addSeries(new SimpleSeries().setName("Jira Data").setData(resItems));

    return options;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:34,代码来源:WidgetForJIRAView.java


示例13: getChartOptionsDifferently

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * 
 * @param
 * @return
 */
private Options getChartOptionsDifferently() {

    Options options = new Options();
    options.setChartOptions(new ChartOptions().setType(SeriesType.valueOf(chartType)));
    options.setTitle(new Title("Jira Metrics (" + timeInterval + ")"));
    options.setxAxis(new Axis().setCategories(UQasarUtil.getJiraMetricNamesAbbreviated()));
    options.setyAxis(new Axis().setTitle(new Title("Number of issues")));

    List<Number> resItems = new ArrayList<>();
    for (JiraMetricMeasurement jiraMeasurement : measurements) {

        if (jiraMeasurement.getJiraMetric().equals(individualMetric)) {
            int count;
            try {
                if (timeInterval.compareToIgnoreCase("Latest") == 0) {
                    count = getDataService().countMeasurementsPerProjectByMetricWithLatestDate(project,
                        jiraMeasurement.getJiraMetric());
                }
                count = getDataService().countMeasurementsPerProjectByMetricWithinPeriod(project,
                    jiraMeasurement.getJiraMetric(), timeInterval);
                resItems.add(count);
            } catch (uQasarException e1) {
                e1.printStackTrace();
            }
        }
    }

    options.addSeries(new SimpleSeries().setName("Jira Data").setData(resItems));

    return options;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:37,代码来源:WidgetForJIRAView.java


示例14: historicChart

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * @return Returns a graphical representation of all the values, 
 * 		   thresholds and target value by date 
 */
private Chart historicChart(){
	Options options = new Options();
	options.setTitle(new Title(project.getName()));
	
	List<Number> values = new ArrayList<>();
	List<Number> upLimit = new ArrayList<>();
	List<Number> lowLimit = new ArrayList<>();
	List<String> dates = new ArrayList<>();
	
	// Prepare information to be show in the graphic
	for (AbstractHistoricValues h : historicalService.getAllHistValuesForProjectAsc(projectId)) {
		values.add(h.getValue());
		upLimit.add(h.getUpperAcceptanceLimit());
		lowLimit.add(h.getLowerAcceptanceLimit());
		dates.add(new SimpleDateFormat("dd.MM.yyyy").format(h.getDate()));
	}
	
	// X Axis
	Axis xAxis = new Axis();
	xAxis.setCategories(dates);
	options.setxAxis(xAxis);
	
	// Y Axis
	Axis yAxis = new Axis();
	options.setyAxis(yAxis);
	
	// Adding series to the graphic
	options.addSeries(new SimpleSeries().setName("Value").setData(values));
	options.addSeries(new SimpleSeries().setName("UpLimit").setData(upLimit));
	options.addSeries(new SimpleSeries().setName("LowLimit").setData(lowLimit));
	
	// Legend
	Legend legend = new Legend();
	legend.setBorderWidth(0);
	options.setLegend(legend);
	
	return new Chart("chart",options);
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:43,代码来源:HistoricProjectPage.java


示例15: OptionsProcessorContext

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
public OptionsProcessorContext(final Options options) {
	collectDrilldownOptions(options);
	collectLiveDataSeries(options);
	collectInteractionFunctions(options);
	collectSelectionFunctions(options);
	this.global = options.getGlobal();

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


示例16: collectDrilldownOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Iterates recursively through all {@link DrilldownPoint}s and their
 * drilldownOptions in the given {@link Options} and adds them to the context.
 */
@SuppressWarnings("unchecked")
private void collectDrilldownOptions(final Options options) {
	List<? extends IProcessableOption> drilldownPoints = options.getMarkedForProcessing(DrilldownPoint.PROCESSING_KEY);
	for (DrilldownPoint drilldownPoint : (List<DrilldownPoint>) drilldownPoints) {
		Options drilldownOptions = drilldownPoint.getDrilldownOptions();
		if (!getDrilldownOptions().contains(drilldownOptions)) {
			getDrilldownOptions().add(drilldownOptions);
			collectDrilldownOptions(drilldownOptions);
		}
		drilldownPoint.setDrilldownOptionsIndex(getDrilldownOptions().indexOf(drilldownOptions));
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:17,代码来源:OptionsProcessorContext.java


示例17: processOptions

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
@Override
public void processOptions(Options options, OptionsProcessorContext context) {
	for (Feature feature : Feature.values()) {
		if (!supportedFeatures.contains(feature) && context.containsFeature(feature)) {
			throw new UnsupportedFeatureException(feature);
		}
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:9,代码来源:FeatureCheckingOptionsProcessor.java


示例18: copyRenderTo

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Copies the renderTo configuration from one {@link Options} object to
 * another. Null-safe.
 */
public void copyRenderTo(final Options from, final Options to) {
	if (to.getChartOptions() == null) {
		to.setChartOptions(new ChartOptions());
	}
	to.getChartOptions().setRenderTo(from.getChartOptions().getRenderTo());
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:11,代码来源:OptionsUtil.java


示例19: setRenderTo

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Null-safe setter for the renderTo configuration.
 */
public void setRenderTo(final Options options, final String renderTo) {
	if (options.getChartOptions() == null) {
		options.setChartOptions(new ChartOptions());
	}
	options.getChartOptions().setRenderTo(renderTo);
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:10,代码来源:OptionsUtil.java


示例20: setChartEventsLoad

import com.googlecode.wickedcharts.highcharts.options.Options; //导入依赖的package包/类
/**
 * Null-safe setter for the chart.events.load configuration.
 */
public void setChartEventsLoad(final Options options, final Function function) {
	if (options.getChartOptions() == null) {
		options.setChartOptions(new ChartOptions());
	}
	if (options.getChartOptions().getEvents() == null) {
		options.getChartOptions().setEvents(new Events());
	}
	if (options.getChartOptions().getEvents().getLoad() == null) {
		options.getChartOptions().getEvents().setLoad(function);
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:15,代码来源:OptionsUtil.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CorbaResponseWaitingRoomImpl类代码示例发布时间:2022-05-22
下一篇:
Java OAInvocationInfo类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap