HiRISE

HiRISE.HiPlan.HOGG
Class HOGG

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.HOGG.HOGG
All Implemented Interfaces:
KernelPoolListener, ClipboardOwner, ActionListener, ItemListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ChangeListener

public class HOGG
extends JPanel
implements ActionListener, ChangeListener, ClipboardOwner, ItemListener, KernelPoolListener, PropertyChangeListener

A graphical interface panel that features the controls necessary to set the observation parameters required to configure and acquire a HiRISE image. The HOGG (the HiRISE Observation Generation GUI) enables an operator to set the parameters graphically, storing those parameters in the HiRISE database system, HiCat.

Version:
1.251
Author:
Christian Schaller - UA/PIRL
See Also:
Database, Configuration, 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
static String APPLICATION_GROUP
          The name of the aggregate (group) Parameter under which all parameters specific to HiPlan are enclosed.
static String CCDS_MENU
           
static String CONFIGURATION_MENU
           
static String DEBUG_MENU
           
static boolean DEFAULT_DEBUG_MENU
           
static int DEFAULT_UNBINNED_LINE_INCREMENT
           
static boolean DEFAULT_WITHHOLD_APRIL_FOOLS
           
static String DISABLE_MENU
           
static int DURATION_MAX_HSTABLE
          The maximum observation duration for a high-stability observation, in seconds.
static int DURATION_MAX_NORMAL
          The maximum observation duration for a normal stability observation, in seconds.
static String ENABLE_MENU
           
static int FAILURE
          Exit status for an unsuccessful operation.
static String FAVORITE_TEMPLATES_MENU
           
static String FELICS_COMPRESSION_RATIO
          The name of the configuration parameter that holds the FELICS compression ratio when not provided by the observation record.
static String FILE_MENU
           
static String HELP_MENU
           
static String HIWEB_PASSWORD
          The name of the configuration parameter that holds the operator's HiWeb password.
static String HIWEB_USERNAME
          The name of the configuration parameter that holds the operator's HiWeb username.
static String ID
          Class identification name with source code version and date.
static String IMAGING_MODES_GROUP
          The name of the aggregate (group) Parameter under which all imaging mode parameters are enclosed.
static String IN_HIPLAN_PROPERTY
          The system property whose value is "true" if the HOGG is part of HiPlan.
static String INCREMENT_LINES_MENU
           
static String LINE_TIME_IF_UNKNOWN
          The name of the configuration parameter whose value is to be used for unknown line times.
static double LONG_SETUP
          The warm setup duration in seconds.
static double MEDIUM_SETUP
          The medium setup duration in seconds.
static String MODE_DESCRIPTION
          The name of the Configuration Parameter that holds the description of the imaging mode.
static String MODE_FELICS
          The name of the Configuration Parameter that indicates whether FELICS compression will be used for the imaging mode.
static String MODE_LONG_SETUP_TOKEN
          The value for SETUP_DURATION mode parameter that indicates the long ("warm") setup duration is to be used.
static String MODE_MEDIUM_SETUP_TOKEN
          The value for SETUP_DURATION mode parameter that indicates the medium setup duration is to be used.
static String MODE_NAME
          The name of the Configuration Parameter that holds the name of an imaging mode.
static String MODE_SUBMENU
          The name of the Configuration Parameter that holds the optional name of a submenu for the imaging mode.
static String MODES_MENU
           
static String OPEN_QUICK_PICK_MENU
           
static String OPEN_RECENT_MENU
           
static String OPEN_SAVED_MENU
           
static String PRESET_LINES_MENU
           
static String READ_ONLY
          The name of the configuration parameter whose value indicates that the HOGG should start up in read-only mode.
static String READ_ONLY_PROPERTY
          The system property whose value is "true" if the HOGG should be started up in read-only mode.
static String RECENT_TEMPLATES_MENU
           
static String SELECT_MENU
           
static double SETUP_MAX
          The maximum setup duration value in seconds.
static String STANDALONE_PROPERTY
          The system property whose value is "true" if the HOGG should be started up in standalone mode.
static String STANDARD_IMAGING_MODES_FILENAME
          The name of the PVL file containing the standard imaging modes for HiRISE.
static String STORED_LUTS_MENU
           
static int SUCCESS
          Exit status for a successful operation.
static String TABS_MENU
           
static String TARGET_NAME_ACTION_COMMAND
          The action command issued when the taget name combo box changes.
static String TEMPLATE_IDS
          The name of the configuration parameter that identifies one or more template observation IDs.
static String TEMPLATE_MENU
           
static String UNBINNED_LINE_INCREMENT
           
static String USE_PTF_FIELDS_PROPERTY
          The system property whose value is "true" if the HOGG should initially use certain PTF fields when a new record is loaded.
static String UTILITY_MENU
           
static String WITHHOLD_APRIL_FOOLS
           
 
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
HOGG()
          Creates a HOGG interface panel.
HOGG(String filename)
          Creates a HOGG interface panel using the specified filename to get a Configuration.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Recieves ActionEvents.
 void addChangeListener(ChangeListener changeListener)
          Adds a ChangeListener to this HOGG panel.
 void appendAttentionMessage(String msg)
          Adds an attention message to the message panel.
 void appendErrorMessage(String msg)
          Adds an error message to the message panel.
 void appendMessage(String msg)
          Adds text to the message panel or clears it.
 void appendMessage(String msg, AttributeSet style)
          Adds text to the message panel or clears it.
 void appendSuccessMessage(String msg)
          Adds a success message to the message panel.
 void appendTrackerAttentionMessage(String msg)
          Appends an attention-getting message to this HOGG's HiPlan Tracker message panel.
 void appendTrackerErrorMessage(String msg)
          Appends an error message to this HOGG's HiPlan Tracker message panel.
 void appendTrackerMessage(String msg)
          Appends a message to this HOGG's HiPlan Tracker message panel.
 void appendTrackerMessage(String msg, AttributeSet style)
          Appends a styled message to this HOGG's HiPlan Tracker message panel.
 void appendTrackerSuccessMessage(String msg)
          Appends a success message to this HOGG's HiPlan Tracker message panel.
 void appendTrackerWarningMessage(String msg)
          Appends a warning message to this HOGG's HiPlan Tracker message panel.
 void appendWarningMessage(String msg)
          Adds a warning message to the message panel.
 boolean canProceed()
          Indicates whether a HOGG operation that might wipe out changes to a suggestion can proceed.
protected  void fireStateChanged()
          Send a ChangeEvent to each registered listener.
 Alerts getAlerts()
          Presents the HOGG's alert manager.
 ChangeListener[] getChangeListeners()
          Returns an array of all the ChangeListeners registered to this HOGG panel.
 Configuration getConfiguration()
          Returns the HOGG's configuration.
 Configuration getInitialConfiguration()
          Returns the HOGG's initial configuration.
 JMenuBar getMenuBar()
          Returns the HOGG's menu bar.
 Action getNoLutAction()
           
 Observation_Record_Broker getObservationRecordBroker()
          Returns the HOGG's observation record broker.
 String getOperator()
          Gets the name of the operator controlling the HOGG.
 Action getPlaceholderLutAction()
           
 HiPlan_Tracker getTracker()
          Gets this HOGG's HiPlan Tracker.
 void handleAbout()
          Handles a request to display the application About dialog.
 boolean handleMacQuit()
          Handles a request to quit as generated by the Mac-supplied Quit menu item.
 Map<String,Histogram> histograms()
          Gets the histograms for the active CCDs of the current observation.
protected  void installOverlay(boolean install)
          Conditionally install an overlay image on the root pane's glass pane.
 boolean isEmbedded()
          Tests whether the HOGG is running as an embedded panel.
 boolean isInHiPlan()
          Tests whether the HOGG is running as part of the HiPlan application.
 boolean isStandalone()
          Tests whether the HOGG is running as a standalone application.
 boolean isWritable()
          Returns true if the current record is writable.
 void itemStateChanged(ItemEvent e)
           
 void kernelPoolChanged(KernelPoolEvent e)
          Invoked when the SPICE kernel pool changes.
 void lostOwnership(Clipboard clipboard, Transferable contents)
          Notifies the HOGG that is no longer the clipboard owner.
static void main(String[] args)
          Invokes the standalone application version of the HOGG in its own thread.
 Observation_Record observation_record()
          Gets the HOGG's observation record as defined by its controls.
 void propertyChange(PropertyChangeEvent e)
           
 void removeChangeListener(ChangeListener changeListener)
          Removes a ChangeListener from this HOGG panel.
 void retrieveObservation(PTF_Record ptfRecord)
          Retrieves an observation from HiCat if available.
 void setTracker(HiPlan_Tracker tracker)
          Sets the HiPlan Tracker for this instance of the HOGG.
 void stateChanged(ChangeEvent event)
          Receives ChangeEvents.
 Observation_Record submitObservation()
          Submits the displayed observation to the database.
 
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

IMAGING_MODES_GROUP

public static final String IMAGING_MODES_GROUP
The name of the aggregate (group) Parameter under which all imaging mode parameters are enclosed.

See Also:
Constant Field Values

MODE_NAME

public static final String MODE_NAME
The name of the Configuration Parameter that holds the name of an imaging mode. The name, if present, will be used as the label for the mode in the Modes menu.

See Also:
Constant Field Values

MODE_DESCRIPTION

public static final String MODE_DESCRIPTION
The name of the Configuration Parameter that holds the description of the imaging mode. The description, if present, will be used in the tool tip text for the mode.

See Also:
Constant Field Values

MODE_SUBMENU

public static final String MODE_SUBMENU
The name of the Configuration Parameter that holds the optional name of a submenu for the imaging mode. If the parameter is present, the value will be added to a submenu whose name is the value of this parameter.

See Also:
Constant Field Values

MODE_FELICS

public static final String MODE_FELICS
The name of the Configuration Parameter that indicates whether FELICS compression will be used for the imaging mode. If the parameter is present and all participating CCDs are using LUT compression, the FELICS compression will be used; otherwise FELICS compression will not be used.

See Also:
Constant Field Values

MODE_LONG_SETUP_TOKEN

public static final String MODE_LONG_SETUP_TOKEN
The value for SETUP_DURATION mode parameter that indicates the long ("warm") setup duration is to be used.

See Also:
Constant Field Values

MODE_MEDIUM_SETUP_TOKEN

public static final String MODE_MEDIUM_SETUP_TOKEN
The value for SETUP_DURATION mode parameter that indicates the medium setup duration is to be used.

See Also:
Constant Field Values

READ_ONLY_PROPERTY

public static final String READ_ONLY_PROPERTY
The system property whose value is "true" if the HOGG should be started up in read-only mode.

See Also:
Constant Field Values

STANDALONE_PROPERTY

public static final String STANDALONE_PROPERTY
The system property whose value is "true" if the HOGG should be started up in standalone mode.

See Also:
Constant Field Values

IN_HIPLAN_PROPERTY

public static final String IN_HIPLAN_PROPERTY
The system property whose value is "true" if the HOGG is part of HiPlan. Note that the HOGG may be both not part of HiPlan and not standalone. If embedded in another application, for instance, this situation would be the case.

See Also:
Constant Field Values

USE_PTF_FIELDS_PROPERTY

public static final String USE_PTF_FIELDS_PROPERTY
The system property whose value is "true" if the HOGG should initially use certain PTF fields when a new record is loaded. Otherwise, the HiCat values will be used instead.

This parameter is meaningful only when the HOGG is used in dialog mode in conjunction with a PTF editor, such as when used in the HiPlan application.

See Also:
Constant Field Values

STANDARD_IMAGING_MODES_FILENAME

public static final String STANDARD_IMAGING_MODES_FILENAME
The name of the PVL file containing the standard imaging modes for HiRISE. This file is used to construct the Modes menu. The HOGG class loader expects to find this file in the directory named by Constants.RESOURCES_DIRECTORY.

See Also:
Constant Field Values

SETUP_MAX

public static final double SETUP_MAX
The maximum setup duration value in seconds. This is the maximum safe value, not the maximum specified in the PTF SIS. If this value is exceded, HiRISE might not expose.

See Also:
Constant Field Values

LONG_SETUP

public static final double LONG_SETUP
The warm setup duration in seconds.

See Also:
Constant Field Values

MEDIUM_SETUP

public static final double MEDIUM_SETUP
The medium setup duration in seconds.

See Also:
Constant Field Values

DURATION_MAX_NORMAL

public static final int DURATION_MAX_NORMAL
The maximum observation duration for a normal stability observation, in seconds.

See Also:
Constant Field Values

DURATION_MAX_HSTABLE

public static final int DURATION_MAX_HSTABLE
The maximum observation duration for a high-stability observation, in seconds.

See Also:
Constant Field Values

FILE_MENU

public static final String FILE_MENU
See Also:
Constant Field Values

OPEN_QUICK_PICK_MENU

public static final String OPEN_QUICK_PICK_MENU
See Also:
Constant Field Values

OPEN_RECENT_MENU

public static final String OPEN_RECENT_MENU
See Also:
Constant Field Values

OPEN_SAVED_MENU

public static final String OPEN_SAVED_MENU
See Also:
Constant Field Values

CONFIGURATION_MENU

public static final String CONFIGURATION_MENU
See Also:
Constant Field Values

MODES_MENU

public static final String MODES_MENU
See Also:
Constant Field Values

TEMPLATE_MENU

public static final String TEMPLATE_MENU
See Also:
Constant Field Values

RECENT_TEMPLATES_MENU

public static final String RECENT_TEMPLATES_MENU
See Also:
Constant Field Values

FAVORITE_TEMPLATES_MENU

public static final String FAVORITE_TEMPLATES_MENU
See Also:
Constant Field Values

CCDS_MENU

public static final String CCDS_MENU
See Also:
Constant Field Values

ENABLE_MENU

public static final String ENABLE_MENU
See Also:
Constant Field Values

DISABLE_MENU

public static final String DISABLE_MENU
See Also:
Constant Field Values

SELECT_MENU

public static final String SELECT_MENU
See Also:
Constant Field Values

PRESET_LINES_MENU

public static final String PRESET_LINES_MENU
See Also:
Constant Field Values

INCREMENT_LINES_MENU

public static final String INCREMENT_LINES_MENU
See Also:
Constant Field Values

TABS_MENU

public static final String TABS_MENU
See Also:
Constant Field Values

UTILITY_MENU

public static final String UTILITY_MENU
See Also:
Constant Field Values

STORED_LUTS_MENU

public static final String STORED_LUTS_MENU
See Also:
Constant Field Values

HELP_MENU

public static final String HELP_MENU
See Also:
Constant Field Values

TARGET_NAME_ACTION_COMMAND

public static final String TARGET_NAME_ACTION_COMMAND
The action command issued when the taget name combo box changes.

See Also:
Constant Field Values

APPLICATION_GROUP

public static final String APPLICATION_GROUP
The name of the aggregate (group) Parameter under which all parameters specific to HiPlan are enclosed.

See Also:
Constant Field Values

LINE_TIME_IF_UNKNOWN

public static final String LINE_TIME_IF_UNKNOWN
The name of the configuration parameter whose value is to be used for unknown line times. The default value is Time_Utilities.DEFAULT_LINE_TIME.

See Also:
Constant Field Values

READ_ONLY

public static final String READ_ONLY
The name of the configuration parameter whose value indicates that the HOGG should start up in read-only mode. The default value is taken from the READ_ONLY_PROPERTY system property; if not defined, the value is false.

See Also:
Constant Field Values

FELICS_COMPRESSION_RATIO

public static final String FELICS_COMPRESSION_RATIO
The name of the configuration parameter that holds the FELICS compression ratio when not provided by the observation record. The default value is Observation_Fields.DEFAULT_FELICS_COMPRESSION_RATIO.

See Also:
Constant Field Values

HIWEB_USERNAME

public static final String HIWEB_USERNAME
The name of the configuration parameter that holds the operator's HiWeb username. If this paramter is not found in the configuration file, the operator's system username will be used instead.

This parameter is used by the suggestion editor.

See Also:
Constant Field Values

HIWEB_PASSWORD

public static final String HIWEB_PASSWORD
The name of the configuration parameter that holds the operator's HiWeb password.

This parameter is used by the suggestion editor.

See Also:
Constant Field Values

TEMPLATE_IDS

public static final String TEMPLATE_IDS
The name of the configuration parameter that identifies one or more template observation IDs. These IDs are added to the Template menu's Favorites submenu. If this parameter's value is an array, each element of the array is an item in the submenu.

See Also:
Constant Field Values

UNBINNED_LINE_INCREMENT

public static final String UNBINNED_LINE_INCREMENT
See Also:
Constant Field Values

DEFAULT_UNBINNED_LINE_INCREMENT

public static final int DEFAULT_UNBINNED_LINE_INCREMENT
See Also:
Constant Field Values

WITHHOLD_APRIL_FOOLS

public static final String WITHHOLD_APRIL_FOOLS
See Also:
Constant Field Values

DEFAULT_WITHHOLD_APRIL_FOOLS

public static final boolean DEFAULT_WITHHOLD_APRIL_FOOLS
See Also:
Constant Field Values

DEBUG_MENU

public static final String DEBUG_MENU
See Also:
Constant Field Values

DEFAULT_DEBUG_MENU

public static final boolean DEFAULT_DEBUG_MENU
See Also:
Constant Field Values

SUCCESS

public static final int SUCCESS
Exit status for a successful operation.

See Also:
Constant Field Values

FAILURE

public static final int FAILURE
Exit status for an unsuccessful operation.

See Also:
Constant Field Values
Constructor Detail

HOGG

public HOGG(String filename)
     throws Configuration_Exception,
            Connection_Tester.Connection_Exception,
            Invalid_Argument_Exception
Creates a HOGG interface panel using the specified filename to get a Configuration. The configuration is updated based on discovered system properties. A new Database is instantiated according to the configuration's parameters, and a connection is opened. An Observation_Record_Broker is created to manage observation record transactions with the database.

The filename parameter will override any pre-existing values for the configuration filename system property unless it is null.

Parameters:
filename - the name of the configuration file that specifies the configurable parameters for the HOGG.
Throws:
Database_Exception - if there is a problem with the database.
Configuration_Exception - if there is a problem with the configuration file.
Connection_Tester.Connection_Exception - if there is a problem establishing a database connection.
Invalid_Argument_Exception
See Also:
READ_ONLY_PROPERTY, STANDALONE_PROPERTY

HOGG

public HOGG()
     throws Configuration_Exception,
            Connection_Tester.Connection_Exception,
            Invalid_Argument_Exception
Creates a HOGG interface panel. The Configuration filename is taken from the system properties; the configuration itself is updated based on additional discovered properties. A new Database is instantiated according to the configuration's parameters, and a connection is opened. An Observation_Record_Broker is created to manage observation record transactions with the database.

Throws:
Database_Exception - if there is a problem with the database.
Configuration_Exception - if there is a problem with the configuration file.
Connection_Tester.Connection_Exception - if there is a problem establishing a database connection.
Invalid_Argument_Exception
See Also:
Constants.CONFIGURATION_PROPERTY, READ_ONLY_PROPERTY, STANDALONE_PROPERTY
Method Detail

getPlaceholderLutAction

public Action getPlaceholderLutAction()

getNoLutAction

public Action getNoLutAction()

installOverlay

protected void installOverlay(boolean install)
Conditionally install an overlay image on the root pane's glass pane. If install is false, the overlay is not installed. If there is no root pane, the overlay is not installed.

If the overlay is installed, a menu item is also added to the Utilities menu to selectively show and hide the overlay.

Parameters:
install - if true and if the HOGG has a root pane, install the overlay image to the container's glass pane.
See Also:
JRootPane, JRootPane.getGlassPane()

getOperator

public String getOperator()
Gets the name of the operator controlling the HOGG. This name is taken from the operator's configuration file.

Returns:
the operator's database user name.

getMenuBar

public JMenuBar getMenuBar()
Returns the HOGG's menu bar. The menu is configured differently depending on whether the HOGG is a standalone application or a panel.

Returns:
the menu bar.

getObservationRecordBroker

public Observation_Record_Broker getObservationRecordBroker()
Returns the HOGG's observation record broker.

Returns:
the HOGG's broker.

getConfiguration

public Configuration getConfiguration()
Returns the HOGG's configuration.

Note: The returned configuration has not been santized of bare passwords; displaying this configuration will reveal the operator's password and should be avoided.

Returns:
the HOGG's configuration.

getInitialConfiguration

public Configuration getInitialConfiguration()
Returns the HOGG's initial configuration.

Note: Passwords in the returned configuration have been masked.

Returns:
the HOGG's initial configuration.

getAlerts

public Alerts getAlerts()
Presents the HOGG's alert manager.

Returns:
the HOGG's alert manager.

isWritable

public boolean isWritable()
Returns true if the current record is writable. A record is writable if at least one CPMM is active, the record is not locked due to the value of its STATUS field, and the operator has not manually indicated that the record is read-only. If each of these conditions is met, then the record may be written to the database.

Containers for the HOGG panel should use this method to set the state of any controls that write the observation record. The HOGG fires ChangeEvents when the value returned by this method may have changed.


isStandalone

public boolean isStandalone()
Tests whether the HOGG is running as a standalone application. If it is not a standalone application (e.g., this method returns false), the HOGG is likely operating as part of HiPlan proper, although this is not guaranteed.

Returns:
true if the HOGG is a standalone application; false otherwise.

isEmbedded

public boolean isEmbedded()
Tests whether the HOGG is running as an embedded panel.

Returns:
true if the HOGG is embedded in another application; false otherwise.
See Also:
isStandalone

isInHiPlan

public boolean isInHiPlan()
Tests whether the HOGG is running as part of the HiPlan application.

Returns:
true if the HOGG is running within HiPlan; false otherwise.

setTracker

public void setTracker(HiPlan_Tracker tracker)
Sets the HiPlan Tracker for this instance of the HOGG. Doing so allows the HOGG to write to the tracker's own message panel, for example.

Parameters:
tracker - the HiPlan Tracker.

getTracker

public HiPlan_Tracker getTracker()
Gets this HOGG's HiPlan Tracker.

Returns:
the HiPlan Tracker.

addChangeListener

public void addChangeListener(ChangeListener changeListener)
Adds a ChangeListener to this HOGG panel. A ChangeEvent is fired whenever the current Observation_Record changes from read/write to read-only or back.

Parameters:
changeListener - the ChangeListener to add.

removeChangeListener

public void removeChangeListener(ChangeListener changeListener)
Removes a ChangeListener from this HOGG panel.

Parameters:
changeListener - the ChangeListener to remove.

getChangeListeners

public ChangeListener[] getChangeListeners()
Returns an array of all the ChangeListeners registered to this HOGG panel.

Returns:
all of the ChangeListeners added or an empty array if no listeners have been added.

fireStateChanged

protected void fireStateChanged()
Send a ChangeEvent to each registered listener. The source is this HOGG panel.


actionPerformed

public void actionPerformed(ActionEvent e)
Recieves ActionEvents. This method is invoked when an action occurs within this HOGG object. This method invokes additional methods appropriate to the source of the action event.

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the action event that invoked this method.

stateChanged

public void stateChanged(ChangeEvent event)
Receives ChangeEvents. This method is invoked, for example, when changes are made to HIPHOP.

Specified by:
stateChanged in interface ChangeListener
Parameters:
event - the change event that invoked this method.

lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
Notifies the HOGG that is no longer the clipboard owner. This method is called when another application asserts ownership of the clipboard. This method currently does nothing, but it is required by the ClipboardOwner interface.

Specified by:
lostOwnership in interface ClipboardOwner
Parameters:
clipboard - the clipboard that is no longer owned.
contents - the contents this owner had placed in the clipboard.

itemStateChanged

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

kernelPoolChanged

public void kernelPoolChanged(KernelPoolEvent e)
Description copied from interface: KernelPoolListener
Invoked when the SPICE kernel pool changes.

Specified by:
kernelPoolChanged in interface KernelPoolListener
Parameters:
e - the kernel pool change event.

propertyChange

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

handleMacQuit

public boolean handleMacQuit()
Handles a request to quit as generated by the Mac-supplied Quit menu item. This item is located in the application menu for the HOGG. A Mac_Adapter registers this method as the handler for the Apple event generated by this menu item.

This method checks whether it is safe to quit the application. If so, it returns true; otherwise it returns false. This return value is used to determine whether the request to quit is accepted.

This method is exposed for access by the Mac Adapter.

Returns:
true if the application is allowed to quit, false otherwise.

handleAbout

public void handleAbout()
Handles a request to display the application About dialog. This method is called when the operator selects the About menu item in the HOGG's Help menu.

On a Mac, an About menu item is also supplied in the application menu. A Mac_Adapter registers this method as the handler for the Apple event generated by this menu item.

This method is exposed for access by the Mac Adapter.


retrieveObservation

public void retrieveObservation(PTF_Record ptfRecord)
Retrieves an observation from HiCat if available. The observation ID is taken from the ptfRecord's team_database_id method. If the retrieval is successful, members of the ptfRecord are merged into the observation record; the interface is updated to reflect the new parameters.

Parameters:
ptfRecord - the PTF record from which the observation ID is taken and from which fields are to be merged.

submitObservation

public Observation_Record submitObservation()
Submits the displayed observation to the database. The transaction takes place via the Observation_Record_Broker, which either updates an existing record or inserts a new one. The following additional processes take place, in the following order.

If the displayed observation has no ID, the transaction does not take place.

The observation's comment field is updated to include the mapped suggestion ID, if applicable.

The length of the comment field (post suggestion ID update) and the coordinated track history field are checked. If the fields are too large, the operator is prompted to truncate the field or cancel the transaction and adjust the length manually.

The observation is checked to ensure it is safe to submit from a planning process point of view. If its status is REQUEST, it is not necessarily so safe to submit, and the operator is prompted with a warning and the option to cancel or continue. If the operator chooses to continue, a second warning is displayed reminding the operator that a new command file must be generated and uplinked.

The status field is updated to PLAN or DEFUNCT, depending on the state of the Defunct button.

The operator parameter is updated.

The observation is now submitted for update.

SuggestEd is instructed to update the suggestion mapping. If the observation is defunct, its suggestion is unmapped and unretired (if previously mapped). Likewise, if the observation's target is NOOP or CRC_CHECK, its suggestion is also unmapped and unretired if previously mapped. If not, then the suggestion displayed in SuggestEd is mapped to the current observation if possible; see Suggestion_Panel.submitMappedId() for details. If a problem develops during the mapping, the operator is prompted with details of the error and the mapping is canceled. Note that the observation has already been saved in this case; the suggestion merely has not been mapped.

Returns:
the updated observation record if successful, or null if either the observation update or the suggestion mapping failed.
See Also:
Suggestion_Panel.unmapSuggestion(), Suggestion_Panel.submitMappedId()

observation_record

public Observation_Record observation_record()
Gets the HOGG's observation record as defined by its controls.

Returns:
the observation record.

histograms

public Map<String,Histogram> histograms()
Gets the histograms for the active CCDs of the current observation. These histograms are generated by HIPHOP, and it is required that this observation already have been HIPHOPped.

Returns:
a map of CCD name to CCD histogram.

appendMessage

public void appendMessage(String msg,
                          AttributeSet style)
Adds text to the message panel or clears it. The text is styled according to the indicated style; if style is null, Message_Panel.PLAIN_STYLE is used.

If msg is null, the panel is cleared.

Parameters:
msg - the text to append.
style - the style attributes to apply to the appended text.
See Also:
Message_Panel.append(String,AttributeSet)

appendMessage

public void appendMessage(String msg)
Adds text to the message panel or clears it. If msg is null, the panel is cleared. The Message_Panel.PLAIN_STYLE is applied to the text as it is appended.

Parameters:
msg - the text to append.
See Also:
appendMessage(String,AttributeSet)

appendAttentionMessage

public void appendAttentionMessage(String msg)
Adds an attention message to the message panel. If msg is null, the panel will be cleared. The Message_Panel.ATTENTION_STYLE is applied to the text as it is appended.

Parameters:
msg - the text to append.
See Also:
Message_Panel.appendAttentionMessage(String)

appendSuccessMessage

public void appendSuccessMessage(String msg)
Adds a success message to the message panel. If msg is null, the panel will be cleared. The Message_Panel.SUCCESS_STYLE is applied to the text as it is appended.

Parameters:
msg - the text to append.
See Also:
Message_Panel.appendAttentionMessage(String)

appendWarningMessage

public void appendWarningMessage(String msg)
Adds a warning message to the message panel. If msg is null, the panel will be cleared. The Message_Panel.WARNING_STYLE is applied to the text as it is appended.

Parameters:
msg - the text to append.
See Also:
Message_Panel.appendAttentionMessage(String)

appendErrorMessage

public void appendErrorMessage(String msg)
Adds an error message to the message panel. If msg is null, the panel will be cleared. The Message_Panel.ERROR_STYLE is applied to the text as it is appended.

Parameters:
msg - the text to append.
See Also:
Message_Panel.appendAttentionMessage(String)

appendTrackerMessage

public void appendTrackerMessage(String msg,
                                 AttributeSet style)
Appends a styled message to this HOGG's HiPlan Tracker message panel. If this HOGG has no tracker, the message is appended to its own message panel.

Parameters:
msg - the message to append.
style - the style for the message.
See Also:
Message_Panel.append(String,AttributeSet), setTracker(HiPlan_Tracker)

appendTrackerMessage

public void appendTrackerMessage(String msg)
Appends a message to this HOGG's HiPlan Tracker message panel. If this HOGG has no tracker, the message is appended to its own message panel.

Parameters:
msg - the message to append.
See Also:
Message_Panel.append(String), setTracker(HiPlan_Tracker)

appendTrackerAttentionMessage

public void appendTrackerAttentionMessage(String msg)
Appends an attention-getting message to this HOGG's HiPlan Tracker message panel. If this HOGG has no tracker, the message is appended to its own panel.

Parameters:
msg - the message to append.
See Also:
Message_Panel.appendAttentionMessage(String), setTracker(HiPlan_Tracker)

appendTrackerSuccessMessage

public void appendTrackerSuccessMessage(String msg)
Appends a success message to this HOGG's HiPlan Tracker message panel. If this HOGG has no tracker, the message is appended to its own panel.

Parameters:
msg - the message to append.
See Also:
Message_Panel.appendSuccessMessage(String), setTracker(HiPlan_Tracker)

appendTrackerWarningMessage

public void appendTrackerWarningMessage(String msg)
Appends a warning message to this HOGG's HiPlan Tracker message panel. If this HOGG has no tracker, the message is appended to its own panel.

Parameters:
msg - the message to append.
See Also:
Message_Panel.appendWarningMessage(String), setTracker(HiPlan_Tracker)

appendTrackerErrorMessage

public void appendTrackerErrorMessage(String msg)
Appends an error message to this HOGG's HiPlan Tracker message panel. If this HOGG has no tracker, the message is appended to its own panel.

Parameters:
msg - the message to append.
See Also:
Message_Panel.appendErrorMessage(String), setTracker(HiPlan_Tracker)

canProceed

public boolean canProceed()
Indicates whether a HOGG operation that might wipe out changes to a suggestion can proceed.

Returns:
true if the HOGG operation can proceed; false otherwise.

main

public static void main(String[] args)
Invokes the standalone application version of the HOGG in its own thread. One or more input sources of observation IDs may be supplied for the contents of the Quick Pick menu; see Observation_ID_Accumulator for information about sources.

If the optional observation ID sources yield one and only one observation ID, that observation is automatically loaded into the HOGG for immediate viewing.

Usage

HOGG [--configuration configuration_pathname] [--read-only] [observation_id_source [...]]

HOGG --usage

HOGG --version

Options are not case-sensitive and may be reduced to their shortest unique form. One or two dashes may be used.

Options

--configuration configuration_pathname
Sets the pathname of the configuration file from which to configure the application. See Configuration_Helper.getConfiguration(String,String,String...) for details on the configuration pathname; if this option is not used, the config source argument is null.
--read-only
Sets the HOGG to read-only mode. This mode may be overridden on a case-by-case basis for each observation.

Parameters:
args - the command-line arguments.

HiRISE

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