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

Java LineGraph类代码示例

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

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



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

示例1: initLineGrapth

import com.echo.holographlibrary.LineGraph; //导入依赖的package包/类
/**
 * 折れ線グラフを初期化する。
 */
private void initLineGrapth() {
    LineGraph lineGraph = (LineGraph) findViewById(R.id.linegraph);

    Line line = new Line();
    line.addPoint(createPointForLine(0, 5));
    line.addPoint(createPointForLine(2, 8));
    line.addPoint(createPointForLine(4, 6));
    line.addPoint(createPointForLine(8, 10));
    line.addPoint(createPointForLine(10, 4));
    line.setColor(Color.parseColor("#FFBB33"));

    lineGraph.addLine(line);
    lineGraph.setRangeY(0, 10);
    lineGraph.setOnPointClickedListener(new OnPointClickedListener() {
        @Override
        public void onClick(int lineIndex, int pointIndex) {

        }
    });

}
 
开发者ID:android-opensource-library-56,项目名称:android-opensource-library-56,代码行数:25,代码来源:HoloGraphLibrarySampleActivity.java


示例2: addStatPoint

import com.echo.holographlibrary.LineGraph; //导入依赖的package包/类
public static void addStatPoint(int X, int Y, Line line, LineGraph graph) {
    LinePoint point = new LinePoint();
    point.setX(X);
    point.setY(Y);
    line.addPoint(point);
    graph.addLine(line);
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:8,代码来源:CPUControl.java


示例3: getViews

import com.echo.holographlibrary.LineGraph; //导入依赖的package包/类
private void getViews() {
   li = (LineGraph)findViewById(R.id.linegraph);
   btnAdd = (Button)findViewById(R.id.btnAdd);
   btnShift = (Button)findViewById(R.id.btnShift);
   btnScan = (Button)findViewById(R.id.btnScan);
   tvNetresult = (TextView)findViewById(R.id.tvNetresult);
   btnFetch = (Button)findViewById(R.id.btnFetch);
   tvTemp = (TextView)findViewById(R.id.tvTemp);
   tvPres = (TextView)findViewById(R.id.tvPres);
   tvHumi = (TextView)findViewById(R.id.tvHumi);
}
 
开发者ID:bradipao,项目名称:Arduino-snippets,代码行数:12,代码来源:MainActivity.java


示例4: getViews

import com.echo.holographlibrary.LineGraph; //导入依赖的package包/类
private void getViews() {
   lineGraph = (LineGraph)findViewById(R.id.tempGraph);
   btnSingle = (Button)findViewById(R.id.btnSingle);
   btnHistory = (Button)findViewById(R.id.btnHistory);
   btnContinuous = (Button)findViewById(R.id.btnContinuous);
   btnConnect = (Button)findViewById(R.id.btnConnect);
   tvResult = (TextView)findViewById(R.id.tvResult);
   tvTemp = (TextView)findViewById(R.id.tvTemp);
   tvHumi = (TextView)findViewById(R.id.tvHumi);
   tvTempMax = (TextView)findViewById(R.id.tvTempMax);
   tvHumiMax = (TextView)findViewById(R.id.tvHumiMax);
   tvTempMin = (TextView)findViewById(R.id.tvTempMin);
   tvHumiMin = (TextView)findViewById(R.id.tvHumiMin);
}
 
开发者ID:bradipao,项目名称:Arduino-snippets,代码行数:15,代码来源:MainActivity.java


示例5: getViews

import com.echo.holographlibrary.LineGraph; //导入依赖的package包/类
private void getViews() {
   lineGraph = (LineGraph)findViewById(R.id.tempGraph);
   btnSingle = (Button)findViewById(R.id.btnSingle);
   btnContinuous = (Button)findViewById(R.id.btnContinuous);
   btnConnect = (Button)findViewById(R.id.btnConnect);
   tvResult = (TextView)findViewById(R.id.tvResult);
   tvTemp = (TextView)findViewById(R.id.tvTemp);
   tvHumi = (TextView)findViewById(R.id.tvHumi);
   pbBusy = (ProgressBar)findViewById(R.id.pbBusy);
}
 
开发者ID:bradipao,项目名称:Arduino-snippets,代码行数:11,代码来源:MainActivity.java


示例6: initData

import com.echo.holographlibrary.LineGraph; //导入依赖的package包/类
private void initData() {

        SubjectTest firstDegreeTest = mSubject.getTestByDegree(SubjectTest.Degree.FIRST_DEGREE);
        Float firstDegreeTestGrade = (firstDegreeTest != null) ? firstDegreeTest.grade : null;

        SubjectTest secondDegreeTest = mSubject.getTestByDegree(SubjectTest.Degree.SECOND_DEGREE);
        Float secondDegreeTestGrade = (secondDegreeTest != null) ? secondDegreeTest.grade : null;

        SubjectTest finalDegreeTest = mSubject.getTestByDegree(SubjectTest.Degree.FINAL_DEGREE);
        Float finalDegreeTestGrade = (finalDegreeTest != null) ? finalDegreeTest.grade : null;

        ArrayList<Float> grades = new ArrayList<Float>();
        grades.add(firstDegreeTestGrade);
        grades.add(secondDegreeTestGrade);
        grades.add(finalDegreeTestGrade);


        // Creating graph structure
        LineGraph graph = (LineGraph) findViewById(R.id.linegraph);
        graph.setUsingDips(true);

        graph.setRangeY(0, 10);
        graph.setRangeX(0, grades.size() - 1);
        graph.setLineToFill(1);

        // Creating Grade Line
        Line gradeLine = new Line();
        gradeLine.setUsingDips(true);
        gradeLine.setColor(getContext().getResources().getColor(R.color.unicap_base));

        for (int i = 0; i < grades.size(); i++) {
            if (grades.get(i) != null) {
                gradeLine.addPoint(createGradePoint(i, grades.get(i)));
            }
        }

        graph.addLine(gradeLine);

        // Creating Average Line
        Line averageLine = new Line();
        averageLine.setColor(getContext().getResources().getColor(android.R.color.darker_gray));
        averageLine.setUsingDips(true);
        averageLine.setStrokeWidth(1);
        averageLine.setShowingPoints(false);

        averageLine.addPoint(createAveragePoint(0));
        averageLine.addPoint(createAveragePoint(grades.size() - 1));

        graph.addLine(averageLine);

    }
 
开发者ID:gabrielduque,项目名称:unicap,代码行数:52,代码来源:SubjectGradesProgressCard.java


示例7: onCreate

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

    //ready
    graph = (LineGraph) findViewById(R.id.holo_graph_view);
    graphButton1 = (Button) findViewById(R.id.btn_emg1);
    graphButton2 = (Button) findViewById(R.id.btn_emg2);
    graphButton3 = (Button) findViewById(R.id.btn_emg3);
    graphButton4 = (Button) findViewById(R.id.btn_emg4);
    graphButton5 = (Button) findViewById(R.id.btn_emg5);
    graphButton6 = (Button) findViewById(R.id.btn_emg6);
    graphButton7 = (Button) findViewById(R.id.btn_emg7);
    graphButton8 = (Button) findViewById(R.id.btn_emg8);


    //set color
    graphButton1.setBackgroundColor(Color.argb(0x66, 0xff, 0, 0xff));
    graphButton2.setBackgroundColor(Color.argb(0x66, 0xff, 0x00, 0x00));
    graphButton3.setBackgroundColor(Color.argb(0x66, 0x66, 0x33, 0xff));
    graphButton4.setBackgroundColor(Color.argb(0x66, 0xff, 0x66, 0x33));
    graphButton5.setBackgroundColor(Color.argb(0x66, 0xff, 0x33, 0x66));
    graphButton6.setBackgroundColor(Color.argb(0x66, 0x00, 0x33, 0xff));
    graphButton7.setBackgroundColor(Color.argb(0x66, 0x00, 0x33, 0x33));
    graphButton8.setBackgroundColor(Color.argb(0x66, 0x66, 0xcc, 0x66));

    emgDataText = (TextView)findViewById(R.id.emgDataTextView);
    gestureText = (TextView)findViewById(R.id.gestureTextView);
    mHandler = new Handler();

    startNopModel();

    BluetoothManager mBluetoothManager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
    mBluetoothAdapter = mBluetoothManager.getAdapter();

    Intent intent = getIntent();
    deviceName = intent.getStringExtra(ListActivity.TAG);

    if (deviceName != null) {
        // Ensures Bluetooth is available on the device and it is enabled. If not,
        // displays a dialog requesting user permission to enable Bluetooth.
        if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {
            Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
            startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
        } else {
            // Scanning Time out by Handler.
            // The device scanning needs high energy.
            mHandler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    mBluetoothAdapter.stopLeScan(MainActivity.this);
                }
            }, SCAN_PERIOD);
            mBluetoothAdapter.startLeScan(this);
        }
    }
}
 
开发者ID:meleap,项目名称:myo_AndoridEMG,代码行数:59,代码来源:MainActivity.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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