org.knime.base.node.viz.plotter.columns
Class TwoColumnPlotter
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.knime.base.node.viz.plotter.AbstractPlotter
org.knime.base.node.viz.plotter.basic.BasicPlotter
org.knime.base.node.viz.plotter.columns.TwoColumnPlotter
- All Implemented Interfaces:
- ComponentListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, HiLiteListener
- Direct Known Subclasses:
- ScatterPlotter
public abstract class TwoColumnPlotter
- extends BasicPlotter
Wraps the functionality where the data of two columns have to be displayed.
It registeres the appropriate listeners to the column selection and calls the
corresponding methods dependend on whether the model has changed
(updatePaintModel()
) or the ranges have changed
(BasicPlotter.updateSize()
). If only columns which are compatible to certain
DataValue
s should be selectable, an instance of
the TwoColumnProperties
has
to be created, where the restricting DataValue
s
can be passed to the constructor.
- Author:
- Fabian Dill, University of Konstanz
- See Also:
- Serialized Form
Methods inherited from class org.knime.base.node.viz.plotter.AbstractPlotter |
addMouseListener, clearSelection, componentHidden, componentMoved, componentResized, componentShown, createNominalXCoordinate, createNominalYCoordinate, createXCoordinate, createXCoordinate, createYCoordinate, delegateAddHiLiteListener, delegateGetHiLitKeys, delegateHiLite, delegateHiLite, delegateIsHiLit, delegateIsHiLit, delegateRemoveAllHiLiteListeners, delegateRemoveHiLiteListener, delegateUnHiLite, delegateUnHiLite, delegateUnHiLiteAll, dispose, fillPopupMenu, fitToScreen, getClearHiliteAction, getCurrentMouseListener, getDataArrayIdx, getDataProvider, getDrawingPane, getDrawingPaneDimension, getHiliteAction, getHiLiteMenu, getMappedXValue, getMappedYValue, getProperties, getScreenYCoordinate, getUnhiliteAction, getXAxis, getYAxis, hiLite, hiLiteSelected, removeMouseListener, selectClickedElement, selectElementsIn, setAntialiasing, setDataArrayIdx, setHeight, setHiLiteHandler, setPreserve, setXAxis, setYAxis, unHiLite, unHiLiteSelected, updateAxisLength, zoomByClick, zoomByWindow |
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 |
TwoColumnPlotter
public TwoColumnPlotter(AbstractDrawingPane panel,
AbstractPlotterProperties properties)
- Constructor for extending classes.
- Parameters:
panel
- the drawing paneproperties
- the properties
TwoColumnPlotter
public TwoColumnPlotter()
- Default two column plotter with
BasicDrawingPane
and
TwoColumnProperties
.
getSelectedXColumn
public DataColumnSpec getSelectedXColumn()
- Returns:
- the currently selecteed x column.
getSelectedXColumnIndex
public int getSelectedXColumnIndex()
- Returns the selected column index or 0 by default, that is if no
DataTableSpec
is set and no column was
selected before. If the stored DataTableSpec
doesn't find the selected column name (which should never happen),
then -1 is returned.
- Returns:
- selected x column index or -1
getSelectedYColumnIndex
public int getSelectedYColumnIndex()
- Returns the selected column index or 0 by default, that is if no
DataTableSpec
is set and no column was
selected before. If the stored DataTableSpec
doesn't find the selected column name (which should never happen),
then -1 is returned.
- Returns:
- selected y column index or -1
getSelectedYColumn
public DataColumnSpec getSelectedYColumn()
- Returns:
- the currently selected y column
setSelectableColumns
public void setSelectableColumns(DataTableSpec spec)
- Updates the select boxes for the x and y columns.
- Parameters:
spec
- the current data table spec.
setDataProvider
public void setDataProvider(DataProvider provider)
- Updates the column selection with the
DataTableSpec
of the
DataArray
with index 0.
- Overrides:
setDataProvider
in class AbstractPlotter
- Parameters:
provider
- the data provider.- See Also:
AbstractPlotter.setDataProvider(
DataProvider)
updatePaintModel
public abstract void updatePaintModel()
- This method is called whenever the column selection has changed and
the view model has to be adapted to the currently selected columns.
There might occur a problem with the selected indices if the
underlying data spec was changed and both, the x and the y, indices
are changed, then this method is called for the changed x index although
the y index is still obsolete. Thus, one have to check that the
getSelectedXColumnIndex()
and the
getSelectedYColumnIndex()
are both > -1.
- Specified by:
updatePaintModel
in class AbstractPlotter
Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display,
or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the
copyright owner or as specified in the license file distributed with this product.