All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.visualize.AttributePanel

java.lang.Object
    |
    +----java.awt.Component
            |
            +----java.awt.Container
                    |
                    +----javax.swing.JComponent
                            |
                            +----javax.swing.JScrollPane
                                    |
                                    +----weka.gui.visualize.AttributePanel

public class AttributePanel
extends javax.swing.JScrollPane
This panel displays one dimensional views of the attributes in a dataset. Colouring is done on the basis of a column in the dataset or an auxiliary array (useful for colouring cluster predictions).

Version:
$Revision: 1.7 $
Author:
Malcolm Ware (mfw4@cs.waikato.ac.nz)
Author:
Mark Hall (mhall@cs.waikato.ac.nz)

Constructor Index

 o AttributePanel()
This constructs an attributePanel.

Method Index

 o addAttributePanelListener(AttributePanelListener)
Add a listener to the list of things listening to this panel
 o main(String[])
Main method for testing this class.
 o setCindex(int)
Set the index of the attribute by which to colour the data.
 o setCindex(int, double, double)
Set the index of the attribute by which to colour the data.
 o setColours(FastVector)
Sets a list of colours to use for colouring data points
 o setInstances(Instances)
This sets the instances to be drawn into the attribute panel
 o setX(int)
shows which bar is the current x attribute.
 o setY(int)
shows which bar is the current y attribute.

Constructor Detail

 o AttributePanel
public AttributePanel()
          This constructs an attributePanel.

Method Detail

 o addAttributePanelListener
public void addAttributePanelListener(AttributePanelListener a)
          Add a listener to the list of things listening to this panel
Parameters:
a - the listener to notify when attribute bars are clicked on
 o setCindex
public void setCindex(int c,
                      double h,
                      double l)
          Set the index of the attribute by which to colour the data. Updates the number of entries in the colour list if there are more values for this new attribute than previous ones.
Parameters:
c - the index of the attribute to colour on
h - maximum value of this attribute
l - minimum value of this attribute
 o setCindex
public void setCindex(int c)
          Set the index of the attribute by which to colour the data. Updates the number of entries in the colour list if there are more values for this new attribute than previous ones.
Parameters:
c - the index of the attribute to colour on
 o setColours
public void setColours(FastVector cols)
          Sets a list of colours to use for colouring data points
Parameters:
cols - a list of java.awt.Color
 o setInstances
public void setInstances(Instances ins) throws java.lang.Exception
          This sets the instances to be drawn into the attribute panel
Parameters:
ins - The instances.
 o setX
public void setX(int x)
          shows which bar is the current x attribute.
Parameters:
x - The attributes index.
 o setY
public void setY(int y)
          shows which bar is the current y attribute.
Parameters:
y - The attributes index.
 o main
public static void main(java.lang.String args[])
          Main method for testing this class.
Parameters:
args - first argument should be an arff file. Second argument can be an optional class col

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home