public class MetaDataPanel
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
MetaDataPanel(FHX2_FileOptionalPart inOptPart)
Creates new form MetaDataPanel
|
Modifier and Type | Method and Description |
---|---|
boolean |
CheckForNonCompatibleFieldLengths()
Checks whether or not the current information in the site info fields violates any of the original FHX2 length requirements.
|
private void |
disableTextFieldEnforcement()
Disables length enforcement on all meta data text fields.
|
private void |
enableTextFieldEnforcement()
Enables length enforcement on all meta data text fields.
|
private void |
fillTextFields()
Sets text fields to their appropriate values.
|
static java.lang.Double |
getDecimalCoords(java.lang.Double degrees,
java.lang.Double minutes,
java.lang.Double seconds)
Convert DMS format coordinate into decimal degrees, where W and S are indicated by negative degrees.
|
static java.lang.Double |
getDecimalCoords(java.lang.String sign,
java.lang.Double degrees,
java.lang.Double minutes,
java.lang.Double seconds)
Convert DMS with NSEW sign into decimal coordinates.
|
private void |
initComponents()
Initializes the GUI components.
|
static java.lang.Double |
parseLatLonFromHalfLatLongString(java.lang.String str)
Attempt to convert a string to a decimal latitude or longitude value.
|
private void |
resetTextBoxColors()
Resets the site info text field colors to black after changing to the new unrestricted data length format.
|
void |
saveInfoToData()
Saves all data as it is displayed on the form.
|
private void |
setFieldLengthBoxesVisible(boolean b)
Set visibility of field length boxes.
|
private void |
updateGUIRestrictions(boolean enforce)
Hide/Show restricted fields info depending on preference
|
static void |
updateNumSamplesField()
Updates the value of the numSamples text field.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private final java.lang.String FHX2_META_DATA_LENGTH_MESSAGE
private final int TWO_CHARACTERS
private final int THREE_CHARACTERS
private final int FOUR_CHARACTERS
private final int FIVE_CHARACTERS
private final int SIX_CHARACTERS
private final int TEN_CHARACTERS
private final int FIFTEEN_CHARACTERS
private final int TWENTY_CHARACTERS
private final int TWENTYFIVE_CHARACTERS
private final int THIRTY_CHARACTERS
private final int FORTY_CHARACTERS
private final int SEVENTY_CHARACTERS
private final int ALL_FIELDS_COMPATIBLE
private final int DOCUMENT_LIMIT
private MetaDataTextField areaSampledText
private MetaDataTextField aspectText
private MetaDataTextField collectionDateText
private MetaDataTextField collectorNamesText
private MetaDataTextField commonNamesText
private MetaDataTextField countryText
private MetaDataTextField countyText
private MetaDataTextField daterNamesText
private MetaDataTextField forestText
private MetaDataTextField habitatText
private MetaDataTextField highestElevationText
private javax.swing.JLabel siteNameLabel
private javax.swing.JLabel countryLabel
private javax.swing.JLabel stateLabel
private javax.swing.JLabel countyLabel
private javax.swing.JLabel parkLabel
private javax.swing.JLabel forestLabel
private javax.swing.JLabel rangerDistrictLabel
private javax.swing.JLabel sectionLabel
private javax.swing.JLabel quarterSectionLabel
private javax.swing.JLabel utmEastingLabel
private javax.swing.JLabel siteCodeLabel
private javax.swing.JLabel utmNorthingLabel
private javax.swing.JLabel latitudeLabel
private javax.swing.JLabel longitudeLabel
private javax.swing.JLabel topographicMapLabel
private javax.swing.JLabel highestElevationLabel
private javax.swing.JLabel slopeLabel
private javax.swing.JLabel aspectLabel
private javax.swing.JLabel areaSampledLabel
private javax.swing.JLabel substrateLabel
private javax.swing.JLabel collectionDateLabel
private javax.swing.JLabel rangeLabel
private javax.swing.JLabel collectorNamesLabel
private javax.swing.JLabel daterNamesLabel
private javax.swing.JLabel numSamplesLabel
private javax.swing.JLabel latinNamesLabel
private javax.swing.JLabel commonNamesLabel
private javax.swing.JLabel habitatLabel
private javax.swing.JPanel metaDataPanel
private javax.swing.JScrollPane metaDataScrollPane
private MetaDataTextField latinNamesText
private MetaDataTextField latitudeText
private MetaDataTextField longitudeText
private MetaDataTextField lowestElevationText
private MetaDataTextField parkText
private MetaDataTextField quarterSectionText
private MetaDataTextField rangeText
private MetaDataTextField rangerDistrictText
private MetaDataTextField sectionText
private MetaDataTextField siteCodeText
private MetaDataTextField siteNameText
private MetaDataTextField slopeText
private MetaDataTextField stateText
private MetaDataTextField substrateText
private MetaDataTextField topographicMapText
private MetaDataTextField townshipText
private MetaDataTextField utmEastingText
private MetaDataTextField utmNorthingText
private static MetaDataTextField numSamplesText
private javax.swing.JButton convertLatToDecimalButton
private javax.swing.JButton convertLonToDecimalButton
private HelpTipButton siteCodeHelpTipButton
private HelpTipButton collectionDateHelpTipButton
private HelpTipButton collectorNamesHelpTipButton
private HelpTipButton daterNamesHelpTipButton
private HelpTipButton latinNamesHelpTipButton
private HelpTipButton commonNamesHelpTipButton
private HelpTipButton habitatHelpTipButton
private HelpTipButton countryHelpTipButton
private HelpTipButton stateHelpTipButton
private HelpTipButton countyHelpTipButton
private HelpTipButton parkHelpTipButton
private HelpTipButton forestHelpTipButton
private HelpTipButton rangerDistrictHelpTipButton
private HelpTipButton townshipHelpTipButton
private HelpTipButton rangeHelpTipButton
private HelpTipButton sectionHelpTipButton
private HelpTipButton quarterSectionHelpTipButton
private HelpTipButton utmEastingHelpTipButton
private HelpTipButton utmNorthingHelpTipButton
private HelpTipButton latitudeHelpTipButton
private HelpTipButton longitudeHelpTipButton
private HelpTipButton topographicMapHelpTipButton
private HelpTipButton highestElevationHelpTipButton
private HelpTipButton lowestElevationHelpTipButton
private HelpTipButton slopeHelpTipButton
private HelpTipButton aspectHelpTipButton
private HelpTipButton areaSampledHelpTipButton
private HelpTipButton substrateHelpTipButton
private HelpTipButton numSamplesHelpTipButton
private javax.swing.JCheckBox enforceOldReqsCheckBox
private javax.swing.JLabel fieldLengthLabel
private javax.swing.JTextField siteNameCountBox
private javax.swing.JTextField siteCodeCountBox
private javax.swing.JTextField collectionDateCountBox
private javax.swing.JTextField collectorNamesCountBox
private javax.swing.JTextField daterNamesCountBox
private javax.swing.JTextField latinNamesCountBox
private javax.swing.JTextField commonNamesCountBox
private javax.swing.JTextField habitatCountBox
private javax.swing.JTextField countryCountBox
private javax.swing.JTextField stateCountBox
private javax.swing.JTextField countyCountBox
private javax.swing.JTextField parkCountBox
private javax.swing.JTextField forestCountBox
private javax.swing.JTextField rangerDistrictCountBox
private javax.swing.JTextField townshipCountBox
private javax.swing.JTextField rangeCountBox
private javax.swing.JTextField sectionCountBox
private javax.swing.JTextField quarterSectionCountBox
private javax.swing.JTextField utmEastingCountBox
private javax.swing.JTextField utmNorthingCountBox
private javax.swing.JTextField topographicMapCountBox
private javax.swing.JTextField highestElevationCountBox
private javax.swing.JTextField lowestElevationCountBox
private javax.swing.JTextField slopeCountBox
private javax.swing.JTextField aspectCountBox
private javax.swing.JTextField areaSampledCountBox
private javax.swing.JTextField substrateCountBox
private javax.swing.JTextField latitudeCountBox
private javax.swing.JTextField longitudeCountBox
private FHX2_FileOptionalPart optionalData
private boolean saveToData
public MetaDataPanel(FHX2_FileOptionalPart inOptPart)
private void updateGUIRestrictions(boolean enforce)
private void initComponents()
private void fillTextFields()
public void saveInfoToData()
public static void updateNumSamplesField()
public static java.lang.Double parseLatLonFromHalfLatLongString(java.lang.String str) throws java.lang.NumberFormatException
str
- java.lang.NumberFormatException
public static java.lang.Double getDecimalCoords(java.lang.String sign, java.lang.Double degrees, java.lang.Double minutes, java.lang.Double seconds) throws java.lang.NumberFormatException
sign
- degrees
- minutes
- seconds
- java.lang.NumberFormatException
public static java.lang.Double getDecimalCoords(java.lang.Double degrees, java.lang.Double minutes, java.lang.Double seconds) throws java.lang.NumberFormatException
degrees
- minutes
- seconds
- java.lang.NumberFormatException
public boolean CheckForNonCompatibleFieldLengths()
private void resetTextBoxColors()
private void enableTextFieldEnforcement()
private void disableTextFieldEnforcement()
private void setFieldLengthBoxesVisible(boolean b)