Examples of XYGrid


Examples of plotter.xy.XYGrid

      plot.add(xAxis);
      plot.add(yAxis);
      plot.setXAxis(xAxis);
      plot.setYAxis(yAxis);
      plot.setBackground(Color.darkGray);
      XYGrid grid = new XYGrid(xAxis, yAxis);
      grid.setForeground(Color.lightGray);
      XYPlotContents contents = new XYPlotContents();
      contents.setBackground(Color.black);
      plot.add(contents);
      contents.add(grid);
      plot.setPreferredSize(new Dimension(150, 100));
View Full Code Here

Examples of plotter.xy.XYGrid

    plot.setYAxis(yAxis);
    plot.setBackground(Color.darkGray);
    XYPlotContents contents = new XYPlotContents();
    contents.setBackground(Color.black);
    plot.setBackground(Color.darkGray);
    XYGrid grid = new XYGrid(xAxis, yAxis);
    grid.setForeground(Color.lightGray);
    contents.add(grid);
    plot.add(contents);
    plot.setPreferredSize(new Dimension(150, 100));
   
    contentPane.setBackground(Color.darkGray);
View Full Code Here

Examples of plotter.xy.XYGrid

    plot.setYAxis(yAxis);
    plot.setBackground(Color.darkGray);
    contents = new XYPlotContents();
    contents.setBackground(Color.black);
    plot.setBackground(Color.darkGray);
    grid = new XYGrid(xAxis, yAxis);
    grid.setForeground(Color.lightGray);
    contents.add(grid);
    plot.add(contents);
    plot.setPreferredSize(new Dimension(150, 100));
View Full Code Here

Examples of plotter.xy.XYGrid

    plot.setYAxis(yAxis);
    plot.setBackground(Color.darkGray);
    XYPlotContents contents = new XYPlotContents();
    contents.setBackground(Color.black);
    plot.setBackground(Color.darkGray);
    XYGrid grid = new XYGrid(xAxis, yAxis);
    grid.setForeground(Color.lightGray);
    contents.add(grid);
    plot.add(contents);
    plot.setPreferredSize(new Dimension(150, 100));
   
    contentPane.setBackground(Color.darkGray);
View Full Code Here

Examples of plotter.xy.XYGrid

   
    add (getXAxis());
    add (getYAxis());

    sync = new NonTimeSyncPoints(getXAxis(), getYAxis());
    XYGrid grid = new XYGrid(getXAxis(), getYAxis());
    grid.setForeground(Color.WHITE);
    contents.add(grid);
    contents.add(sync);
   
    add (contents);   
   
View Full Code Here

Examples of plotter.xy.XYGrid

      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);
      }

      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.setMajorTickLength(PlotConstants.MAJOR_TICK_MARK_LENGTH);
      xAxis.setMinorTickLength(PlotConstants.MINOR_TICK_MARK_LENGTH);
View Full Code Here

Examples of plotter.xy.XYGrid

  private XYGrid              grid;

  public PlotterPlot() {
    setXAxis(new LinearXYAxis(XYDimension.X));
    setYAxis(new LinearXYAxis(XYDimension.Y));
    grid = new XYGrid(getXAxis(), getYAxis());
   
    contents.add(grid);
   
    add(getXAxis());
    add(getYAxis());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.