Class DendrogramPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DendrogramPanel extends JPanel
Swing panel responsible for laying out and drawing a dendrogram for a hierarchical Cluster model, including optional scale and distance labels.
Since:
1.0
Author:
Lars Behnke, 2013, Michael J. Schnieders
See Also:
  • Constructor Details

    • DendrogramPanel

      public DendrogramPanel()
  • Method Details

    • isShowDistanceValues

      public boolean isShowDistanceValues()
      Returns whether linkage distance values should be rendered on the dendrogram.
      Returns:
      true if distance values are shown
    • setShowDistances

      public void setShowDistances(boolean showDistanceValues)
      Sets whether linkage distance values should be rendered on the dendrogram.
      Parameters:
      showDistanceValues - true to show distance values
    • isShowScale

      public boolean isShowScale()
      Returns whether the X-axis scale should be drawn below the dendrogram.
      Returns:
      true if the scale is shown
    • setShowScale

      public void setShowScale(boolean showScale)
      Sets whether the X-axis scale should be drawn below the dendrogram.
      Parameters:
      showScale - true to show the scale
    • getScalePadding

      public int getScalePadding()
      Gets the padding (pixels) between the dendrogram and the scale axis.
      Returns:
      padding in pixels
    • setScalePadding

      public void setScalePadding(int scalePadding)
      Sets the padding (pixels) between the dendrogram and the scale axis.
      Parameters:
      scalePadding - padding in pixels
    • getScaleTickLength

      public int getScaleTickLength()
    • setScaleTickLength

      public void setScaleTickLength(int scaleTickLength)
    • getScaleValueInterval

      public double getScaleValueInterval()
    • setScaleValueInterval

      public void setScaleValueInterval(double scaleTickInterval)
    • getScaleValueDecimals

      public int getScaleValueDecimals()
    • setScaleValueDecimals

      public void setScaleValueDecimals(int scaleValueDecimals)
    • getBorderTop

      public int getBorderTop()
    • setBorderTop

      public void setBorderTop(int borderTop)
    • getBorderLeft

      public int getBorderLeft()
    • setBorderLeft

      public void setBorderLeft(int borderLeft)
    • getBorderRight

      public int getBorderRight()
    • setBorderRight

      public void setBorderRight(int borderRight)
    • getBorderBottom

      public int getBorderBottom()
    • setBorderBottom

      public void setBorderBottom(int borderBottom)
    • getLineColor

      public Color getLineColor()
    • setLineColor

      public void setLineColor(Color lineColor)
    • getModel

      public Cluster getModel()
    • setModel

      public void setModel(Cluster model)
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class JComponent