Package adams.gui.tools
Class UpdateSampleDataPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.tools.UpdateSampleDataPanel
-
- All Implemented Interfaces:
IDConsumer,ImageObserver,MenuContainer,Serializable,Accessible
public class UpdateSampleDataPanel extends adams.gui.core.BasePanel implements IDConsumer
Allows the user to update/set values in selected spectra.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.gui.core.BaseButtonm_ButtonApplythe button for updating the sample data.protected adams.gui.core.BaseButtonm_ButtonClosethe button for closing the dialog.protected adams.gui.core.BaseButtonm_ButtonRemoveReferenceValuethe button for removing sample data reference values.protected adams.gui.core.BaseButtonm_ButtonSelectAllthe button for selecting all.protected adams.gui.core.BaseButtonm_ButtonSelectInvertthe button for inverting the selection.protected adams.gui.core.BaseButtonm_ButtonSelectNonethe button for selecting none.protected adams.gui.core.BaseComboBox<String>m_ComboBoxIDPanelsthe comboboxes for the ID panels.protected adams.gui.core.BaseComboBox<adams.data.report.DataType>m_ComboBoxTypethe combobox for the field data type.protected AbstractIDProviderPanelm_CurrentIDProviderthe current panel.protected Map<String,AbstractIDProviderPanel>m_IDPanelsthe ID panels.protected TableModelm_Modelthe table model in use.protected JPanelm_PanelIDProviderthe panel for the ID provider panels.protected JPanelm_PanelSampleDataButtonsthe panel for the buttons for the sampledata table.protected static adams.core.Propertiesm_Propertiesthe properties.protected adams.gui.core.SearchPanelm_SearchIDsthe search panel for the IDs.protected adams.gui.core.SearchPanelm_SearchSampleDatathe search panel for the sample data.protected adams.gui.core.BaseSplitPanem_SplitPanethe split pane.protected adams.gui.core.BaseStatusBarm_StatusBarthe status bar.protected adams.gui.core.SortableAndSearchableTableWithButtonsm_TableIDsthe table with the spectra.protected SampleDataFactory.Tablem_TableSampleDatathe sample data table.protected adams.gui.core.BaseTextFieldm_TextNamethe text field for the field name.protected adams.gui.core.BaseTextFieldm_TextValuethe text field for the field value.static StringSESSION_FILENAMEthe name of the session file.-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description UpdateSampleDataPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapply()Updates the selected spectra.protected voidfinishInit()Finishes up the initialization.protected adams.data.report.FieldgetField()Returns the current values as field.adams.core.PropertiesgetProperties()Returns the session properties.protected voidinitGUI()Initializes the members.protected voidinitialize()Initializes the members.protected voidremoveReferenceValues()Removes any selected reference values from the database.voidsetIDs(String[] ids)Updates the model with the specified IDs.protected voidshowReport()Loads the associated report and displays it.protected voidupdateButtons()Updates the state of the buttons.protected voidupdateIDPanel()Updates the panel to be displayed for determining the IDs.booleanupdateProperties()Updates and stores the properties on disk.-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, main, printErrorMessage, printException, saveComponent, setEnabledCascade, setEnabledCascade, setParentTitle, setVisible
-
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, 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, 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
SESSION_FILENAME
public static final String SESSION_FILENAME
the name of the session file.- See Also:
- Constant Field Values
-
m_Properties
protected static adams.core.Properties m_Properties
the properties.
-
m_PanelIDProvider
protected JPanel m_PanelIDProvider
the panel for the ID provider panels.
-
m_ComboBoxIDPanels
protected adams.gui.core.BaseComboBox<String> m_ComboBoxIDPanels
the comboboxes for the ID panels.
-
m_IDPanels
protected Map<String,AbstractIDProviderPanel> m_IDPanels
the ID panels.
-
m_SplitPane
protected adams.gui.core.BaseSplitPane m_SplitPane
the split pane.
-
m_Model
protected TableModel m_Model
the table model in use.
-
m_TableIDs
protected adams.gui.core.SortableAndSearchableTableWithButtons m_TableIDs
the table with the spectra.
-
m_ButtonSelectAll
protected adams.gui.core.BaseButton m_ButtonSelectAll
the button for selecting all.
-
m_ButtonSelectNone
protected adams.gui.core.BaseButton m_ButtonSelectNone
the button for selecting none.
-
m_ButtonSelectInvert
protected adams.gui.core.BaseButton m_ButtonSelectInvert
the button for inverting the selection.
-
m_SearchIDs
protected adams.gui.core.SearchPanel m_SearchIDs
the search panel for the IDs.
-
m_TableSampleData
protected SampleDataFactory.Table m_TableSampleData
the sample data table.
-
m_PanelSampleDataButtons
protected JPanel m_PanelSampleDataButtons
the panel for the buttons for the sampledata table.
-
m_ButtonRemoveReferenceValue
protected adams.gui.core.BaseButton m_ButtonRemoveReferenceValue
the button for removing sample data reference values.
-
m_SearchSampleData
protected adams.gui.core.SearchPanel m_SearchSampleData
the search panel for the sample data.
-
m_TextName
protected adams.gui.core.BaseTextField m_TextName
the text field for the field name.
-
m_ComboBoxType
protected adams.gui.core.BaseComboBox<adams.data.report.DataType> m_ComboBoxType
the combobox for the field data type.
-
m_TextValue
protected adams.gui.core.BaseTextField m_TextValue
the text field for the field value.
-
m_ButtonApply
protected adams.gui.core.BaseButton m_ButtonApply
the button for updating the sample data.
-
m_ButtonClose
protected adams.gui.core.BaseButton m_ButtonClose
the button for closing the dialog.
-
m_StatusBar
protected adams.gui.core.BaseStatusBar m_StatusBar
the status bar.
-
m_CurrentIDProvider
protected AbstractIDProviderPanel m_CurrentIDProvider
the current panel.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classadams.gui.core.BasePanel
-
initGUI
protected void initGUI()
Initializes the members.- Overrides:
initGUIin classadams.gui.core.BasePanel
-
finishInit
protected void finishInit()
Finishes up the initialization.- Overrides:
finishInitin classadams.gui.core.BasePanel
-
setIDs
public void setIDs(String[] ids)
Updates the model with the specified IDs.- Specified by:
setIDsin interfaceIDConsumer
-
getField
protected adams.data.report.Field getField()
Returns the current values as field.- Returns:
- the field
-
apply
protected void apply()
Updates the selected spectra.
-
showReport
protected void showReport()
Loads the associated report and displays it.
-
removeReferenceValues
protected void removeReferenceValues()
Removes any selected reference values from the database.
-
updateButtons
protected void updateButtons()
Updates the state of the buttons.
-
updateIDPanel
protected void updateIDPanel()
Updates the panel to be displayed for determining the IDs.
-
updateProperties
public boolean updateProperties()
Updates and stores the properties on disk.- Specified by:
updatePropertiesin interfaceIDConsumer- Returns:
- if successfully saved
-
getProperties
public adams.core.Properties getProperties()
Returns the session properties.- Specified by:
getPropertiesin interfaceIDConsumer- Returns:
- the properties
-
-