Class CoverageView

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class CoverageView extends JComponent
Small component which gives a visual representation of a coverage area. This is currently a pixel-resolution Mollweide projection of of the coverage. Component foreground and background colours are used.
Since:
5 Jan 2012
Author:
Mark Taylor
See Also:
  • Constructor Details

    • CoverageView

      public CoverageView(String subject)
      Constructs a coverage with subject description.
      Parameters:
      subject - short description of what the coverage is of, used in tooltip
    • CoverageView

      public CoverageView()
      Constructor.
  • Method Details

    • setCoverage

      public void setCoverage(uk.ac.starlink.ttools.cone.Coverage coverage)
      Sets the coverage for this component to display. The coverage is initialised asynchronously; the initialising thread will be interrrupted if a new coverage needs initialising before it's done.
      Parameters:
      coverage - coverage for display
    • getCoverage

      public uk.ac.starlink.ttools.cone.Coverage getCoverage()
      Returns the coverage currently displayed by this component.
      Returns:
      coverage
    • paintComponent

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

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent