Package PamUtils

Class LatLongDialogStrip

All Implemented Interfaces:
ActionListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class LatLongDialogStrip extends JPanel implements KeyListener, ActionListener
Shows the value of a latitude or longitude in various standard formats.

Allows users to input values in various formats.

Author:
Doug Gillespie
See Also:
  • Constructor Details

    • LatLongDialogStrip

      public LatLongDialogStrip(boolean latitude, boolean showBorder)
      Construct a strip of controls to include in a larger dialog.

      With this version of the constructor there is an option to display a titled border with the word Latitude or Longitude

      Parameters:
      latitude - true if it's latitude, false for longitude.
      showBorder - true to show the titled border.
    • LatLongDialogStrip

      public LatLongDialogStrip(boolean latitude)
      Construct a strip of controls to include in a larger dialog.

      By default the strip will have a titled border with the word Latitude or Longitude

      Parameters:
      latitude - true if it's latitude, false for longitude.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • showControls

      public void showControls()
    • sayValue

      public void sayValue(double value)
      Set data in the lat long dialog strip
      Parameters:
      value - Lat or Long in decimal degrees.
    • sayValue

      public void sayValue(double value, boolean hiddenOnly)
    • getValue

      public double getValue()
      Get the value from the visible text fields
      Returns:
      the latitude/longitude in decimal format.
    • clearData

      public void clearData()
    • sayFormattedValue

      public void sayFormattedValue(double value)
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent