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


Java SizeMetrics类代码示例

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


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

示例1: onPreInit

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
@Override
protected void onPreInit() {
    pieWidget = new PieWidget(
            getLayoutManager(),
            this,
            new SizeMetrics(
                    PixelUtils.dpToPix(DEFAULT_PIE_WIDGET_H_DP),
                    SizeLayoutType.FILL,
                    PixelUtils.dpToPix(DEFAULT_PIE_WIDGET_W_DP),
                    SizeLayoutType.FILL));

    pieWidget.position(
            PixelUtils.dpToPix(DEFAULT_PIE_WIDGET_X_OFFSET_DP),
            XLayoutStyle.ABSOLUTE_FROM_CENTER,
            PixelUtils.dpToPix(DEFAULT_PIE_WIDGET_Y_OFFSET_DP),
            YLayoutStyle.ABSOLUTE_FROM_CENTER,
            AnchorPosition.CENTER);

    pieWidget.setPadding(10, 10, 10, 10);

    // TODO: can't remember why this getClass() check is neccessary.  test if it actually is...
    /*if (getClass().equals(PieChart.class) && attrs != null) {
        loadAttrs(context, attrs);
    }*/
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:26,代码来源:PieChart.java

示例2: XYLegendWidget

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
public XYLegendWidget(LayoutManager layoutManager, XYPlot plot,
                      SizeMetrics widgetSizeMetrics,
                      TableModel tableModel,
                      SizeMetrics iconSizeMetrics) {
    super(layoutManager, widgetSizeMetrics);
    this.plot = plot;
    setTableModel(tableModel);
    this.iconSizeMetrics = iconSizeMetrics;
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:10,代码来源:XYLegendWidget.java

示例3: dibujarGrafica

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void dibujarGrafica(Calibrado cal){
	
	ArrayList<String> listaCons=cal.getPuntosCal();
	
	Number[] rgb=new Number[cal.getNumeroPuntos()];
       Number[] concentracion=new Number[cal.getNumeroPuntos()];
	for(int i=0; i<listaCons.size();i++){
		String[] dos=listaCons.get(i).split(";");
		rgb[i]=Double.parseDouble(dos[0]);
		concentracion[i]=Double.parseDouble(dos[1]);
	}
	
	XYSeries series1 = new SimpleXYSeries(
               Arrays.asList(concentracion),  	// Array de datos
               Arrays.asList(rgb), 			// Sólo valores verticales-- otro array
               ""); 							// Nombre de la primera serie
	
	LineAndPointFormatter series1Format = new LineAndPointFormatter(
            null,                   		// Color de la línea si pones null no hay linea
            Color.rgb(0, 100, 0),           // Color del punto
            null);              			// Relleno
 
       // Una vez definida la serie (datos y estilo), la añadimos al panel
       mySimpleXYPlot.addSeries(series1, series1Format);
       Number[] lineaX={0, 500};
       Number[] lineaY={cal.getOrdenadaOrigen(), m.calcularRGBaPartirdeConcentracion(500, cal)};
       XYSeries series2 = new SimpleXYSeries(Arrays.asList(lineaX), Arrays.asList(lineaY), "");
       mySimpleXYPlot.addSeries(series2, new LineAndPointFormatter(Color.rgb(0, 0, 100), null, null));
       
       
       mySimpleXYPlot.setDomainLabel("[Furfural] (µg/L)");
       mySimpleXYPlot.setRangeLabel("RGB");
       mySimpleXYPlot.setTitle("");
       mySimpleXYPlot.setTicksPerRangeLabel(1);
       mySimpleXYPlot.setTicksPerDomainLabel(1);
       
       mySimpleXYPlot.setDomainValueFormat(new DecimalFormat("0"));
       mySimpleXYPlot.setRangeValueFormat(new DecimalFormat("0.00"));
       mySimpleXYPlot.setDomainBoundaries(0, 600, BoundaryMode.FIXED);
       
       mySimpleXYPlot.setDomainStep(XYStepMode.SUBDIVIDE, 7);
       
       mySimpleXYPlot.getLegendWidget().setSize(new SizeMetrics(0, SizeLayoutType.ABSOLUTE, 0, SizeLayoutType.ABSOLUTE));
       mySimpleXYPlot.setPlotPadding(10, 10, 10, 10);
       mySimpleXYPlot.setDomainLabelWidget(null);
       
}
 
开发者ID:otoumas,项目名称:Furfural-Detector,代码行数:49,代码来源:VistaCalibrado.java

示例4: EmptyWidget

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
public EmptyWidget(LayoutManager layoutManager, SizeMetrics sizeMetrics) {
    super(layoutManager, sizeMetrics);
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:4,代码来源:EmptyWidget.java

示例5: PieWidget

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
public PieWidget(LayoutManager layoutManager, PieChart pieChart, SizeMetrics metrics) {
    super(layoutManager, metrics);
    this.pieChart = pieChart;
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:5,代码来源:PieWidget.java

示例6: XYGraphWidget

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
public XYGraphWidget(LayoutManager layoutManager, XYPlot plot, SizeMetrics sizeMetrics) {
    super(layoutManager, sizeMetrics);
    this.plot = plot;
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:5,代码来源:XYGraphWidget.java

示例7: getIconSizeMetrics

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
public SizeMetrics getIconSizeMetrics() {
    return iconSizeMetrics;
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:4,代码来源:XYLegendWidget.java

示例8: setIconSizeMetrics

import com.androidplot.ui.SizeMetrics; //导入依赖的package包/类
/**
 * Set the size of each legend's icon.  Note that when using relative sizing,
 * the size is calculated against the countaining cell's size, not the plot's size.
 * @param iconSizeMetrics
 */
public void setIconSizeMetrics(SizeMetrics iconSizeMetrics) {
    this.iconSizeMetrics = iconSizeMetrics;
}
 
开发者ID:LoriLori,项目名称:androidCgmMonitor,代码行数:9,代码来源:XYLegendWidget.java


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