? MosaicPanel

????????:
ImageObserver, MenuContainer, Serializable, Accessible

public class MosaicPanel extends JPanel

MosaicPanel is used to display a coloured relief map and a height key (in sensible units). It also handles mouse events, firing "mouse" PropertyChangeEvents as the mouse is moved over the map. Handling of this component's size etc. is left to the parent's LayoutManager.

Mouse events contain a XYZ object where the x and y components indicate the position of the mouse as a proportion of the width and height of the map. These are double values between 0.0 and 1.0, with [0.0, 0.0] at the bottom-left. The z() component contains the height (or MISSING) contained in the databuffer. The value MOVED_OUT is fired when the mouse goes outside the bounds of the map.

????:
  • ??????

    • MOVED_OUT

      public static final XYZ MOVED_OUT
  • ???????

    • MosaicPanel

      public MosaicPanel()
      Creates new form BeanForm
  • ??????

    • setDataTable

      public void setDataTable(float[][] buffer, DEMReader reader)
      Set the height data for the map and determine the height scale for the key
      ??:
      buffer - - a double[][] array containing the map data. First dimension is "northing", second is "easting"
    • paint

      public void paint(Graphics g)
      Paint the key panel and background
      ??:
      paint ??? JComponent
      ??:
      g - - the Graphics object from awt
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener l)
      Add a PropertyChangeListener (for the "mouse" property changes)
      ??:
      addPropertyChangeListener ??? Container
      ??:
      l -
    • getPropertyChangeListener

      public PropertyChangeListener getPropertyChangeListener()
      Get this object's internal PropertyChangeListener (note: slightly non-standard)
      ??:
      the current PropertyChangeListener