edu.wisc.ssec.mcidas.adde
Class GetAreaGUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by edu.wisc.ssec.mcidas.adde.GetAreaGUI
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GetAreaGUI
extends JPanel

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.

Version:
0.1
Author:
tomw
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GetAreaGUI(Frame owner, boolean modal, String s, boolean multi, boolean coa)
           
GetAreaGUI(Frame owner, boolean modal, String s, boolean multi, boolean coa, boolean dodialog)
           
GetAreaGUI(String s)
           
GetAreaGUI(String s, boolean multi)
           
GetAreaGUI(String s, boolean multi, boolean coa)
           
GetAreaGUI(String s, boolean multi, boolean coa, boolean modal)
           
 
Method Summary
 void addActionListener(ActionListener o)
           
 String getBand()
          fetch the current band number
 String getCal()
          fetch the current Calibration type
 String getCoordType()
          fetch the current coordinate type
 String getDay()
          return the day of the selected image
 String getDay(int index)
           
 String getDescr()
          fetch the name (abreviation) of the currently selected dataset (descr)
 String getDoc()
          fetch the state of the doc request switch
 int getEleMag()
          get the Element magnification
 String getGroup()
          fetch the name of the currently selected ADDE group
 List getImageList()
           
 int getLinMag()
          fetch the current line magnification factor
 String getLocationString()
          fetch the current locatoin string
 String getMag()
          get the magnification factors (line element)
 String getNumLinesEles()
          fetch the number of lines and elements defined
 String getProjectNumber()
          fetch the currently defined project number
 String getServer()
          fetch the name of the currently selected ADDE server
 String getTime()
          get the time of the selected image
 String getTime(int index)
          get the time of the index-th selected image
 String getUnit()
          fetch the name of the units defined
 String getUserName()
          fetch the currently defined user name
static void main(String[] args)
           
 void removeActionListener(ActionListener o)
           
 void setBand(String c)
          define the satellite band number to use
 void setCal(String c)
          define the calibration type to use (e.g., "VISSR")
 void setCoordType(String c)
          define the coodinate type for the centered location values
 void setDateTime(String d, String t)
           
 void setDay(String d)
          set the day
 void setDescr(String s)
          force the selection of a particular ADDE Descr (dataset).
 void setDoc(String v)
          define whether the "documentation block" will be returned with the data.
 void setEleMag(int m)
          set the element magnification factor.
 void setGroup(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(String c)
          define the location(s) for the coodinate type.
 void setMag(String m)
          set the maginification (line element) factors
 void setNumLinesEles(String c)
          define the size of the image to get
 void setProjectNumber(String c)
          define a project number, which is required by some ADDE servers
 void setServer(String s)
          define the name of the ADDE server to select
 void setTime(String t)
          set the time
 void setUnit(String c)
          define the units of the data to get
 void setUserName(String c)
          define a user name (required by some ADDE servers for accounting).
 void show()
           
 void status(String m)
           
 String toString()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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(String s)
Parameters:
s - is the label for the action button

GetAreaGUI

public GetAreaGUI(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(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(String s,
                  boolean multi,
                  boolean coa,
                  boolean modal)
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.
modal - is true if this should be a modal dialog

GetAreaGUI

public GetAreaGUI(Frame owner,
                  boolean modal,
                  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.

GetAreaGUI

public GetAreaGUI(Frame owner,
                  boolean modal,
                  String s,
                  boolean multi,
                  boolean coa,
                  boolean dodialog)
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.
dodialog - is true if this should pop up a Dialog interface box. If this is false, then owner and modal may be null.
Method Detail

show

public void show()
Overrides:
show in class Component

setServer

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

Parameters:
s - - The ADDE server hostname.

getServer

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

Returns:
The ADDE server (host) name

setGroup

public void setGroup(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 String getGroup()
fetch the name of the currently selected ADDE group

Returns:
the ADDE group name (abreviation)

setDescr

public void setDescr(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 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(String m)
set the maginification (line element) factors


getMag

public 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(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 String getCoordType()
fetch the current coordinate type

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

setLocationString

public void setLocationString(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 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(String c)
define the satellite band number to use

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

getBand

public String getBand()
fetch the current band number

Returns:
the currently selected band number

setNumLinesEles

public void setNumLinesEles(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 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 String getDay(int index)

getDay

public String getDay()
return the day of the selected image

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

setDay

public void setDay(String d)
set the day

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

getTime

public String getTime(int index)
get the time of the index-th selected image


getTime

public String getTime()
get the time of the selected image

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

setTime

public void setTime(String t)
set the time

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

setDateTime

public void setDateTime(String d,
                        String t)

setUnit

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

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

getUnit

public String getUnit()
fetch the name of the units defined

Returns:
the name of the units

setCal

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

Parameters:
c - the calibration type

getCal

public String getCal()
fetch the current Calibration type

Returns:
the current calibration type

setDoc

public void setDoc(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 String getDoc()
fetch the state of the doc request switch

Returns:
the state of the doc request switch

setUserName

public void setUserName(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 String getUserName()
fetch the currently defined user name

Returns:
the currently defined user name

setProjectNumber

public void setProjectNumber(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 String getProjectNumber()
fetch the currently defined project number

Returns:
the project number value

status

public void status(String m)

addActionListener

public void addActionListener(ActionListener o)

removeActionListener

public void removeActionListener(ActionListener o)

getImageList

public List getImageList()

toString

public String toString()
Overrides:
toString in class Component

main

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