org.knime.base.node.viz.plotter.scattermatrix
Class ScatterMatrixDrawingPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.knime.base.node.viz.plotter.AbstractDrawingPane
org.knime.base.node.viz.plotter.basic.BasicDrawingPane
org.knime.base.node.viz.plotter.scatter.ScatterPlotterDrawingPane
org.knime.base.node.viz.plotter.scattermatrix.ScatterMatrixDrawingPane
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible
public class ScatterMatrixDrawingPane
- extends ScatterPlotterDrawingPane
Holds a matrix of
ScatterMatrixElement
s.
This class only paints the surrounding rectangles of the matrix elements,
the painting of the actual dots is done by the
ScatterPlotterDrawingPane
.
In addition to the scatter matrix elements the coordinates of the scatter
matrix elements are plotted at the borders of the drawing pane.
The setBackground(Color)
is overriden, since it sets the color of
the scatter matrix elements and not of the whole component.
The
ScatterMatrixElement
s
know there associated dots. By setting them with the
setScatterMatrixElements(ScatterMatrixElement[][])
, the
DotInfo
s are put into a
DotInfoArray
, which can then
be painted with the inherited functionality of the
ScatterPlotterDrawingPane
.
- Author:
- Fabian Dill, University of Konstanz
- See Also:
- Serialized Form
Methods inherited from class org.knime.base.node.viz.plotter.scatter.ScatterPlotterDrawingPane |
clearSelection, getDotInfoArray, getDotSize, getSelectedDots, getToolTipText, paintDot, selectClickedElement, selectElementsIn, setDotInfoArray, setDotSize, setFadeUnhilited, setSelectedDots |
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, 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 |
ScatterMatrixDrawingPane
public ScatterMatrixDrawingPane()
- Sets the background color to white.
setHorizontalMargin
public void setHorizontalMargin(int hMargin)
- Parameters:
hMargin
- sets the horizontal margin.
setVerticalMargin
public void setVerticalMargin(int vMargin)
- Parameters:
vMargin
- the vertical margin
setScatterMatrixElements
public void setScatterMatrixElements(ScatterMatrixElement[][] elements)
- Parameters:
elements
- the rectangles with the coordinates.
getMatrixElements
public ScatterMatrixElement[][] getMatrixElements()
- Returns:
- the scatter matrix elements.
setBackground
public void setBackground(Color bg)
-
- Overrides:
setBackground
in class JComponent
paintContent
public void paintContent(Graphics g)
- Paints the rectangles of the scatter matrix elements and the vertical and
horizontal coordinates at the border of the drawing pane. The painting
of the dots is inherited from the
ScatterPlotterDrawingPane
.
Paints all added
BasicDrawingElement
s by
calling their
#paint(Graphics2D)
method.
If the BasicDrawingPane is extended this method have to be called with
super.paintContent()
in order to maintain the
functionality of painting
BasicDrawingElement
s.
- Overrides:
paintContent
in class ScatterPlotterDrawingPane
- Parameters:
g
- the graphics object- See Also:
AbstractDrawingPane.paintContent(
java.awt.Graphics)
paintVerticalCoordinate
protected void paintVerticalCoordinate(Graphics g,
ScatterMatrixElement element,
int x,
boolean left)
- Paints the vertical coordinates at the border of the drawing pane.
- Parameters:
g
- graphicselement
- element to provide position and coordinatex
- the x positionleft
- true if the coordinate is painted on the left side.
paintHorizontalCoordinate
protected void paintHorizontalCoordinate(Graphics g,
ScatterMatrixElement element,
int y,
boolean top)
- Paints the horizontal coordinates of the matrix elements at the border
of the drawing pane.
- Parameters:
g
- graphicselement
- the element to provide position and coordinatey
- y positiontop
- true if the coordinate is painted at the top.
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.