Class SwingContourPlot

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class SwingContourPlot extends SwingSpaceTimePlot
Embed a ContourPlot in a Swing JPanel.

Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
  • Constructor Details

    • SwingContourPlot

      public SwingContourPlot(org.opentrafficsim.draw.graphs.AbstractContourPlot<?> plot)
      Create a new SwingContourPlot with embedded plot.
      Parameters:
      plot - AbstractContourPlot<?>; the plot to embed
  • Method Details

    • addPopUpMenuItems

      protected void addPopUpMenuItems(JPopupMenu popupMenu)
      Overridable method to add pop up items.
      Overrides:
      addPopUpMenuItems in class SwingSpaceTimePlot
      Parameters:
      popupMenu - JPopupMenu; pop up menu
    • getPlot

      public org.opentrafficsim.draw.graphs.AbstractContourPlot<?> getPlot()
      Retrieve the plot.
      Overrides:
      getPlot in class SwingSpaceTimePlot
      Returns:
      AbstractPlot; the plot
    • setSpaceGranularityRadioButton

      protected final void setSpaceGranularityRadioButton(double granularity)
      Sets the correct space granularity radio button to selected. This is done from a DataPool to keep multiple plots consistent.
      Parameters:
      granularity - double; space granularity
    • setTimeGranularityRadioButton

      protected final void setTimeGranularityRadioButton(double granularity)
      Sets the correct time granularity radio button to selected. This is done from a DataPool to keep multiple plots consistent.
      Parameters:
      granularity - double; time granularity
    • setSmoothing

      protected final void setSmoothing(boolean smooth)
      Sets the check box for smooth rendering. This is done from a DataPool to keep multiple plots consistent.
      Parameters:
      smooth - boolean; selected or not
    • setInterpolation

      protected final void setInterpolation(boolean interpolate)
      Sets the check box for interpolated rendering and block renderer setting. This is done from a DataPool to keep multiple plots consistent.
      Parameters:
      interpolate - boolean; selected or not