org.knime.base.node.viz.plotter.dendrogram
Class DendrogramPoint

java.lang.Object
  extended by org.knime.base.node.viz.plotter.dendrogram.DendrogramPoint

public class DendrogramPoint
extends Object

Represents a point in the dendrogram with the contained rows, the distance of the cluster, the point in the drawing pane and the visual properties hilited, selected, relative size, color and shape. A BinaryTree of DendrogramPoints is passed from the DendrogramPlotter to the DendrogramDrawingPane.

Author:
Fabian Dill, University of Konstanz

Constructor Summary
DendrogramPoint(Point p, double dist)
          Creates a DendrogramPoint with a mapped point and the original distance.
 
Method Summary
 void addRow(RowKey... rowIds)
          Adds the rows to this DendrogramPoint.
 void addRows(Set<RowKey> ids)
          Adds the rows to thsi DendrogramPoint.
 boolean equals(Object o)
          
 ColorAttr getColor()
           
 double getDistance()
           
 Point getPoint()
          Returns the mapped point, where to draw this DendrogramPoint.
 double getRelativeSize()
           
 Set<RowKey> getRows()
           
 ShapeFactory.Shape getShape()
           
 int hashCode()
          
 boolean isHilite()
           
 boolean isSelected()
           
 void setColor(ColorAttr color)
          If a datapoint is represented this is its original color attr.
 void setHilite(boolean hilite)
           
 void setRelativeSize(double relSize)
           
 void setSelected(boolean selected)
           
 void setShape(ShapeFactory.Shape shape)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DendrogramPoint

public DendrogramPoint(Point p,
                       double dist)
Creates a DendrogramPoint with a mapped point and the original distance.

Parameters:
p - the mapped point.
dist - the distance of the represented cluster node.
Method Detail

addRow

public void addRow(RowKey... rowIds)
Adds the rows to this DendrogramPoint.

Parameters:
rowIds - adds the row ids to the contained row ids.

addRows

public void addRows(Set<RowKey> ids)
Adds the rows to thsi DendrogramPoint.

Parameters:
ids - adds the row ids to the contained row ids.

getPoint

public Point getPoint()
Returns the mapped point, where to draw this DendrogramPoint.

Returns:
the point where the cluster is located in the dendrogram.

getDistance

public double getDistance()
Returns:
the original distance value of the represented cluster node.

getRows

public Set<RowKey> getRows()
Returns:
row ids of all contained rows.

isSelected

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

setSelected

public void setSelected(boolean selected)
Parameters:
selected - true if the point is selected

isHilite

public boolean isHilite()
Returns:
true if the point is hilited

setHilite

public void setHilite(boolean hilite)
Parameters:
hilite - true if the point is hilited.

setColor

public void setColor(ColorAttr color)
If a datapoint is represented this is its original color attr.

Parameters:
color - the original color attr.

getColor

public ColorAttr getColor()
Returns:
Default for cluster nodes and for data points the original color.

setRelativeSize

public void setRelativeSize(double relSize)
Parameters:
relSize - the relative size defined by the size manager, or 0.0 for cluster points and default.

getRelativeSize

public double getRelativeSize()
Returns:
the relative size defined by the size manager, or 0.0 for cluster points and default.

setShape

public void setShape(ShapeFactory.Shape shape)
Parameters:
shape - the shape defined by the shape manager or default otherwise.

getShape

public ShapeFactory.Shape getShape()
Returns:
the shape defined by the shape manager or default otherwise.

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode 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.