edu.wisc.ssec.mcidas.adde
Class GetAreaGUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by edu.wisc.ssec.mcidas.adde.GetAreaGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class GetAreaGUI
extends javax.swing.JDialog

A GUI wrapper for whatever class/method tries to get image data via ADDE, but needs a way to let the user explore the availability of data. Possible defaults are written into the GetAreaGUI.properties file, and when the user indicates "use my defaults", these are employed when ever the correct combo of server/group/descr are chosen.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GetAreaGUI(java.awt.Dialog owner, boolean modal, java.lang.String s, boolean multi, boolean coa)
           
GetAreaGUI(java.awt.Frame owner, boolean modal, java.lang.String s, boolean multi, boolean coa)
           
GetAreaGUI(java.lang.String s)
           
GetAreaGUI(java.lang.String s, boolean multi)
           
GetAreaGUI(java.lang.String s, boolean multi, boolean coa)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener o)
           
 java.lang.String getBand()
          fetch the current band number
 java.lang.String getCal()
          fetch the current Calibration type
 java.lang.String getCoordType()
          fetch the current coordinate type
 java.lang.String getDay()
          return the day of the selected image
 java.lang.String getDescr()
          fetch the name (abreviation) of the currently selected dataset (descr)
 java.lang.String getDoc()
          fetch the state of the doc request switch
 int getEleMag()
          get the Element magnification
 java.lang.String getGroup()
          fetch the name of the currently selected ADDE group
 int getLinMag()
          fetch the current line magnification factor
 java.lang.String getLocationString()
          fetch the current locatoin string
 java.lang.String getMag()
          get the magnification factors (line element)
 java.lang.String getNumLinesEles()
          fetch the number of lines and elements defined
 java.lang.String getProjectNumber()
          fetch the currently defined project number
 java.lang.String getServer()
          fetch the name of the currently selected ADDE server
 java.lang.String getTime()
          get the time of the selected image
 java.lang.String getUnit()
          fetch the name of the units defined
 java.lang.String getUserName()
          fetch the currently defined user name
static void main(java.lang.String[] args)
           
 void removeActionListener(java.awt.event.ActionListener o)
           
 void setBand(java.lang.String c)
          define the satellite band number to use
 void setCal(java.lang.String c)
          define the calibration type to use (e.g., "VISSR")
 void setCoordType(java.lang.String c)
          define the coodinate type for the centered location values
 void setDateTime(java.lang.String d, java.lang.String t)
           
 void setDay(java.lang.String d)
          set the day
 void setDescr(java.lang.String s)
          force the selection of a particular ADDE Descr (dataset).
 void setDoc(java.lang.String v)
          define whether the "documentation block" will be returned with the data.
 void setEleMag(int m)
          set the element magnification factor.
 void setGroup(java.lang.String s)
          force a particular ADDE Group to be selected.
 void setLineMag(int m)
          define the value of the line maginfication (-50 thru +50).
 void setLocationString(java.lang.String c)
          define the location(s) for the coodinate type.
 void setMag(java.lang.String m)
          set the maginification (line element) factors
 void setNumLinesEles(java.lang.String c)
          define the size of the image to get
 void setProjectNumber(java.lang.String c)
          define a project number, which is required by some ADDE servers
 void setServer(java.lang.String s)
          define the name of the ADDE server to select
 void setTime(java.lang.String t)
          set the time
 void setUnit(java.lang.String c)
          define the units of the data to get
 void setUserName(java.lang.String c)
          define a user name (required by some ADDE servers for accounting).
 void status(java.lang.String m)
           
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetAreaGUI

public GetAreaGUI(java.lang.String s)
Parameters:
s - is the label for the action button

GetAreaGUI

public GetAreaGUI(java.lang.String s,
                  boolean multi)
Parameters:
s - is the label for the action button
multi - is true if multiple selection mode is to be used (this does not work yet!!)

GetAreaGUI

public GetAreaGUI(java.lang.String s,
                  boolean multi,
                  boolean coa)
Parameters:
s - is the label for the action button
multi - is true if multiple selection mode is to be used (this does not work yet!!)
coa - is true if the Dialog should close the window after the actionPerformed is done.

GetAreaGUI

public GetAreaGUI(java.awt.Dialog owner,
                  boolean modal,
                  java.lang.String s,
                  boolean multi,
                  boolean coa)
Parameters:
owner - is the top-level Dialog that owns this
modal - is true if this should be a modal dialog
s - is the label for the action button
multi - is true if multiple selection mode is to be used (this does not work yet!!)
coa - is true if the Dialog should close the window after the actionPerformed is done.

GetAreaGUI

public GetAreaGUI(java.awt.Frame owner,
                  boolean modal,
                  java.lang.String s,
                  boolean multi,
                  boolean coa)
Parameters:
owner - is the top-level Frame that owns this
modal - is true if this should be a modal dialog
s - is the label for the action button
multi - is true if multiple selection mode is to be used (this does not work yet!!)
coa - is true if the Dialog should close the window after the actionPerformed is done.
Method Detail

setServer

public void setServer(java.lang.String s)
define the name of the ADDE server to select

Parameters:
s - - The ADDE server hostname.

getServer

public java.lang.String getServer()
fetch the name of the currently selected ADDE server

Returns:
The ADDE server (host) name

setGroup

public void setGroup(java.lang.String s)
force a particular ADDE Group to be selected. If this is done, then then you must also select the Dataset (aka Descr).

Parameters:
s - The name of the ADDE data group

getGroup

public java.lang.String getGroup()
fetch the name of the currently selected ADDE group

Returns:
the ADDE group name (abreviation)

setDescr

public void setDescr(java.lang.String s)
force the selection of a particular ADDE Descr (dataset). This will trigger fetch from the server of available times/days.

Parameters:
s - The name (abreviation) of the dataset (aka 'descr')

getDescr

public java.lang.String getDescr()
fetch the name (abreviation) of the currently selected dataset (descr)

Returns:
The name (abreviation) of the selected dataset/descr

setMag

public void setMag(java.lang.String m)
set the maginification (line element) factors


getMag

public java.lang.String getMag()
get the magnification factors (line element)

Returns:
string of line & element magnification, separated by a space

setLineMag

public void setLineMag(int m)
define the value of the line maginfication (-50 thru +50). Calling this also forces the Element Magnification to be set to this value. You may set it separately, as needed.

Parameters:
m - The value of the line magnification (-50 thru +50). Values of -1, 0, and 1 will be treated as 1.

getLinMag

public int getLinMag()
fetch the current line magnification factor

Returns:
the line magnification factor

setEleMag

public void setEleMag(int m)
set the element magnification factor. This call should be made after a call to setLineMag()

Parameters:
m - The element magnification factor (-50 thru +50). Values of -1, 0, and 1 are treated as 1.

getEleMag

public int getEleMag()
get the Element magnification

Returns:
element magnification factor

setCoordType

public void setCoordType(java.lang.String c)
define the coodinate type for the centered location values

Parameters:
c - coordinate = "E" for earth, "I" for image, "S" for radar station

getCoordType

public java.lang.String getCoordType()
fetch the current coordinate type

Returns:
coordinate type value ("E", "I", or "S")

setLocationString

public void setLocationString(java.lang.String c)
define the location(s) for the coodinate type. It is assumed that you will call setCoordType() and then setLocationString() with consistent values.

Parameters:
c - The coordinate locations. If two values, separate by one of more blanks. For Earth coordinate, the latitude and longitude (e.g., "43.1234 -89.2313"); for Image coordinates, the line and element (e.g., "12345 23412"), and for Radar Stations, the station name (e.g., "KMKX").

getLocationString

public java.lang.String getLocationString()
fetch the current locatoin string

Returns:
The value of the location string(s) as a single string with one blank space between values (if more than one)

setBand

public void setBand(java.lang.String c)
define the satellite band number to use

Parameters:
c - the band number (as a String)

getBand

public java.lang.String getBand()
fetch the current band number

Returns:
the currently selected band number

setNumLinesEles

public void setNumLinesEles(java.lang.String c)
define the size of the image to get

Parameters:
c - The number of lines and number of elements, in a string with one or more blank spaces between (e.g., "480 640")

getNumLinesEles

public java.lang.String getNumLinesEles()
fetch the number of lines and elements defined

Returns:
the number of lines and elements, as a String with one blank between values (e.g., "480 640")

getDay

public java.lang.String getDay()
return the day of the selected image

Returns:
the day in the format: yyyy-mm-dd

setDay

public void setDay(java.lang.String d)
set the day

Parameters:
d - the day in the form: yyyy-mm-dd

getTime

public java.lang.String getTime()
get the time of the selected image

Returns:
the time in the format: hh:mm:ss

setTime

public void setTime(java.lang.String t)
set the time

Parameters:
t - is the time in the format: hh:mm:ss

setDateTime

public void setDateTime(java.lang.String d,
                        java.lang.String t)

setUnit

public void setUnit(java.lang.String c)
define the units of the data to get

Parameters:
c - the name of the Units (e.g., "BRIT")

getUnit

public java.lang.String getUnit()
fetch the name of the units defined

Returns:
the name of the units

setCal

public void setCal(java.lang.String c)
define the calibration type to use (e.g., "VISSR")

Parameters:
c - the calibration type

getCal

public java.lang.String getCal()
fetch the current Calibration type

Returns:
the current calibration type

setDoc

public void setDoc(java.lang.String v)
define whether the "documentation block" will be returned with the data.

Parameters:
v - set to 'true' to return the history documentation.

getDoc

public java.lang.String getDoc()
fetch the state of the doc request switch

Returns:
the state of the doc request switch

setUserName

public void setUserName(java.lang.String c)
define a user name (required by some ADDE servers for accounting). If given, this will be included in all requests generated by GetAreaGUI.

Parameters:
c - The user's ADDE identifier (e.g., "jack")

getUserName

public java.lang.String getUserName()
fetch the currently defined user name

Returns:
the currently defined user name

setProjectNumber

public void setProjectNumber(java.lang.String c)
define a project number, which is required by some ADDE servers

Parameters:
c - The project number to use (e.g., "12345")

getProjectNumber

public java.lang.String getProjectNumber()
fetch the currently defined project number

Returns:
the project number value

status

public void status(java.lang.String m)

addActionListener

public void addActionListener(java.awt.event.ActionListener o)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener o)

toString

public java.lang.String toString()
Overrides:
toString in class java.awt.Component

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments