|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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.parcoord.ParallelCoordinateDrawingPane
public class ParallelCoordinateDrawingPane
Since the
ParallelCoordinatesPlotter
only calculates the mapped datapoints, the connection of them by lines or
curves is done here, also the missing values handling. Thus, also the
interpretation of the line thickness, dot size, fading of unhilited lines is
done here.
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 | |
---|---|
static int |
BOTTOM_SPACE
Constant for the space at the bottom between margin and axes. |
static int |
DOT_SIZE
Constant for the dot size. |
static int |
TOP_SPACE
Constant for the space at the top before the axes begin. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, 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 |
---|
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 | |
---|---|
ParallelCoordinateDrawingPane()
|
Method Summary | |
---|---|
protected boolean |
checkLabelSpace(Set<String> labels,
FontMetrics metrics,
int distance)
Checks for all labels if the string length is smaller than the distance between two parallel axes. |
protected void |
drawAxes(Graphics g)
Draws the parallel axes and, if missing values are displayed explicitly, the horizontal line at the bottom. |
protected void |
drawLabels(Graphics g)
|
protected void |
drawLines(Graphics g,
List<LineInfo> lines)
Draws the lines / rows. |
protected void |
drawNominalAxis(Graphics g,
NominalParallelAxis axis)
Draws a nominal axis with the labels of all possible values. |
protected void |
drawNumericAxis(Graphics g,
NumericParallelAxis axis)
Draws a numeric axis with the min value at the bottom and the max value at the top. |
List<ParallelAxis> |
getAxes()
|
List<LineInfo> |
getLines()
|
String |
getToolTipText(MouseEvent e)
|
void |
paintContent(Graphics g)
Paints all added BasicDrawingElement s by
calling their
#paint(Graphics2D) method. |
protected void |
paintDot(Graphics g,
Point p,
LineInfo line,
int size)
Paints one dot with its shape. |
void |
setAxes(List<ParallelAxis> axes)
Sets the axes with the data column spec, since it contains all necessary information (like domain, type, etc). |
void |
setDrawCurves(boolean drawCurves)
|
void |
setFadeUnhilited(boolean fade)
|
void |
setHideUnhilited(boolean hide)
|
void |
setLines(List<LineInfo> lines)
|
void |
setLineThickness(int lineThickness)
|
void |
setShowDots(boolean showDots)
|
void |
setShowMissingValues(boolean showMissingVals)
|
void |
setSkipValues(boolean skip)
|
Methods inherited from class org.knime.base.node.viz.plotter.basic.BasicDrawingPane |
---|
addDrawingElement, clearPlot, getDrawingElements |
Methods inherited from class org.knime.base.node.viz.plotter.AbstractDrawingPane |
---|
getDragStart, getSelectionRectangle, isMouseDown, paintComponent, paintSelectionRectangle, setAntialiasing, setDragEnd, setDragStart, setMouseDown |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TOP_SPACE
public static final int BOTTOM_SPACE
public static final int DOT_SIZE
Constructor Detail |
---|
public ParallelCoordinateDrawingPane()
Method Detail |
---|
public void setAxes(List<ParallelAxis> axes)
axes
- the parallel axes.public void setLines(List<LineInfo> lines)
lines
- the lines / rows (mapped).public List<LineInfo> getLines()
public List<ParallelAxis> getAxes()
public void setShowDots(boolean showDots)
showDots
- true if the dots on the axis should be painted,
false otherwise.public void setSkipValues(boolean skip)
skip
- true if missing values should be skipped.public void setShowMissingValues(boolean showMissingVals)
showMissingVals
- true if missing values should have an extra place
on the referring axis.public void setFadeUnhilited(boolean fade)
fade
- true if unhilited rows should be faded.public void setHideUnhilited(boolean hide)
hide
- true if only hilite rows should be displayedpublic void setDrawCurves(boolean drawCurves)
drawCurves
- true, if the rows should be displayed as curves.public void setLineThickness(int lineThickness)
lineThickness
- the thickness of the lines.public void paintContent(Graphics g)
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.
paintContent
in class BasicDrawingPane
g
- the graphics objectAbstractDrawingPane.paintContent(
java.awt.Graphics)
protected void drawAxes(Graphics g)
g
- the graphics objectprotected void drawLabels(Graphics g)
protected void drawNominalAxis(Graphics g, NominalParallelAxis axis)
g
- the graphics objectaxis
- the axisprotected boolean checkLabelSpace(Set<String> labels, FontMetrics metrics, int distance)
labels
- the labelsmetrics
- the font metricsdistance
- the available space
protected void drawNumericAxis(Graphics g, NumericParallelAxis axis)
g
- the graphics objectaxis
- the axisprotected void drawLines(Graphics g, List<LineInfo> lines)
lines
- the linesg
- the graphics objectprotected void paintDot(Graphics g, Point p, LineInfo line, int size)
g
- the graphics objectp
- the pointline
- the linesize
- the sizepublic String getToolTipText(MouseEvent e)
getToolTipText
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |