Package adams.flow.sink.sequenceplotter
Class SequencePlotterPanel
- 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<XYSequence,XYSequenceContainerManager,XYSequenceContainer>
-
- adams.gui.visualization.sequence.XYSequencePanel
-
- adams.flow.sink.sequenceplotter.SequencePlotterPanel
-
- All Implemented Interfaces:
CleanUpHandler
,StatusMessageHandler
,DatabaseConnectionHandler
,DatabaseConnectionProvider
,DatabaseConnectionUser
,DatabaseConnectionChangeListener
,PopupMenuCustomizer<MouseEvent>
,DataChangeListener
,PaintListener
,ScriptingEngineHandler
,SendToActionSupporter
,ContainerListManager<XYSequenceContainerManager>
,ContainerListPopupMenuSupplier<XYSequenceContainerManager,XYSequenceContainer>
,PaintletManager
,TipTextCustomizer
,PopupMenuCustomizer
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
AbstractClassifierBasedGeneticAlgorithmWizard.PerformancePlot
public class SequencePlotterPanel extends XYSequencePanel
The panel that plots all the sequences.- 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 AbstractErrorPaintlet
m_ErrorPaintlet
the error paintlet.protected XYSequenceContainerManager
m_MarkerContainerManager
the manager for the marker sequences.protected MarkerPaintlet
m_MarkerPaintlet
the paintlet to use for marker paintlets.protected MouseClickAction
m_MouseClickAction
the mouse click action.protected XYSequenceContainerManager
m_OverlayContainerManager
the manager for the overlays.protected XYSequencePaintlet
m_OverlayPaintlet
paintlet for drawing the overlays.protected List<Point2D.Double>
m_Selection
the selection points collected so far.protected boolean
m_SelectionEnabled
whether selection is enabled.-
Fields inherited from class adams.gui.visualization.sequence.XYSequencePanel
m_AdjustToVisibleData, m_AllowResize, m_CoordinatesPaintlet, m_ExportDialog, m_FileChooser, m_Undo, m_ViewDialogs, m_XYSequencePaintlet
-
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 adams.gui.visualization.core.PaintablePanel
m_Paintlets
-
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 SequencePlotterPanel(String title)
Initializes the panel with the specified title.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearSelection()
Removes any selected points.void
dataChanged(DataChangeEvent e)
Gets called if the data of the container panel has changed.ColorProvider
getColorProvider()
Returns the color provider to use.AbstractErrorPaintlet
getErrorPaintlet()
Returns the error paintlet to use.XYSequenceContainerManager
getMarkerContainerManager()
Returns the marker container manager in use.MarkerPaintlet
getMarkerPaintlet()
Returns the marker paintlet to use.MouseClickAction
getMouseClickAction()
Returns the current mouse click action in use.ColorProvider
getOverlayColorProvider()
Returns the color provider to use for the overlays.XYSequenceContainerManager
getOverlayContainerManager()
Returns the overlay container manager in use.XYSequencePaintlet
getOverlayPaintlet()
Returns the overlay paintlet to use.List<Point2D.Double>
getSelection()
Returns the currently selected points.protected void
initGUI()
Initializes the widgets.protected void
initialize()
Initializes the members.boolean
isSelectionEnabled()
Returns whether data points can be selected.protected SequencePlotContainerManager
newContainerManager()
Returns the container manager to use.protected XYSequenceContainerManager
newMarkerContainerManager()
Returns the manager for the marker sequences.protected XYSequenceContainerManager
newOverlayContainerManager()
Returns the manager for the overlay data.void
setAntiAliasingEnabled(boolean value)
Sets whether to use anti-aliasing.void
setColorProvider(ColorProvider value)
Sets the color provider to use.void
setErrorPaintlet(AbstractErrorPaintlet value)
Sets the error paintlet to use.void
setMarkerPaintlet(MarkerPaintlet value)
Sets the marker paintlet to use.void
setMouseClickAction(MouseClickAction value)
Sets the mouse click action to use.void
setOverlayColorProvider(ColorProvider value)
Sets the color provider to use for the overlays.void
setOverlayPaintlet(XYSequencePaintlet value)
Sets the overlay paintlet to use.void
setSelectionEnabled(boolean value)
Sets whether data points can be selected.protected int[]
toMarkerIndices(int[] seqIndices)
Translates the indices of the sequence container manager into the ones from the marker container manager.protected int[]
toOverlayIndices(int[] seqIndices)
Translates the indices of the sequence container manager into the ones from the overlay container manager.-
Methods inherited from class adams.gui.visualization.sequence.XYSequencePanel
addUndoPoint, canHandleFixedLabels, canPaint, canRedo, canUndo, cleanUp, createContainerList, getAdjustToVisibleData, getAllowResize, getContainerListPopupMenu, getContainerPaintlet, getDataPaintlet, getDefaultDatabaseConnection, getScriptingEngine, getSequenceManager, getState, getUndo, isAntiAliasingEnabled, isUndoSupported, prepareUpdate, processTipText, redo, resizePlot, saveSequence, saveVisible, saveVisibleDataPoints, saveVisibleSequences, setAdjustToVisibleData, setAllowResize, setDataPaintlet, setState, setUndo, showResizeDialog, storeColorInReport, storeValueInReport, supportsStoreColorInReport, supportsStoreValueInReport, undo, viewSequence
-
Methods inherited from class adams.gui.visualization.container.DataContainerPanelWithContainerList
customizePopupMenu, getActualSelectedContainerIndices, getContainerList, 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
databaseConnectionStateChanged, finishInit, getBackgroundColor, getContainerManager, getDatabaseConnection, getForegroundColor, getPlot, getProperties, getSendToClasses, getSendToItem, getStatusMessageHandler, getTitle, hasSendToItem, reset, setBackgroundColor, setContainerManager, setDatabaseConnection, setForegroundColor, setStatusMessageHandler, setTitle, showStatus
-
Methods inherited from class adams.gui.visualization.core.PaintablePanel
addPaintlet, check, paint, painted, paintlets, performUpdate, postUpdate, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.gui.event.PaintListener
painted
-
-
-
-
Field Detail
-
m_MarkerPaintlet
protected MarkerPaintlet m_MarkerPaintlet
the paintlet to use for marker paintlets.
-
m_MarkerContainerManager
protected XYSequenceContainerManager m_MarkerContainerManager
the manager for the marker sequences.
-
m_OverlayPaintlet
protected XYSequencePaintlet m_OverlayPaintlet
paintlet for drawing the overlays.
-
m_OverlayContainerManager
protected XYSequenceContainerManager m_OverlayContainerManager
the manager for the overlays.
-
m_ErrorPaintlet
protected AbstractErrorPaintlet m_ErrorPaintlet
the error paintlet.
-
m_MouseClickAction
protected MouseClickAction m_MouseClickAction
the mouse click action.
-
m_SelectionEnabled
protected boolean m_SelectionEnabled
whether selection is enabled.
-
m_Selection
protected List<Point2D.Double> m_Selection
the selection points collected so far.
-
-
Constructor Detail
-
SequencePlotterPanel
public SequencePlotterPanel(String title)
Initializes the panel with the specified title.- Parameters:
title
- the title to use
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classXYSequencePanel
-
initGUI
protected void initGUI()
Initializes the widgets.- Overrides:
initGUI
in classXYSequencePanel
-
newContainerManager
protected SequencePlotContainerManager newContainerManager()
Returns the container manager to use.- Overrides:
newContainerManager
in classXYSequencePanel
- Returns:
- the container manager
-
newMarkerContainerManager
protected XYSequenceContainerManager newMarkerContainerManager()
Returns the manager for the marker sequences.- Returns:
- the new container manager
-
getMarkerContainerManager
public XYSequenceContainerManager getMarkerContainerManager()
Returns the marker container manager in use.- Returns:
- the container manager
-
newOverlayContainerManager
protected XYSequenceContainerManager newOverlayContainerManager()
Returns the manager for the overlay data.- Returns:
- the new container manager
-
getOverlayContainerManager
public XYSequenceContainerManager getOverlayContainerManager()
Returns the overlay container manager in use.- Returns:
- the container manager
-
setMarkerPaintlet
public void setMarkerPaintlet(MarkerPaintlet value)
Sets the marker paintlet to use.- Parameters:
value
- the marker paintlet
-
getMarkerPaintlet
public MarkerPaintlet getMarkerPaintlet()
Returns the marker paintlet to use.- Returns:
- the marker paintlet
-
setOverlayPaintlet
public void setOverlayPaintlet(XYSequencePaintlet value)
Sets the overlay paintlet to use.- Parameters:
value
- the overlay paintlet
-
getOverlayPaintlet
public XYSequencePaintlet getOverlayPaintlet()
Returns the overlay paintlet to use.- Returns:
- the overlay paintlet
-
setErrorPaintlet
public void setErrorPaintlet(AbstractErrorPaintlet value)
Sets the error paintlet to use.- Parameters:
value
- the error paintlet
-
getErrorPaintlet
public AbstractErrorPaintlet getErrorPaintlet()
Returns the error paintlet to use.- Returns:
- the error paintlet
-
setMouseClickAction
public void setMouseClickAction(MouseClickAction value)
Sets the mouse click action to use.- Parameters:
value
- the action
-
getMouseClickAction
public MouseClickAction getMouseClickAction()
Returns the current mouse click action in use.- Returns:
- the action
-
setColorProvider
public void setColorProvider(ColorProvider value)
Sets the color provider to use.- Parameters:
value
- the color provider
-
getColorProvider
public ColorProvider getColorProvider()
Returns the color provider to use.- Returns:
- the color provider in use
-
setOverlayColorProvider
public void setOverlayColorProvider(ColorProvider value)
Sets the color provider to use for the overlays.- Parameters:
value
- the color provider
-
getOverlayColorProvider
public ColorProvider getOverlayColorProvider()
Returns the color provider to use for the overlays.- Returns:
- the color provider in use
-
setAntiAliasingEnabled
public void setAntiAliasingEnabled(boolean value)
Sets whether to use anti-aliasing.- Overrides:
setAntiAliasingEnabled
in classXYSequencePanel
- Parameters:
value
- if true then anti-aliasing is used
-
toMarkerIndices
protected int[] toMarkerIndices(int[] seqIndices)
Translates the indices of the sequence container manager into the ones from the marker container manager.- Parameters:
seqIndices
- the indices of the sequence container manager- Returns:
- the indices of the marker container manager
-
toOverlayIndices
protected int[] toOverlayIndices(int[] seqIndices)
Translates the indices of the sequence container manager into the ones from the overlay container manager.- Parameters:
seqIndices
- the indices of the sequence container manager- Returns:
- the indices of the overlay container manager
-
dataChanged
public void dataChanged(DataChangeEvent e)
Gets called if the data of the container panel has changed.- Specified by:
dataChanged
in interfaceDataChangeListener
- Overrides:
dataChanged
in classDataContainerPanel<XYSequence,XYSequenceContainerManager>
- Parameters:
e
- the event that the container panel sent
-
getSelection
public List<Point2D.Double> getSelection()
Returns the currently selected points.- Returns:
- the points
-
clearSelection
public void clearSelection()
Removes any selected points.
-
setSelectionEnabled
public void setSelectionEnabled(boolean value)
Sets whether data points can be selected.- Parameters:
value
- true if can be selected
-
isSelectionEnabled
public boolean isSelectionEnabled()
Returns whether data points can be selected.- Returns:
- true if can be selected
-
-