Package plotter

Examples of plotter.DateNumberFormat


    Timer timer = new Timer();

    final LinearXYAxis xAxis = (LinearXYAxis) frame.getXAxis();
    final XYAxis yAxis = frame.getYAxis();
    xAxis.setTickMarkCalculator(new TimeTickMarkCalculator());
    xAxis.setFormat(new DateNumberFormat(new SimpleDateFormat("yyyy-MM-dd\nHH:mm:ss.SSS")));

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setMaxCapacity(1000);
View Full Code Here


    final LinearXYAxis xAxis = (LinearXYAxis) frame.getXAxis();
    final XYAxis yAxis = frame.getYAxis();
    xAxis.setTickMarkCalculator(new TimeTickMarkCalculator());
    final long start = System.currentTimeMillis();
    xAxis.setFormat(new DateNumberFormat(new SimpleDateFormat("yyyy-MM-dd\nHH:mm:ss.SSS"), start));

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setXData(new DoubleDataFloat());
    line.setYData(new DoubleDataFloat());
    line.setForeground(Color.white);
View Full Code Here

    Timer timer = new Timer();

    final LinearXYAxis xAxis = (LinearXYAxis) frame.getXAxis();
    final XYAxis yAxis = frame.getYAxis();
    xAxis.setTickMarkCalculator(new TimeTickMarkCalculator());
    xAxis.setFormat(new DateNumberFormat(new SimpleDateFormat("yyyy-MM-dd\nHH:mm:ss.SSS")));

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setMaxCapacity(1000);
View Full Code Here

    Timer timer = new Timer();

    final LinearXYAxis xAxis = (LinearXYAxis) frame.getXAxis();
    final XYAxis yAxis = frame.getYAxis();
    xAxis.setTickMarkCalculator(new TimeTickMarkCalculator());
    xAxis.setFormat(new DateNumberFormat(new SimpleDateFormat("yyyy-MM-dd\nHH:mm:ss.SSS")));

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setForeground(Color.white);
    final CompressingXYDataset d = new CompressingXYDataset(line, new DefaultCompressor());
    d.setTruncationPoint(0);
View Full Code Here

      plot.getPlotView().add(yAxis);

      // Setup the axis labels.
      if (plot.isTimeLabelEnabled) {
        SimpleDateFormat format = TimeFormatUtils.makeDataFormat(plot.getTimeFormatSetting());
        xAxis.setFormat(new DateNumberFormat(format));
                xAxis.setTimeSystemAxisLabelName(timeSystemId);
      } else {
        xAxis.setShowLabels(false);
      }

      xAxis.setFont(plot.getTimeAxisFont());
      yAxis.setFont(plot.getTimeAxisFont());

      // Setup the gridlines
      XYGrid grid = new XYGrid(xAxis, yAxis);
      grid.setForeground(plot.getGridLineColor());
      plot.getPlotView().getContents().add(grid);

      xAxis.setMinorTickLength(PlotConstants.MINOR_TICK_MARK_LENGTH);
      xAxis.setMajorTickLength(PlotConstants.MAJOR_TICK_MARK_LENGTH);
      xAxis.setTextMargin(PlotConstants.MAJOR_TICK_MARK_LENGTH + 2);
      yAxis.setMinorTickLength(PlotConstants.MINOR_TICK_MARK_LENGTH);
      yAxis.setMajorTickLength(PlotConstants.MAJOR_TICK_MARK_LENGTH);
      yAxis.setTextMargin(PlotConstants.MAJOR_TICK_MARK_LENGTH + 5);
    } else {
      assert (plot.getAxisOrientationSetting() == AxisOrientationSetting.Y_AXIS_AS_TIME);
      // Setup the axis.
      TimeXYAxis yAxis = new TimeXYAxis(XYDimension.Y);
      if(plot.getYAxisMaximumLocation() == YAxisMaximumLocationSetting.MAXIMUM_AT_TOP) {
        yAxis.setStart(plot.getStartTime().getTimeInMillis());
        yAxis.setEnd(plot.getEndTime().getTimeInMillis());
      } else {
        yAxis.setStart(plot.getEndTime().getTimeInMillis());
        yAxis.setEnd(plot.getStartTime().getTimeInMillis());
      }
      plot.setTimeAxis(yAxis);
      LinearXYAxis xAxis = new LinearXYAxis(XYDimension.X);
      if(plot.getXAxisMaximumLocation() == XAxisMaximumLocationSetting.MAXIMUM_AT_RIGHT) {
        xAxis.setStart(plot.getPlotAbstraction().getMinNonTime());
        xAxis.setEnd(plot.getPlotAbstraction().getMaxNonTime());
      } else {
        xAxis.setStart(plot.getPlotAbstraction().getMaxNonTime());
        xAxis.setEnd(plot.getPlotAbstraction().getMinNonTime());
      }
      plot.theNonTimeAxis = xAxis;

      xAxis.setForeground(plot.getNonTimeAxisColor());
      yAxis.setForeground(plot.getTimeAxisColor());
     
      xAxis.setFormat(getNumberFormatter());
     
      xAxis.setPreferredSize(new Dimension(1, 20));
      yAxis.setPreferredSize(new Dimension(60, 1));
      plot.getPlotView().setXAxis(xAxis);
      plot.getPlotView().setYAxis(yAxis);
      plot.getPlotView().add(xAxis);
      plot.getPlotView().add(yAxis);

      // Setup the axis labels.
      if (plot.isTimeLabelEnabled) {
        SimpleDateFormat format = TimeFormatUtils.makeDataFormat(plot.getTimeFormatSetting());
                yAxis.setFormat(new DateNumberFormat(format));
                yAxis.setTimeSystemAxisLabelName(timeSystemId);
      } else {
        yAxis.setShowLabels(false);
      }
View Full Code Here

    Timer timer = new Timer();

    final LinearXYAxis yAxis = (LinearXYAxis) frame.getYAxis();
    final XYAxis xAxis = frame.getXAxis();
    yAxis.setTickMarkCalculator(new TimeTickMarkCalculator());
    yAxis.setFormat(new DateNumberFormat(new SimpleDateFormat("yyyy-MM-dd\nHH:mm:ss.SSS")));
    yAxis.setPreferredSize(new Dimension(100, 50));
    xAxis.setStartMargin(100);

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.Y);
    line.setForeground(Color.white);
View Full Code Here

TOP

Related Classes of plotter.DateNumberFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.