HiRISE

HiRISE.HiPlan.HiWeb
Class SuggestionBackfillPanel

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 HiRISE.HiPlan.HiWeb.SuggestionEditorPanel
                      extended by HiRISE.HiPlan.HiWeb.SuggestionBackfillPanel
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DocumentListener

public class SuggestionBackfillPanel
extends SuggestionEditorPanel

A simplified suggestion editor panel for access to the parameters most often required by the targeting specialists.

Version:
1.39
Author:
Guy McArthur - UA/PIRL
See Also:
SuggestionEditorPanel, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class HiRISE.HiPlan.HiWeb.SuggestionEditorPanel
SuggestionEditorPanel.SuggesterCache, SuggestionEditorPanel.Validation_Exception
 
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
static String ID
          Class identification name with source code version and date.
 
Fields inherited from class HiRISE.HiPlan.HiWeb.SuggestionEditorPanel
alerts, APPLICATION_GROUP, ATTENTION_COLOR, catalog, configuration, database, DEFAULT_FOOTPRINT_HEIGHT, DEFAULT_FOOTPRINT_WIDTH, DEFAULT_MAXIMUM_EMISSION_ANGLE, DEFAULT_MAXIMUM_INCIDENCE_ANGLE, DEFAULT_MAXIMUM_L_SUB_S, DEFAULT_MAXIMUM_PHASE_ANGLE, DEFAULT_MINIMUM_EMISSION_ANGLE, DEFAULT_MINIMUM_INCIDENCE_ANGLE, DEFAULT_MINIMUM_L_SUB_S, DEFAULT_MINIMUM_PHASE_ANGLE, FOOTPRINT_HEIGHT, FOOTPRINT_WIDTH, initialSuggestion, KEY_ID, MAX_DESCRIPTION_LENGTH, MAXIMUM_EMISSION_ANGLE, MAXIMUM_INCIDENCE_ANGLE, MAXIMUM_L_SUB_S, MAXIMUM_PHASE_ANGLE, MINIMUM_EMISSION_ANGLE, MINIMUM_INCIDENCE_ANGLE, MINIMUM_L_SUB_S, MINIMUM_PHASE_ANGLE, mode, OUT_OF_LIMITS_COLOR, OUT_OF_LIMITS_TEXT_COLOR, STRUT_SIZE, suggesterCache, suggestion, TABLE_PEOPLE, TABLE_PEOPLE_MAP, TABLE_SCIENCE_THEMES, TABLE_SCIENCE_THEMES_MAP, TABLE_SUGGESTIONS, username, USERNAME
 
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
SuggestionBackfillPanel(Configuration configuration, String catalog)
          Create a new Suggestion Editor panel for backfilling from Observation records.
 
Method Summary
 void enableEditorFields(boolean enabled)
           
 void enableOwnerFields(boolean enabled)
           
 void enableOwnerHitsFields(boolean enabled)
           
 void enableStlFields(boolean enabled)
           
protected  JPanel getConstraintsPanel()
          Creates a panel for the constraints.
protected  JPanel getNotesPanel()
          Creates a panel of controls for science rationale and notes.
protected  JPanel getSuggestionPanel()
          Creates a panel for suggestion ID and so forth.
 void init()
          Initialize this instance plus the advanced editor instance.
 boolean saveSuggestion(boolean notifyOnSave)
          Saves the suggestion displayed in the panel.
 void setDefaultSuggester(String suggester)
          Sets the suggestion editor's default suggester.
 int showAdvancedEditorDialog(Component parent)
          Bring up a dialog with the advanced editor.
 void updateObservationFields(Observation_Record observation)
           
 void validateSuggestion()
          Validates the suggestion's fields in the editor.
 
Methods inherited from class HiRISE.HiPlan.HiWeb.SuggestionEditorPanel
actionPerformed, addActionListener, alerts, alerts, backfillSuggestion, calculateVertices, change, changedUpdate, configure, copyFrom, fireActionPerformed, getActionListeners, getBoundedConstraintsPanel, getColorPanel, getCoordinatesPanel, getCoordinationPanel, getDefaultSuggester, getID, getPhotometryPanel, getPointingPanel, getPriorityPanel, getStereoPanel, getStlBoundedConstraintsPanel, getStlMaxEmissionAngle, getStlMaxIncidenceAngle, getStlMaxLsubS, getStlMaxPhaseAngle, getStlMinEmissionAngle, getStlMinIncidenceAngle, getStlMinLsubS, getStlMinPhaseAngle, initialSuggestion, insert, insertUpdate, removeActionListener, removeUpdate, select, setEmissionAngles, setIncidenceAngles, setLsubS, setPhaseAngles, suggestion, update, updateDescription
 
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, 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
Class identification name with source code version and date.

See Also:
Constant Field Values
Constructor Detail

SuggestionBackfillPanel

public SuggestionBackfillPanel(Configuration configuration,
                               String catalog)
                        throws Invalid_Argument_Exception
Create a new Suggestion Editor panel for backfilling from Observation records.

Throws:
Invalid_Argument_Exception - if the configuration does not adequately specify a database.
Method Detail

getSuggestionPanel

protected JPanel getSuggestionPanel()
Creates a panel for suggestion ID and so forth.

Overrides:
getSuggestionPanel in class SuggestionEditorPanel
Returns:
a UI panel.

getConstraintsPanel

protected JPanel getConstraintsPanel()
Creates a panel for the constraints.

Returns:
a UI panel.

getNotesPanel

protected JPanel getNotesPanel()
Creates a panel of controls for science rationale and notes.

Overrides:
getNotesPanel in class SuggestionEditorPanel
Returns:
a UI panel.

init

public void init()
          throws Database_Exception
Initialize this instance plus the advanced editor instance.

Overrides:
init in class SuggestionEditorPanel
Throws:
Database_Exception - Could not connect to database

updateObservationFields

public void updateObservationFields(Observation_Record observation)
Overrides:
updateObservationFields in class SuggestionEditorPanel

setDefaultSuggester

public void setDefaultSuggester(String suggester)
Sets the suggestion editor's default suggester. The advanced editor is likewise updated.

Overrides:
setDefaultSuggester in class SuggestionEditorPanel
Parameters:
suggester - the new suggester for the editor.

saveSuggestion

public boolean saveSuggestion(boolean notifyOnSave)
Saves the suggestion displayed in the panel. If the suggestion cannot be saved, an error dialog is displayed.

Parameters:
notifyOnSave - if true, the panel will alert the operator that the suggestion has been saved.
Returns:
true if the suggestion was successfully saved; false otherwise.

showAdvancedEditorDialog

public int showAdvancedEditorDialog(Component parent)
Bring up a dialog with the advanced editor. It will be modal. This method takes some care to ensure the advanced editor is not taller than the screen, which can happen on a laptop (or on any display less than 1200 pixels tall). If the editor is too tall, it is resized and its scroll bars come into effect.

Parameters:
parent - the dialog owner.
Returns:
JOptionPane.OK_OPTION or JOptionPane.CANCEL_OPTION.

enableOwnerFields

public void enableOwnerFields(boolean enabled)
Overrides:
enableOwnerFields in class SuggestionEditorPanel

enableOwnerHitsFields

public void enableOwnerHitsFields(boolean enabled)
Overrides:
enableOwnerHitsFields in class SuggestionEditorPanel

enableStlFields

public void enableStlFields(boolean enabled)
Overrides:
enableStlFields in class SuggestionEditorPanel

enableEditorFields

public void enableEditorFields(boolean enabled)
Overrides:
enableEditorFields in class SuggestionEditorPanel

validateSuggestion

public void validateSuggestion()
                        throws SuggestionEditorPanel.Validation_Exception
Validates the suggestion's fields in the editor. If a field is not valid, a SuggestionEditorPanel.Validation_Exception will be thrown.

This method overrides the SuggestionEditorPanel.validateSuggestion() method. After it makes its own checks, however, it calls the overridden method as well, so all necessary fields will be checked.

Fields Checked

None. All checks are performed by the superclass.

Overrides:
validateSuggestion in class SuggestionEditorPanel
Throws:
SuggestionEditorPanel.Validation_Exception

HiRISE

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