Class MeasurePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MeasurePanel extends JPanel
Overlay panel that can display annotated distance measurements between two user-specified points on the plot.
Since:
23 Jan 2019
Author:
Mark Taylor
See Also:
  • Constructor Details

    • MeasurePanel

      public MeasurePanel(uk.ac.starlink.ttools.plot2.PlotMetric metric, PlotPanel<?,?> plotPanel)
      Constructor.
      Parameters:
      metric - plot metric appropriate for surfaces that this panel will be presented with
      plotPanel - factory for surfaces
  • Method Details

    • getModel

      public ToggleButtonModel getModel()
      Returns a button model that will initiate a measurement gesture when selected. When the measurement is finished, it will unselect itself.
      Returns:
      measure button model
    • paintComponent

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent