EnableScanner属性在ngx-scanner中不起作用

时间:2019-04-05 10:41:59

标签: angular barcode-scanner

即使将EnableScanner属性设置为false,照相机扫描仪也能够扫描条形码,但是据我的理解,只有在EnableScanner属性为true时,照相机才应该扫描和解码条形码。

    XYSeriesCollection lineChartDataAD = new XYSeriesCollection();

    XYSeries seriesAD = new XYSeries("Real Surface Heights", false, true);

    for (int m = 0; m < pt.delayedy.length - 1; m++) {

        seriesAD.add((double)pt.delayedy[m], (double)pt.delayedy[m+1]);

    }

    lineChartDataAD.addSeries(seriesAD);               

    if (jRadioButton10.isSelected()) { //as it is       checkbox2.getState() == true
        pt.xaxisAD = pt.yvar+" ("+pt.xvar+") ["+pt.yunit+"]";
        pt.yaxisADsupport = String.format("%f", (pt.xspace*pt.delay));
        //pt.yaxisAD = pt.yvar +" (i+"+pt.yaxisADsupport+")";
        pt.yaxisAD = pt.yvar+" ("+pt.xvar+"+d) ["+pt.yunit+"]";
        jLabel44.setText("(Delay (d) = "+pt.yaxisADsupport+" "+pt.xunit+")");
    }
    else if (jRadioButton11.isSelected()) { //as time series  checkbox1.getState() == true
        //pt.yaxisAD = pt.yvar +" (i+"+pt.delay+")";
        pt.xaxisAD = pt.yvar+" (i) ["+pt.yunit+"]";
        pt.yaxisAD = pt.yvar +" (i+d) ["+pt.yunit+"]";
        jLabel44.setText("(Delay (d) = "+pt.delay+")");
    }


    JFreeChart lineChartAD = ChartFactory.createXYLineChart("", pt.xaxisAD, pt.yaxisAD, (XYDataset) lineChartDataAD, PlotOrientation.VERTICAL, false, false, false);

    XYPlot plotAD  = lineChartAD.getXYPlot();

    NumberAxis D = (NumberAxis) plotAD.getDomainAxis();
    NumberAxis R = (NumberAxis) plotAD.getRangeAxis();

    D.setRange(R.getRange());
    D.setTickUnit(R.getTickUnit());                

    XYLineAndShapeRenderer rendererAD = new XYLineAndShapeRenderer();

    rendererAD.setSeriesPaint(0, Color.BLACK);
    double sizeAD = 0;
    double deltaAD = sizeAD / 2.0;
    Shape shapeAD = new Rectangle2D.Double(-deltaAD, -deltaAD, sizeAD, sizeAD);
    rendererAD.setSeriesShape(0, shapeAD);
    rendererAD.setSeriesStroke(0, new BasicStroke(1.0f));

    Font F1AD = new Font ("Times New Roman", Font.PLAIN, 14);

    plotAD.getDomainAxis().setLabelFont(F1AD);
    plotAD.getRangeAxis().setLabelFont(F1AD);

    plotAD.setOutlinePaint(Color.BLACK);
    plotAD.setOutlineStroke(new BasicStroke(0.5f));
    plotAD.setRenderer(rendererAD);
    plotAD.setBackgroundPaint(Color.WHITE);
    plotAD.setRangeGridlinesVisible(true);
    plotAD.setRangeGridlinePaint(Color.GRAY);
    plotAD.setDomainGridlinesVisible(true);
    plotAD.setDomainGridlinePaint(Color.GRAY);

    ChartPanel linePanelAD = new ChartPanel(lineChartAD, true, true, false, false, true); //Properties, save, print, zoom in pop-up menu, and tooltip
    linePanelAD.setMouseZoomable(false);
    panelChartRMA4D.removeAll();
    panelChartRMA4D.add(linePanelAD, BorderLayout.CENTER);
    panelChartRMA4D.setVisible(true);
    panelChartRMA4D.setBorder(new LineBorder (Color.BLACK));
    panelChartRMA4D.validate();

0 个答案:

没有答案