Package adams.gui.visualization.spectrum
Class SpectrumPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.visualization.core.PaintablePanel
-
- adams.gui.visualization.container.DataContainerPanel<T,M>
-
- adams.gui.visualization.container.DataContainerPanelWithSidePanel<T,M>
-
- adams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
-
- adams.gui.visualization.spectrum.SpectrumPanel
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.StatusMessageHandler
,adams.db.DatabaseConnectionHandler
,adams.db.DatabaseConnectionProvider
,adams.db.DatabaseConnectionUser
,adams.event.DatabaseConnectionChangeListener
,adams.gui.core.AntiAliasingSupporter
,adams.gui.core.HelpSupporter
,adams.gui.core.PopupMenuCustomizer<MouseEvent>
,adams.gui.event.DataChangeListener
,adams.gui.event.PaintListener
,adams.gui.scripting.ScriptingEngineHandler
,adams.gui.sendto.SendToActionSupporter
,adams.gui.visualization.container.ContainerListManager<SpectrumContainerManager>
,adams.gui.visualization.container.ContainerListPopupMenuSupplier<SpectrumContainerManager,SpectrumContainer>
,adams.gui.visualization.core.PaintletManager
,adams.gui.visualization.core.plot.HitDetectorSupporter<SpectrumPointHitDetector>
,adams.gui.visualization.core.plot.TipTextCustomizer
,adams.gui.visualization.core.PopupMenuCustomizer
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
public class SpectrumPanel extends adams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer> implements adams.gui.event.PaintListener, adams.gui.visualization.core.plot.TipTextCustomizer, adams.gui.core.AntiAliasingSupporter, adams.gui.visualization.core.plot.HitDetectorSupporter<SpectrumPointHitDetector>
Special panel for displaying the spectral data.- 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 boolean
m_AdjustToVisibleData
whether to adjust to visible data or not.protected adams.gui.visualization.core.CoordinatesPaintlet
m_CoordinatesPaintlet
paintlet for drawing the X-axis.protected adams.gui.visualization.core.CrossHairTracker
m_CrossHairTracker
the cross-hair paintlet.protected SpectrumDatasetExportDialog
m_ExportDatasetDialog
for exporting visible spectra to a dataset.protected SpectrumExportDialog
m_ExportDialog
for exporting visible spectra.protected HistogramFactory.SetupDialog
m_HistogramSetup
the dialog for the histogram setup.protected SpectrumZoomOverviewPanel
m_PanelZoomOverview
the zoom overview panel.protected SelectedWaveNumberPaintlet
m_SelectedWaveNumberPaintlet
paintlet for drawing the selected wave number.protected AbstractSpectrumPaintlet
m_SpectrumPaintlet
paintlet for drawing the spectrum.protected SpectrumPointHitDetector
m_SpectrumPointHitDetector
for detecting hits.protected int
m_ToolTipMaxColumns
the maximum number of columns for the tooltip.protected int
m_ToolTipMaxRows
the maximum number of rows for the tooltip.-
Fields inherited from class adams.gui.visualization.container.DataContainerPanelWithContainerList
m_ContainerList, m_ContainerListCustomizers, m_PlotCustomizers
-
Fields inherited from class adams.gui.visualization.container.DataContainerPanelWithSidePanel
m_FirstRevalidate, m_SidePanel, m_SplitPane
-
Fields inherited from class adams.gui.visualization.container.DataContainerPanel
m_DatabaseConnection, m_DataChangeListeners, m_Manager, m_PanelProperties, m_PlotPanel, m_PlotWrapperPanel, m_StatusMessageHandler, m_Title
-
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 SpectrumPanel()
Initializes the panel without title.SpectrumPanel(String title)
Initializes the panel with the given title.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canPaint(Graphics g)
Returns true if the paintlets can be executed.void
cleanUp()
Cleans up data structures, frees up memory.protected SpectrumContainerList
createContainerList()
Returns the container list.void
databaseConnectionStateChanged(adams.event.DatabaseConnectionChangeEvent e)
A change in the database connection occurred.void
exportVisibleSpectra()
Exports the visible spectra to an ARFF file.protected void
finishInit()
Finishes up the initialization.boolean
getAdjustToVisibleData()
Returns whether the display is adjusted to only the visible spectrums or all of them.AbstractSpectrumPaintlet
getContainerPaintlet()
Returns the paintlet used for painting the containers.adams.gui.visualization.core.CrossHairTracker
getCrossHairTracker()
Returns the cross-hair tracker.adams.gui.visualization.core.Paintlet
getDataPaintlet()
Returns the paintlet used for painting the data.protected adams.db.AbstractDatabaseConnection
getDefaultDatabaseConnection()
Returns the default database connection.SpectrumPointHitDetector
getHitDetector()
Returns the hit detector.adams.gui.scripting.AbstractScriptingEngine
getScriptingEngine()
Returns the current scripting engine, can be null.int[]
getSelectedIndices()
Returns the indices of the selected spectra.Spectrum[]
getSelectedSpectra()
Returns the selected spectra.SelectedWaveNumberPaintlet
getSelectedWaveNumberPaintlet()
Returns the paintlet for painting the selected wave number.SpectrumZoomOverviewPanel
getZoomOverviewPanel()
Returns the zoom overview panel.protected boolean
hasSidePanel()
Returns whether the panel has a side panel.protected void
initGUI()
Initializes the GUI.protected void
initialize()
For initializing members.boolean
isAntiAliasingEnabled()
Returns whether anti-aliasing is used.boolean
isZoomOverviewPanelVisible()
Returns whether the zoom overview panel is visible or not.protected SpectrumContainerManager
newContainerManager()
Returns the container manager to use.protected void
postUpdate()
Hook method, called after the update was performed.void
prepareUpdate()
Updates the axes with the min/max of the new data.String
processTipText(adams.gui.visualization.core.PlotPanel panel, Point mouse, String tiptext)
Processes the given tip text.void
saveVisibleSpectra()
Saves the visible spectra to a directory.void
selectWaveNumber()
Selects the spectrum point based on the wave number.void
setAdjustToVisibleData(boolean value)
Sets whether the display is adjusted to only the visible data or everything currently loaded.void
setAntiAliasingEnabled(boolean value)
Sets whether to use anti-aliasing.void
setDataPaintlet(adams.gui.visualization.core.Paintlet value)
Sets the paintlet to use for painting the data.void
setZoomOverviewPanelVisible(boolean value)
Sets the zoom overview panel visible or hides it.void
showHistogram(List<SpectrumContainer> data)
Displays the histograms for the given spectrums.void
showSampleData(List<SpectrumContainer> data)
Displays a dialog with the given sample data.void
showSpectralData(SpectrumContainer cont)
Displays a dialog with the given spectral data.void
showStatistics(List<adams.data.statistics.InformativeStatistic> stats)
Displays a dialog with the given statistics.void
storeColorInReport(int[] indices, String name)
Stores the color of the container in the report of container's data object.void
storeValueInReport(int[] indices, adams.data.report.AbstractField field, Object value)
Stores the value in the report of container's data object.boolean
supportsStoreColorInReport()
Returns true if storing the color in the report of container's data object is supported.boolean
supportsStoreValueInReport()
Returns true if storing a value in the report of container's data object is supported.-
Methods inherited from class adams.gui.visualization.container.DataContainerPanelWithContainerList
customizePopupMenu, getActualSelectedContainerIndices, getContainerList, getContainerListPopupMenu, getSelectedContainerIndices, getTableModelContainers, getTableModelIndices, processAction, showNotes
-
Methods inherited from class adams.gui.visualization.container.DataContainerPanelWithSidePanel
getDividerLocation, getSidePanel, isSidePanelVisible, revalidate, setDividerLocation, setDividerLocation, setSidePanelVisible
-
Methods inherited from class adams.gui.visualization.container.DataContainerPanel
clearHelp, dataChanged, getBackgroundColor, getContainerManager, getDatabaseConnection, getForegroundColor, getHelp, getPlot, getProperties, getSendToClasses, getSendToItem, getStatusMessageHandler, getTitle, hasHelp, hasSendToItem, isHelpHtml, reset, setBackgroundColor, setContainerManager, setDatabaseConnection, setForegroundColor, setHelp, setStatusMessageHandler, setTitle, showHelp, showStatus
-
Methods inherited from class adams.gui.visualization.core.PaintablePanel
addPaintlet, canHandleFixedLabels, check, paint, painted, paintlets, performUpdate, printAll, removePaintlet, update
-
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, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, 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
-
m_AdjustToVisibleData
protected boolean m_AdjustToVisibleData
whether to adjust to visible data or not.
-
m_CoordinatesPaintlet
protected adams.gui.visualization.core.CoordinatesPaintlet m_CoordinatesPaintlet
paintlet for drawing the X-axis.
-
m_CrossHairTracker
protected adams.gui.visualization.core.CrossHairTracker m_CrossHairTracker
the cross-hair paintlet.
-
m_SpectrumPaintlet
protected AbstractSpectrumPaintlet m_SpectrumPaintlet
paintlet for drawing the spectrum.
-
m_SelectedWaveNumberPaintlet
protected SelectedWaveNumberPaintlet m_SelectedWaveNumberPaintlet
paintlet for drawing the selected wave number.
-
m_SpectrumPointHitDetector
protected SpectrumPointHitDetector m_SpectrumPointHitDetector
for detecting hits.
-
m_HistogramSetup
protected HistogramFactory.SetupDialog m_HistogramSetup
the dialog for the histogram setup.
-
m_ToolTipMaxColumns
protected int m_ToolTipMaxColumns
the maximum number of columns for the tooltip.
-
m_ToolTipMaxRows
protected int m_ToolTipMaxRows
the maximum number of rows for the tooltip.
-
m_PanelZoomOverview
protected SpectrumZoomOverviewPanel m_PanelZoomOverview
the zoom overview panel.
-
m_ExportDialog
protected SpectrumExportDialog m_ExportDialog
for exporting visible spectra.
-
m_ExportDatasetDialog
protected SpectrumDatasetExportDialog m_ExportDatasetDialog
for exporting visible spectra to a dataset.
-
-
Constructor Detail
-
SpectrumPanel
public SpectrumPanel()
Initializes the panel without title.
-
SpectrumPanel
public SpectrumPanel(String title)
Initializes the panel with the given title.- Parameters:
title
- the title for the panel
-
-
Method Detail
-
initialize
protected void initialize()
For initializing members.- Overrides:
initialize
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
-
getDefaultDatabaseConnection
protected adams.db.AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.- Specified by:
getDefaultDatabaseConnection
in classadams.gui.visualization.container.DataContainerPanel<Spectrum,SpectrumContainerManager>
- Returns:
- the default database connection
-
newContainerManager
protected SpectrumContainerManager newContainerManager()
Returns the container manager to use.- Specified by:
newContainerManager
in classadams.gui.visualization.container.DataContainerPanel<Spectrum,SpectrumContainerManager>
- Returns:
- the container manager
-
getContainerPaintlet
public AbstractSpectrumPaintlet getContainerPaintlet()
Returns the paintlet used for painting the containers.- Specified by:
getContainerPaintlet
in classadams.gui.visualization.container.DataContainerPanel<Spectrum,SpectrumContainerManager>
- Returns:
- the paintlet
-
getHitDetector
public SpectrumPointHitDetector getHitDetector()
Returns the hit detector.- Specified by:
getHitDetector
in interfaceadams.gui.visualization.core.plot.HitDetectorSupporter<SpectrumPointHitDetector>
- Returns:
- the hit detector
-
hasSidePanel
protected boolean hasSidePanel()
Returns whether the panel has a side panel. If that is the case, a JSplitPanel is used.- Returns:
- true if a side panel is to be added
-
initGUI
protected void initGUI()
Initializes the GUI.- Overrides:
initGUI
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
-
finishInit
protected void finishInit()
Finishes up the initialization.- Overrides:
finishInit
in classadams.gui.visualization.container.DataContainerPanel<Spectrum,SpectrumContainerManager>
-
createContainerList
protected SpectrumContainerList createContainerList()
Returns the container list.- Specified by:
createContainerList
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Returns:
- the list
-
getSelectedWaveNumberPaintlet
public SelectedWaveNumberPaintlet getSelectedWaveNumberPaintlet()
Returns the paintlet for painting the selected wave number.- Returns:
- the paintlet
-
getCrossHairTracker
public adams.gui.visualization.core.CrossHairTracker getCrossHairTracker()
Returns the cross-hair tracker.- Returns:
- the tracker
-
setAdjustToVisibleData
public void setAdjustToVisibleData(boolean value)
Sets whether the display is adjusted to only the visible data or everything currently loaded.- Parameters:
value
- if true then plot is adjusted to visible data
-
getAdjustToVisibleData
public boolean getAdjustToVisibleData()
Returns whether the display is adjusted to only the visible spectrums or all of them.- Returns:
- true if the plot is adjusted to only the visible data
-
setZoomOverviewPanelVisible
public void setZoomOverviewPanelVisible(boolean value)
Sets the zoom overview panel visible or hides it.- Parameters:
value
- if true then the panel is displayed
-
isZoomOverviewPanelVisible
public boolean isZoomOverviewPanelVisible()
Returns whether the zoom overview panel is visible or not.- Returns:
- true if visible
-
getZoomOverviewPanel
public SpectrumZoomOverviewPanel getZoomOverviewPanel()
Returns the zoom overview panel.- Returns:
- the panel
-
canPaint
protected boolean canPaint(Graphics g)
Returns true if the paintlets can be executed.- Specified by:
canPaint
in classadams.gui.visualization.core.PaintablePanel
- Parameters:
g
- the graphics context- Returns:
- true if painting can go ahead
-
prepareUpdate
public void prepareUpdate()
Updates the axes with the min/max of the new data.- Specified by:
prepareUpdate
in classadams.gui.visualization.core.PaintablePanel
-
getDataPaintlet
public adams.gui.visualization.core.Paintlet getDataPaintlet()
Returns the paintlet used for painting the data.- Specified by:
getDataPaintlet
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Returns:
- the paintlet
-
setDataPaintlet
public void setDataPaintlet(adams.gui.visualization.core.Paintlet value)
Sets the paintlet to use for painting the data.- Specified by:
setDataPaintlet
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Parameters:
value
- the paintlet
-
saveVisibleSpectra
public void saveVisibleSpectra()
Saves the visible spectra to a directory.
-
exportVisibleSpectra
public void exportVisibleSpectra()
Exports the visible spectra to an ARFF file.
-
processTipText
public String processTipText(adams.gui.visualization.core.PlotPanel panel, Point mouse, String tiptext)
Processes the given tip text. Among the current mouse position, the panel that initiated the call are also provided.- Specified by:
processTipText
in interfaceadams.gui.visualization.core.plot.TipTextCustomizer
- Parameters:
panel
- the content panel that initiated this callmouse
- the mouse positiontiptext
- the tiptext so far- Returns:
- the processed tiptext
-
supportsStoreColorInReport
public boolean supportsStoreColorInReport()
Returns true if storing the color in the report of container's data object is supported.- Specified by:
supportsStoreColorInReport
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Returns:
- true if supported
-
storeColorInReport
public void storeColorInReport(int[] indices, String name)
Stores the color of the container in the report of container's data object.- Specified by:
storeColorInReport
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Parameters:
indices
- the indices of the containers of the container managername
- the field name to use
-
supportsStoreValueInReport
public boolean supportsStoreValueInReport()
Returns true if storing a value in the report of container's data object is supported.- Specified by:
supportsStoreValueInReport
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Returns:
- true if supported
-
storeValueInReport
public void storeValueInReport(int[] indices, adams.data.report.AbstractField field, Object value)
Stores the value in the report of container's data object.- Specified by:
storeValueInReport
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
- Parameters:
indices
- the indices of the containers of the container managerfield
- the field to usevalue
- the value to store
-
showStatistics
public void showStatistics(List<adams.data.statistics.InformativeStatistic> stats)
Displays a dialog with the given statistics.- Parameters:
stats
- the statistics to display
-
showHistogram
public void showHistogram(List<SpectrumContainer> data)
Displays the histograms for the given spectrums.- Parameters:
data
- the spectrums to display
-
showSpectralData
public void showSpectralData(SpectrumContainer cont)
Displays a dialog with the given spectral data.- Parameters:
cont
- the container to display the raw data for
-
showSampleData
public void showSampleData(List<SpectrumContainer> data)
Displays a dialog with the given sample data.- Parameters:
data
- the spectrums to display the sample data for
-
selectWaveNumber
public void selectWaveNumber()
Selects the spectrum point based on the wave number.
-
getSelectedIndices
public int[] getSelectedIndices()
Returns the indices of the selected spectra.- Returns:
- the indices
-
getSelectedSpectra
public Spectrum[] getSelectedSpectra()
Returns the selected spectra.- Returns:
- the spectra
-
setAntiAliasingEnabled
public void setAntiAliasingEnabled(boolean value)
Sets whether to use anti-aliasing.- Specified by:
setAntiAliasingEnabled
in interfaceadams.gui.core.AntiAliasingSupporter
- Parameters:
value
- if true then anti-aliasing is used
-
isAntiAliasingEnabled
public boolean isAntiAliasingEnabled()
Returns whether anti-aliasing is used.- Specified by:
isAntiAliasingEnabled
in interfaceadams.gui.core.AntiAliasingSupporter
- Returns:
- true if anti-aliasing is used
-
databaseConnectionStateChanged
public void databaseConnectionStateChanged(adams.event.DatabaseConnectionChangeEvent e)
A change in the database connection occurred.- Specified by:
databaseConnectionStateChanged
in interfaceadams.event.DatabaseConnectionChangeListener
- Overrides:
databaseConnectionStateChanged
in classadams.gui.visualization.container.DataContainerPanel<Spectrum,SpectrumContainerManager>
- Parameters:
e
- the event
-
getScriptingEngine
public adams.gui.scripting.AbstractScriptingEngine getScriptingEngine()
Returns the current scripting engine, can be null.- Specified by:
getScriptingEngine
in interfaceadams.gui.scripting.ScriptingEngineHandler
- Specified by:
getScriptingEngine
in classadams.gui.visualization.container.DataContainerPanel<Spectrum,SpectrumContainerManager>
- Returns:
- the current engine
-
postUpdate
protected void postUpdate()
Hook method, called after the update was performed.- Overrides:
postUpdate
in classadams.gui.visualization.core.PaintablePanel
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceadams.core.CleanUpHandler
- Overrides:
cleanUp
in classadams.gui.visualization.container.DataContainerPanelWithContainerList<Spectrum,SpectrumContainerManager,SpectrumContainer>
-
-