HiRISE

HiRISE.HiCat.HiTList
Class SearchComponent

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JSplitPane
                  extended by HiRISE.HiCat.HiTList.SearchComponent
All Implemented Interfaces:
ActionListener, FocusListener, ItemListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ChangeListener, ListSelectionListener

public class SearchComponent
extends JSplitPane
implements ActionListener, ChangeListener, ListSelectionListener, PropertyChangeListener, FocusListener, ItemListener

The SearchComponent is the graphical user interface to the various types of TargetLists needed to build lists of potential HiRISE targets.

Version:
1.26
Author:
Rodney Heyd UA/HiRISE
See Also:
TargetList, SearchInterface, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JSplitPane
JSplitPane.AccessibleJSplitPane
 
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
static String CONTROL_PANEL_UPDATE_PROPERTY
           
static String DEBUG_CONSTRUCTOR_PROPERTY
           
static String DEBUG_EVENT_PROPERTY
           
static String DEBUG_PROPERTY_EVENTS_PROPERTY
           
static String DEBUG_QUERY_RESULTS_PROPERTY
           
static String DEBUG_REFRESH_PROPERTY
           
static String ID
           
 
Fields inherited from class javax.swing.JSplitPane
BOTTOM, CONTINUOUS_LAYOUT_PROPERTY, continuousLayout, DIVIDER, DIVIDER_LOCATION_PROPERTY, DIVIDER_SIZE_PROPERTY, dividerSize, HORIZONTAL_SPLIT, LAST_DIVIDER_LOCATION_PROPERTY, lastDividerLocation, LEFT, leftComponent, ONE_TOUCH_EXPANDABLE_PROPERTY, oneTouchExpandable, orientation, ORIENTATION_PROPERTY, RESIZE_WEIGHT_PROPERTY, RIGHT, rightComponent, TOP, VERTICAL_SPLIT
 
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
SearchComponent(TargetList.ListTypes list_name, int index, Configuration configuration, boolean include_nearby_obs_list, Component parent_component)
           
 
Method Summary
 void actionPerformed(ActionEvent event)
           
 Vector<Integer> addedSuggestionsNotFound()
          Get the set of added suggestions (from the added suggestions vector) that do not appear in the target list.
 Vector<String> columnHeadings()
          Get the Vector of Strings that contains the column names of the data table.
 Vector<Vector<String>> dataTable()
          Get the data table as a Vector of Vector Strings.
 void enableRowLimits(boolean enable)
          Enable or disable row limits in the underlying database query.
 void focusGained(FocusEvent event)
           
 void focusLost(FocusEvent e)
           
 TargetList.ListTypes getListType()
          Get the underlying list type of this SearchComponent.
 double getMaximumLatitudeFilter()
           
 double getMaximumLongitudeFilter()
           
 double getMaximumLsubSFilter()
           
 double getMinimumLatitudeFilter()
           
 double getMinimumLongitudeFilter()
           
 double getMinimumLsubSFilter()
           
 HashMap<Integer,TargetWarning> getMissingSuggestionWarnings()
           
 TargetList getTargetList()
           
 boolean ignoreFilterUpdates()
           
 void itemStateChanged(ItemEvent event)
           
static void main(String[] args)
           
 void propertyChange(PropertyChangeEvent event)
           
 void refresh()
           
 void setAddedSuggestions(Vector<Integer> suggestion_list)
           
 void setMaximumLatitudeFilter(double maxLatitude)
          Set the value of the maximum latitude filter
 void setMaximumLongitudeFilter(double maxLongitude)
          Set the maximum longitude filter to the given value
 void setMaximumLsubSFilter(double maxLsubS)
          Set the maximum LsubS filter to the given value
 void setMaximumRowCount(int rowCount)
          Set the maximum number of rows the search query should return to the given value.
 void setMinimumLatitudeFilter(double minLatitude)
          Set the value of the minimum latitude filter
 void setMinimumLongtitudeFilter(double minLongitude)
          Set the minimum longitude filter to the given value
 void setMinimumLsubSFilter(double minLsubS)
          Set the minimum LsubS filter to the given value
 void setRetrieveNearestNeighberList(boolean include_nearest_neighbor_list)
           
 void setSelectedPriorities(Vector<String> priorityList)
          Set the list of priorities to return by the database query
 void setSelectedScienceThemes(Vector<String> themesList)
           
 void setSuggestionsPerScienceTheme(int count)
          Sets the number of suggestions per science theme.
 void setTabComponent(ButtonTabComponent component)
           
 void setThreadCounter(ThreadCounter counter)
           
 void stateChanged(ChangeEvent arg0)
           
 void updateAddedSuggestions()
           
 void valueChanged(ListSelectionEvent event)
           
 
Methods inherited from class javax.swing.JSplitPane
addImpl, getAccessibleContext, getBottomComponent, getDividerLocation, getDividerSize, getLastDividerLocation, getLeftComponent, getMaximumDividerLocation, getMinimumDividerLocation, getOrientation, getResizeWeight, getRightComponent, getTopComponent, getUI, getUIClassID, isContinuousLayout, isOneTouchExpandable, isValidateRoot, paintChildren, paramString, remove, remove, removeAll, resetToPreferredSizes, setBottomComponent, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerSize, setLastDividerLocation, setLeftComponent, setOneTouchExpandable, setOrientation, setResizeWeight, setRightComponent, setTopComponent, 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, paint, paintBorder, 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, 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, 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, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

CONTROL_PANEL_UPDATE_PROPERTY

public static final String CONTROL_PANEL_UPDATE_PROPERTY
See Also:
Constant Field Values

DEBUG_CONSTRUCTOR_PROPERTY

public static final String DEBUG_CONSTRUCTOR_PROPERTY
See Also:
Constant Field Values

DEBUG_PROPERTY_EVENTS_PROPERTY

public static final String DEBUG_PROPERTY_EVENTS_PROPERTY
See Also:
Constant Field Values

DEBUG_EVENT_PROPERTY

public static final String DEBUG_EVENT_PROPERTY
See Also:
Constant Field Values

DEBUG_QUERY_RESULTS_PROPERTY

public static final String DEBUG_QUERY_RESULTS_PROPERTY
See Also:
Constant Field Values

DEBUG_REFRESH_PROPERTY

public static final String DEBUG_REFRESH_PROPERTY
See Also:
Constant Field Values
Constructor Detail

SearchComponent

public SearchComponent(TargetList.ListTypes list_name,
                       int index,
                       Configuration configuration,
                       boolean include_nearby_obs_list,
                       Component parent_component)
                throws Configuration_Exception,
                       Database_Exception
Throws:
Configuration_Exception
Database_Exception
Method Detail

columnHeadings

public Vector<String> columnHeadings()
Get the Vector of Strings that contains the column names of the data table.

Returns:
A Vector of String column names.

dataTable

public Vector<Vector<String>> dataTable()
Get the data table as a Vector of Vector Strings.

Returns:
the table data

setAddedSuggestions

public void setAddedSuggestions(Vector<Integer> suggestion_list)

updateAddedSuggestions

public void updateAddedSuggestions()
                            throws Database_Exception
Throws:
Database_Exception

setRetrieveNearestNeighberList

public void setRetrieveNearestNeighberList(boolean include_nearest_neighbor_list)

refresh

public void refresh()

setTabComponent

public void setTabComponent(ButtonTabComponent component)

addedSuggestionsNotFound

public Vector<Integer> addedSuggestionsNotFound()
Get the set of added suggestions (from the added suggestions vector) that do not appear in the target list.

Returns:
A Vector of Integers that contains the suggestion id's that don't appear in the target list.
See Also:
TargetList.addedSuggestionsNotFound()

ignoreFilterUpdates

public boolean ignoreFilterUpdates()

getMissingSuggestionWarnings

public HashMap<Integer,TargetWarning> getMissingSuggestionWarnings()

getListType

public TargetList.ListTypes getListType()
Get the underlying list type of this SearchComponent.

Returns:
a ListType value that indicates the list type of the component
See Also:
TargetList.ListTypes

getTargetList

public TargetList getTargetList()

propertyChange

public void propertyChange(PropertyChangeEvent event)
Specified by:
propertyChange in interface PropertyChangeListener

valueChanged

public void valueChanged(ListSelectionEvent event)
Specified by:
valueChanged in interface ListSelectionListener

stateChanged

public void stateChanged(ChangeEvent arg0)
Specified by:
stateChanged in interface ChangeListener

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

focusGained

public void focusGained(FocusEvent event)
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Specified by:
focusLost in interface FocusListener

itemStateChanged

public void itemStateChanged(ItemEvent event)
Specified by:
itemStateChanged in interface ItemListener

getMinimumLatitudeFilter

public double getMinimumLatitudeFilter()
Returns:
the current value of the minimum latitude filter as a double

setMinimumLatitudeFilter

public void setMinimumLatitudeFilter(double minLatitude)
Set the value of the minimum latitude filter

Parameters:
minLatitude - - a double value indicating the minimum latitude to set the filter to

getMaximumLatitudeFilter

public double getMaximumLatitudeFilter()
Returns:
the current value of the maximum latitude filter as a double

setMaximumLatitudeFilter

public void setMaximumLatitudeFilter(double maxLatitude)
Set the value of the maximum latitude filter

Parameters:
maxLatitude - - a double value indicating the latitude to set the maximum latitude to

getMinimumLongitudeFilter

public double getMinimumLongitudeFilter()
Returns:
the current value of the minimum longitude filter as a double

setMinimumLongtitudeFilter

public void setMinimumLongtitudeFilter(double minLongitude)
Set the minimum longitude filter to the given value

Parameters:
minLongitude - - a double value to set the minimum longitude to

getMaximumLongitudeFilter

public double getMaximumLongitudeFilter()
Returns:
the current value of the maximum longitude filter as a double

setMaximumLongitudeFilter

public void setMaximumLongitudeFilter(double maxLongitude)
Set the maximum longitude filter to the given value

Parameters:
maxLongitude - - A double value indicating the maximum longitude setting

getMinimumLsubSFilter

public double getMinimumLsubSFilter()
Returns:
the current value of the maximum LsubS filter as a double

setMinimumLsubSFilter

public void setMinimumLsubSFilter(double minLsubS)
Set the minimum LsubS filter to the given value

Parameters:
minLsubS - - a double value indicating the minimum LsubS

getMaximumLsubSFilter

public double getMaximumLsubSFilter()
Returns:
the current value of the maximum LsubS filter as a double

setMaximumLsubSFilter

public void setMaximumLsubSFilter(double maxLsubS)
Set the maximum LsubS filter to the given value

Parameters:
maxLsubS - - a double value indication the maximum LsubS

setMaximumRowCount

public void setMaximumRowCount(int rowCount)
Set the maximum number of rows the search query should return to the given value.

Parameters:
rowCount - - an integer indicating the maximum number of rows to return

setSuggestionsPerScienceTheme

public void setSuggestionsPerScienceTheme(int count)
Sets the number of suggestions per science theme. The results from the database are filtered down to this number of targets per theme.

Parameters:
count - - an integer

enableRowLimits

public void enableRowLimits(boolean enable)
Enable or disable row limits in the underlying database query. By disabling row limits, all available targets that meet the search criteria will be returned. Enabling row limits will only return the number of rows specified by the max rows filter in the GUI. Default: true

Parameters:
enable - - true to enable row limits, false to turn off the limits.

setSelectedPriorities

public void setSelectedPriorities(Vector<String> priorityList)
Set the list of priorities to return by the database query

Parameters:
priorityList - - A Vector of Strings, each string indicates a priority to return.
See Also:
PriorityList

setSelectedScienceThemes

public void setSelectedScienceThemes(Vector<String> themesList)
Parameters:
themesList -

setThreadCounter

public void setThreadCounter(ThreadCounter counter)

main

public static void main(String[] args)
Parameters:
args -

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona