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

Java PointLabelFormatter类代码示例

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

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



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

示例1: onCreate

import com.androidplot.xy.PointLabelFormatter; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    DsSensorManager.checkBtLePermissions(this, true);

    mPlot = (XYPlot) findViewById(R.id.plotViewA);
    mPlotData = new SimpleXYSeries("Sensor Values");
    mPlotData.useImplicitXVals();
    mPlot.addSeries(mPlotData, new LineAndPointFormatter(Color.rgb(100, 100, 200), null, null, new PointLabelFormatter(Color.DKGRAY)));
    mPlot.setDomainLabel("Sample Index");
    mPlot.setRangeLabel("Value");
}
 
开发者ID:gradlman,项目名称:SensorLib,代码行数:15,代码来源:MainActivity.java


示例2: updatePlot

import com.androidplot.xy.PointLabelFormatter; //导入依赖的package包/类
/**
 * Method changes which points and what color is rendered
 */
public void updatePlot() {
	// Remove all current series from each plot
	Iterator<XYSeries> iterator1 = audiogram.getSeriesSet().iterator();
	while (iterator1.hasNext()) {
		XYSeries setElement = iterator1.next();
		audiogram.removeSeries(setElement);
	}
	drawBackground();

	if (leftEarButton.isChecked()) {
		// Create a formatter to use for drawing a series using
		// LineAndPointRenderer
		// and configure it from xml:
		LineAndPointFormatter series1Format = new LineAndPointFormatter();
		series1Format.setPointLabelFormatter(new PointLabelFormatter());
		series1Format.configure(getApplicationContext(),
				R.xml.line_point_formatter_with_plf1);
		audiogram.clear();
		series1 = (SimpleXYSeries) getSeries(); // call getSeries function
		// add a new series' to the xyplot:
		audiogram.addSeries(series1, series1Format);
		audiogram.redraw(); // redraw series
	}

	else {
		LineAndPointFormatter series2Format = new LineAndPointFormatter();
		series2Format.setPointLabelFormatter(new PointLabelFormatter());
		series2Format.configure(getApplicationContext(),
				R.xml.line_point_formatter_with_plf2);
		audiogram.clear();
		series2 = (SimpleXYSeries) getSeries(); // call getSeries function
		// add a new series' to the xyplot:
		audiogram.addSeries(series2, series2Format);
		audiogram.redraw();
	}
}
 
开发者ID:JunSoftware109,项目名称:AndroidProjectHearing,代码行数:40,代码来源:HearingTestActivity.java


示例3: addSeriesPlot

import com.androidplot.xy.PointLabelFormatter; //导入依赖的package包/类
/**
 * Add a series to the plot.
 * 
 * @param seriesName
 *            The name of the series.
 * @param key
 *            The unique series key.
 * @param color
 *            The series color.
 */
public void addSeriesPlot(String seriesName, int key, int color)
{
	history.append(key, new LinkedList<Number>());

	series.append(key, new SimpleXYSeries(seriesName));

	LineAndPointFormatter formatter = new LineAndPointFormatter(Color.rgb(
			0, 153, 204), Color.rgb(0, 153, 204), Color.TRANSPARENT,
			new PointLabelFormatter(Color.TRANSPARENT));

	Paint linePaint = new Paint();
	linePaint.setAntiAlias(true);
	linePaint.setStyle(Paint.Style.STROKE);
	linePaint.setColor(color);
	linePaint.setStrokeWidth(LINE_WIDTH);

	formatter.setLinePaint(linePaint);

	Paint vertexPaint = new Paint();
	vertexPaint.setAntiAlias(true);
	vertexPaint.setStyle(Paint.Style.STROKE);
	vertexPaint.setColor(color);
	vertexPaint.setStrokeWidth(VERTEX_WIDTH);

	formatter.setVertexPaint(vertexPaint);

	dynamicPlot.addSeries(series.get(key), formatter);
}
 
开发者ID:KalebKE,项目名称:AccelerationAlert,代码行数:39,代码来源:DynamicPlot.java


示例4: onCreate

import com.androidplot.xy.PointLabelFormatter; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_serial_console);

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    mTitleTextView = (TextView) findViewById(R.id.demoTitle);
    mDumpTextView = (TextView) findViewById(R.id.consoleText);
    mScrollView = (ScrollView) findViewById(R.id.demoScroller);

    // Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    // setSupportActionBar(toolbar);

    plot = (XYPlot) findViewById(R.id.plot);

    plot.setRangeBoundaries(1,1, BoundaryMode.AUTO);
    // create a couple arrays of y-values to plot:
    // Number[] series1Numbers = {1, 4, 2, 8, 4, 16, 8, 32, 16, 64};

    // turn the above arrays into XYSeries':
    // (Y_VALS_ONLY means use the element index as the x value)
    // series1 = new SimpleXYSeries(Arrays.asList(series1Numbers), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "Nesto1");

    series1 = new SimpleXYSeries("Values");
    series1.useImplicitXVals();

    // create formatters to use for drawing a series using LineAndPointRenderer
    // and configure them from xml:
    LineAndPointFormatter series1Format = new LineAndPointFormatter();
    series1Format.setPointLabelFormatter(new PointLabelFormatter());
    series1Format.configure(getApplicationContext(),
            R.xml.line_point_formatter_with_labels);

    LineAndPointFormatter series2Format = new LineAndPointFormatter();
    series2Format.setPointLabelFormatter(new PointLabelFormatter());
    series2Format.configure(getApplicationContext(),
            R.xml.line_point_formatter_with_labels_2);

    // see: http://androidplot.com/smooth-curves-and-androidplot/
    series1Format.setInterpolationParams(
            new CatmullRomInterpolator.Params(10, CatmullRomInterpolator.Type.Centripetal));

    // add a new series' to the xyplot:
    plot.addSeries(series1, series1Format);

    // reduce the number of range labels
    plot.setTicksPerRangeLabel(3);

    // rotate domain labels 45 degrees to make them more compact horizontally:
    plot.getGraphWidget().setDomainLabelOrientation(-45);

    if (savedInstanceState != null) {
        savedInstanceState.getSerializable("sport");
        savedInstanceState.getBoolean("chDetect");
    }

}
 
开发者ID:kost,项目名称:DroidMeter,代码行数:59,代码来源:SerialConsoleActivity.java


示例5: CustomPointFormatter

import com.androidplot.xy.PointLabelFormatter; //导入依赖的package包/类
public CustomPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor, PointLabelFormatter plf)
{
    super(lineColor, vertexColor, fillColor, plf, FillDirection.BOTTOM);
}
 
开发者ID:sztyler,项目名称:sensordatacollector,代码行数:5,代码来源:CustomPointFormatter.java


示例6: createLineAndPointFormatter

import com.androidplot.xy.PointLabelFormatter; //导入依赖的package包/类
private LineAndPointFormatter createLineAndPointFormatter(int color,float width, boolean line) {
	LineAndPointFormatter series1Format = new LineAndPointFormatter();
       PointLabelFormatter pointLabelFormatter = new PointLabelFormatter();
       series1Format.setPointLabeler(new PointLabeler() {
		
		@Override
		public String getLabel(XYSeries series, int index) {
			
			return "";
		}
	});
	series1Format.setPointLabelFormatter(pointLabelFormatter);
       series1Format.configure(getApplicationContext(),
               R.xml.line_point_formatter_with_plf1);
       Paint lp = series1Format.getLinePaint();
       lp.setColor(color);
       lp.setAntiAlias(false);
       lp.setStrokeWidth(width);
       if(line) {
       	series1Format.setVertexPaint(null);
       	series1Format.setLinePaint(lp);
       } else {
       	Paint linep = new Paint(lp);
       	linep.setStrokeWidth(1);
       	linep.setColor(color);
       	series1Format.setLinePaint(null);
       	series1Format.setVertexPaint(lp);
       }
       series1Format.setPointLabelFormatter(null);
	return series1Format;
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:32,代码来源:MainActivity.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java RepositoryProvider类代码示例发布时间:2022-05-22
下一篇:
Java Bookmark类代码示例发布时间: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