Examples of XYPlotContents


Examples of plotter.xy.XYPlotContents

    d.setMaxCapacity(1000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    final XYMarkerLine marker = new XYMarkerLine(xAxis, 60);
    marker.setForeground(Color.yellow);
    XYPlotContents contents = frame.getContents();
    contents.add(marker);
    frame.addPlotLine(line);

    yAxis.setStart(-1.2);
    yAxis.setEnd(1.2);
    xAxis.setStart(0);
View Full Code Here

Examples of plotter.xy.XYPlotContents

    d.setTruncationPoint(0);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    final XYMarkerLine marker = new XYMarkerLine(xAxis, 60);
    marker.setForeground(Color.yellow);
    XYPlotContents contents = frame.getContents();
    contents.add(marker);
    final XYMarkerLine marker2 = new XYMarkerLine(yAxis, .5);
    marker2.setForeground(Color.red);
    contents.add(marker2);
    frame.addPlotLine(line);

    yAxis.setStart(-1.2);
    yAxis.setEnd(1.2);
    xAxis.setStart(0);
View Full Code Here

Examples of plotter.xy.XYPlotContents

    d.setMaxCapacity(1000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    final XYMarkerLine marker = new XYMarkerLine(xAxis, 60);
    marker.setForeground(Color.yellow);
    XYPlotContents contents = frame.getContents();
    contents.add(marker);
    final XYMarkerLine marker2 = new XYMarkerLine(yAxis, .5);
    marker2.setForeground(Color.red);
    contents.add(marker2);
    frame.addPlotLine(line);

    yAxis.setStart(-1.2);
    yAxis.setEnd(1.2);
    xAxis.setStart(0);
View Full Code Here

Examples of plotter.xy.XYPlotContents

    plot.add(xAxis);
    plot.add(yAxis);
    plot.setXAxis(xAxis);
    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);
   
    XYLocationDisplay locationDisplay = new XYLocationDisplay();
    // This is a hack to set the preferred height to the normal height so the component doesn't collapse to height 0 when the text is empty.
    // Note that mimimumSize does not work for some reason.
    locationDisplay.setText("Ag");
    Dimension size = locationDisplay.getPreferredSize();
    size.width = 100;
    locationDisplay.setText("");
    locationDisplay.setPreferredSize(size);
    // End hack
    locationDisplay.setForeground(Color.white);
    locationDisplay.setFont(new Font("Arial", 0, 12));
    locationDisplay.setFormat(new MessageFormat("<html><b>X:</b> {0} &nbsp; <b>Y:</b> {1}</html>"));
    locationDisplay.attach(plot);
    plot.add(locationDisplay);

    SlopeLine slopeLine = new SlopeLine();
    slopeLine.setForeground(Color.white);
    slopeLine.attach(plot);
   
    SlopeLineDisplay slopeLineDisplay = new SlopeLineDisplay();
    slopeLine.addListenerForPlot(plot, slopeLineDisplay);
    slopeLineDisplay.setFont(new Font("Arial", 0, 12));
    slopeLineDisplay.setForeground(Color.white);
    slopeLineDisplay.setFormat(new MessageFormat("<html><b>&Delta;x:</b> {0}  <b>&Delta;y:</b> {1}</html>"));
    plot.add(slopeLineDisplay);

    new DefaultXYLayoutGenerator().generateLayout(plot);

    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS));
    contentPane.add(plot);

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setMaxCapacity(10000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    contents.add(line);
    contents.setComponentZOrder(grid, contents.getComponentCount() - 1);

    if(invertY) {
      yAxis.setStart(200);
      yAxis.setEnd(0);
    } else {
View Full Code Here

Examples of plotter.xy.XYPlotContents

    plot.add(xAxis);
    plot.add(yAxis);
    plot.setXAxis(xAxis);
    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);
View Full Code Here

Examples of plotter.xy.XYPlotContents

    d.setMaxCapacity(1000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    final XYMarkerLine marker = new XYMarkerLine(xAxis, 60);
    marker.setForeground(Color.yellow);
    XYPlotContents contents = frame.getContents();
    contents.add(marker);
    final XYMarkerLine marker2 = new XYMarkerLine(yAxis, .5);
    marker2.setForeground(Color.red);
    contents.add(marker2);
    frame.addPlotLine(line);

    yAxis.setStart(-1.2);
    yAxis.setEnd(1.2);
    xAxis.setStart(0);
View Full Code Here

Examples of plotter.xy.XYPlotContents

    plot.add(xAxis);
    plot.add(yAxis);
    plot.setXAxis(xAxis);
    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);
   
    XYLocationDisplay locationDisplay = new XYLocationDisplay();
    // This is a hack to set the preferred height to the normal height so the component doesn't collapse to height 0 when the text is empty.
    // Note that mimimumSize does not work for some reason.
    locationDisplay.setText("Ag");
    Dimension size = locationDisplay.getPreferredSize();
    size.width = 100;
    locationDisplay.setText("");
    locationDisplay.setPreferredSize(size);
    // End hack
    locationDisplay.setForeground(Color.white);
    locationDisplay.setFont(new Font("Arial", 0, 12));
    locationDisplay.setFormat(new MessageFormat("<html><b>X:</b> {0} &nbsp; <b>Y:</b> {1}</html>"));
    locationDisplay.attach(plot);
    plot.add(locationDisplay);

    SlopeLine slopeLine = new SlopeLine();
    slopeLine.setForeground(Color.white);
    slopeLine.attach(plot);

    SlopeLineDisplay slopeLineDisplay = new SlopeLineDisplay();
    slopeLine.addListenerForPlot(plot, slopeLineDisplay);
    slopeLineDisplay.setFont(new Font("Arial", 0, 12));
    slopeLineDisplay.setForeground(Color.white);
    slopeLineDisplay.setFormat(new MessageFormat("<html><b>&Delta;x:</b> {0}  <b>&Delta;y:</b> {1}</html>"));
    plot.add(slopeLineDisplay);

    contentPane.add(plot);
    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS));

    new DefaultXYLayoutGenerator().generateLayout(plot);

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setMaxCapacity(10000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    contents.add(line);
    contents.setComponentZOrder(grid, contents.getComponentCount() - 1);

    yAxis.setStart(-20);
    yAxis.setEnd(20);
    xAxis.setStart(0);
    xAxis.setEnd(10000);
View Full Code Here

Examples of plotter.xy.XYPlotContents

        @Override
        public Pinnable answer(InvocationOnMock invocation) throws Throwable {
          return pins.createPin();
        }
    });
      Mockito.when(plotView.getContents()).thenReturn(new XYPlotContents());
      Mockito.when(plotView.getLayout()).thenReturn(new SpringLayout());
    setTestLCM();
   
  }
View Full Code Here

Examples of plotter.xy.XYPlotContents

    nonTimeMaxLimitButton.setFocusPainted(false);
    nonTimeMaxLimitButton.setToolTipText(BUNDLE.getString("ShowAllData"));
    XYPlot plotView = plot.getPlotView();
    plotView.add(nonTimeMaxLimitButton);
    plotView.setComponentZOrder(nonTimeMaxLimitButton, 0);
    XYPlotContents contents = plotView.getContents();
    SpringLayout layout = (SpringLayout) plotView.getLayout();
    if (plot.getAxisOrientationSetting() == AxisOrientationSetting.X_AXIS_AS_TIME) {
      if (plot.getYAxisMaximumLocation() == YAxisMaximumLocationSetting.MAXIMUM_AT_TOP) {
        layout.putConstraint(SpringLayout.NORTH, nonTimeMaxLimitButton, 0, SpringLayout.NORTH, contents);
        layout.putConstraint(SpringLayout.HORIZONTAL_CENTER, nonTimeMaxLimitButton, 0, SpringLayout.HORIZONTAL_CENTER, contents);
View Full Code Here

Examples of plotter.xy.XYPlotContents

  @BeforeMethod
  public void setup() {
    MockitoAnnotations.initMocks(this);
    Mockito.when(mockPlotViewManifestation.getCurrentMCTTime()).thenReturn(new GregorianCalendar().getTimeInMillis());
    Mockito.when(mockPlot.isCompressionEnabled()).thenReturn(false);
    Mockito.when(plotView.getContents()).thenReturn(new XYPlotContents());
    Mockito.when(mockPlot.getPlotView()).thenReturn(plotView);
    Mockito.when(mockPlot.getPlotDataManager()).thenReturn(plotDataManger);
    Mockito.when(mockPlot.getLimitManager()).thenReturn(plotLimitManager);
    Mockito.when(mockPlot.getMinTime()).thenReturn(Long.valueOf(0));
    Mockito.when(mockPlot.getPlotLineDraw()).thenReturn(PlotConstants.DEFAULT_PLOT_LINE_DRAW);
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.