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

Java PanListener类代码示例

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

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



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

示例1: getGraph

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public GraphicalView getGraph(Context context) {
    String title = "";
    double[] xValues = new double[0];
    double[] yValues = new double[0];
    mRenderer = buildRenderer(context);
    mDataset = buildDataset(title, xValues, yValues);

    mLogic.setGraph(this);

    mChartView = ChartFactory.getLineChartView(context, mDataset, mRenderer);
    mChartView.addPanListener(new PanListener() {
        @Override
        public void panApplied() {
            mLogic.mGraphModule.updateGraphCatchErrors(Graph.this);
        }
    });
    mChartView.addZoomListener(new ZoomListener() {
        @Override
        public void zoomReset() {
            mLogic.mGraphModule.updateGraphCatchErrors(Graph.this);
        }

        @Override
        public void zoomApplied(ZoomEvent event) {
            mLogic.mGraphModule.updateGraphCatchErrors(Graph.this);
        }
    }, true, true);

    mLogic.mGraphModule.updateGraphCatchErrors(this);

    return mChartView;
}
 
开发者ID:gigabytedevelopers,项目名称:CalcMate,代码行数:33,代码来源:Graph.java


示例2: addPanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public void addPanListener(PanListener panlistener)
{
    if (g != null)
    {
        g.addPanListener(panlistener);
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:8,代码来源:TouchHandler.java


示例3: removePanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public void removePanListener(PanListener panlistener)
{
    if (g != null)
    {
        g.removePanListener(panlistener);
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:8,代码来源:TouchHandler.java


示例4: addPanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public void addPanListener(PanListener panlistener)
{
    if (e != null)
    {
        e.addPanListener(panlistener);
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:8,代码来源:TouchHandlerOld.java


示例5: removePanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public void removePanListener(PanListener panlistener)
{
    if (e != null)
    {
        e.removePanListener(panlistener);
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:8,代码来源:TouchHandlerOld.java


示例6: addPanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
/**
 * Adds a new pan listener.
 * 
 * @param listener pan listener
 */
public void addPanListener(PanListener listener) {
  if (mPan != null) {
    mPan.addPanListener(listener);
  }
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:11,代码来源:TouchHandler.java


示例7: removePanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
/**
 * Removes a pan listener.
 * 
 * @param listener pan listener
 */
public void removePanListener(PanListener listener) {
  if (mPan != null) {
    mPan.removePanListener(listener);
  }
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:11,代码来源:TouchHandler.java


示例8: onResume

import org.achartengine.tools.PanListener; //导入依赖的package包/类
@Override
protected void onResume() {
  super.onResume();
  if (mChartView == null) {
    LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
    // mChartView = ChartFactory.getLineChartView(this, mDataset, mRenderer);
    // mChartView = ChartFactory.getBarChartView(this, mDataset, mRenderer,
    // Type.DEFAULT);
    mChartView = ChartFactory.getScatterChartView(this, mDataset, mRenderer);

    // enable the chart click events
    mRenderer.setClickEnabled(true);
    mRenderer.setSelectableBuffer(100);
    mChartView.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
        // handle the click event on the chart
        SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();
        if (seriesSelection == null) {
          Toast.makeText(XYChartBuilderBackup.this, "No chart element was clicked",
              Toast.LENGTH_SHORT).show();
        } else {
          // display information of the clicked point
          double[] xy = mChartView.toRealPoint(0);
          Toast.makeText(
              XYChartBuilderBackup.this,
              "Chart element in series index " + seriesSelection.getSeriesIndex()
                  + " data point index " + seriesSelection.getPointIndex() + " was clicked"
                  + " closest point value X=" + seriesSelection.getXValue() + ", Y="
                  + seriesSelection.getValue() + " clicked point value X=" + (float) xy[0]
                  + ", Y=" + (float) xy[1], Toast.LENGTH_SHORT).show();
        }
      }
    });
    // an example of handling the zoom events on the chart
    mChartView.addZoomListener(new ZoomListener() {
      public void zoomApplied(ZoomEvent e) {
        String type = "out";
        if (e.isZoomIn()) {
          type = "in";
        }
        Log.i("Zoom", "Zoom " + type + " rate " + e.getZoomRate());
      }

      public void zoomReset() {
        Log.i("Zoom", "Reset");
      }
    }, true, true);
    // an example of handling the pan events on the chart
    mChartView.addPanListener(new PanListener() {
      public void panApplied() {
        Log.i("Pan", "New X range=[" + mRenderer.getXAxisMin() + ", " + mRenderer.getXAxisMax()
            + "], Y range=[" + mRenderer.getYAxisMax() + ", " + mRenderer.getYAxisMax() + "]");
      }
    });
    layout.addView(mChartView, new LayoutParams(LayoutParams.FILL_PARENT,
        LayoutParams.FILL_PARENT));
    boolean enabled = mDataset.getSeriesCount() > 0;
    setSeriesWidgetsEnabled(enabled);
  } else {
    mChartView.repaint();
  }
}
 
开发者ID:ddanny,项目名称:achartengine,代码行数:63,代码来源:XYChartBuilderBackup.java


示例9: onCreateView

import org.achartengine.tools.PanListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.fragment_report, container, false);

    Calendar cal = Calendar.getInstance();
    Date now = new Date();
    cal.setTime(now);
    currentTimeStamp = cal.getTimeInMillis();
    ButterKnife.bind(this, view);


    mChartView = reportGraph.getChartGraph(getActivity());

    mChartView.addZoomListener(new ZoomListener() {
        public void zoomApplied(ZoomEvent e) {
            updateLabels();
        }

        public void zoomReset() {
        }
    }, true, true);
    mChartView.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            // handle the click event on the chart
            SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();
            if (seriesSelection == null) {
                //Toast.makeText(getActivity(), "No chart element", Toast.LENGTH_SHORT).show();
            } else if(workoutType == WorkoutTypes.STEP_COUNT.getValue()){
                // display information of the clicked point
                Toast.makeText(
                        getActivity(),
                        "" + reportGraph.getDataAtPoint(seriesSelection.getXValue()) + " steps", Toast.LENGTH_SHORT).show();
            }
        }
    });
    mChartView.addPanListener(new PanListener() {
        @Override
        public void panApplied() {
            updateLabels();
        }
    });
    mChartLayout.addView(mChartView);

    // Now return the SwipeRefreshLayout as this fragment's content view
    return view;
}
 
开发者ID:blackcj,项目名称:GoogleFitExample,代码行数:48,代码来源:ReportsFragment.java


示例10: addPanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public void addPanListener(PanListener panlistener)
{
    o.addPanListener(panlistener);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:5,代码来源:GraphicalView.java


示例11: removePanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
public void removePanListener(PanListener panlistener)
{
    o.removePanListener(panlistener);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:5,代码来源:GraphicalView.java


示例12: addPanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
/**
 * Adds a new pan listener.
 * 
 * @param listener pan listener
 */
public void addPanListener(PanListener listener) {
  mTouchHandler.addPanListener(listener);
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:9,代码来源:GraphicalView.java


示例13: removePanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
/**
 * Removes a pan listener.
 * 
 * @param listener pan listener
 */
public void removePanListener(PanListener listener) {
  mTouchHandler.removePanListener(listener);
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:9,代码来源:GraphicalView.java


示例14: addPanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
/**
 * Adds a new pan listener.
 * 
 * @param listener pan listener
 */
void addPanListener(PanListener listener);
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:7,代码来源:ITouchHandler.java


示例15: removePanListener

import org.achartengine.tools.PanListener; //导入依赖的package包/类
/**
 * Removes a pan listener.
 * 
 * @param listener pan listener
 */
void removePanListener(PanListener listener);
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:7,代码来源:ITouchHandler.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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