org.knime.base.node.viz.plotter.parcoord
Class ParallelAxis

java.lang.Object
  extended by org.knime.base.node.viz.plotter.parcoord.ParallelAxis
Direct Known Subclasses:
NominalParallelAxis, NumericParallelAxis

public abstract class ParallelAxis
extends Object

Represents a parallel axis in a parallel coordinates plot with an x position, a height, a Coordinate, a name and a flag, whether this ParallelAxis is selected.

Author:
Fabian Dill, University of Konstanz

Constructor Summary
ParallelAxis()
           
 
Method Summary
static ParallelAxis createParallelAxis(DataColumnSpec colSpec)
          Factory method to get an instance of a ParallelAxis.
protected  Coordinate getCoordinate()
           
 int getHeight()
           
 double getMappedValue(DataCell cell)
           
 String getName()
           
 int getXPosition()
           
 boolean isContainedIn(Rectangle rectangle)
           
 boolean isNominal()
           
 boolean isSelected()
           
protected  void setCoordinate(Coordinate coordinate)
           
 void setHeight(int height)
          Sets the height for all parallel axes.
 void setName(String name)
           
 void setSelected(boolean selected)
           
 void setXPosition(int xPos)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParallelAxis

public ParallelAxis()
Method Detail

createParallelAxis

public static ParallelAxis createParallelAxis(DataColumnSpec colSpec)
Factory method to get an instance of a ParallelAxis. Determines whether a NumericParallelAxis or a NominalParallelAxis should be returned, based on the passed DataColumnSpec.

Parameters:
colSpec - the column spec for this parallel axis.
Returns:
either a nominal or a numeric parallel axis based on the column spec.
See Also:
Coordinate

getCoordinate

protected Coordinate getCoordinate()
Returns:
the underlying coordinate

setCoordinate

protected void setCoordinate(Coordinate coordinate)
Parameters:
coordinate - the underlying coordinate

getName

public String getName()
Returns:
the referring column name

setName

public void setName(String name)
Parameters:
name - the referring column name

setHeight

public void setHeight(int height)
Sets the height for all parallel axes.

Parameters:
height - height

getHeight

public int getHeight()
Returns:
the length of the axis.

getXPosition

public int getXPosition()
Returns:
the x position where it should be painted.

setXPosition

public void setXPosition(int xPos)
Parameters:
xPos - the mapped x position

getMappedValue

public double getMappedValue(DataCell cell)
Parameters:
cell - the value
Returns:
the mapped point for the axis

isNominal

public boolean isNominal()
Returns:
true if the axis is nominal, false otherwise.

isContainedIn

public boolean isContainedIn(Rectangle rectangle)
Parameters:
rectangle - a dragged selection rectangle
Returns:
true if the axis lies within the rectangle or intersects it.

setSelected

public void setSelected(boolean selected)
Parameters:
selected - true if the line should be selected.

isSelected

public boolean isSelected()
Returns:
true if the line is selected.

toString

public String toString()

Overrides:
toString in class Object


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.