All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.gui.visualize.ClassPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JPanel
|
+----weka.gui.visualize.ClassPanel
- public class ClassPanel
- extends javax.swing.JPanel
This panel displays coloured labels for nominal attributes and a spectrum
for numeric attributes. It can also be told to colour on the basis
of an array of doubles (this can be useful for displaying coloured labels
that correspond to a clusterers predictions).
- Version:
- $Revision: 1.11 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- Author:
- Malcolm Ware (mfw4@cs.waikato.ac.nz)
ClassPanel()
-
addActionListener(ActionListener)
- Add an action listener that will be notified if the user changes the
colour of a label
addRepaintNotify(Component)
- Adds a component that will need to be repainted if the user
changes the colour of a label.
main(String[])
- Main method for testing this class.
paintComponent(Graphics)
- Renders this component
setCindex(int)
- Set the index of the attribute to display coloured labels for
setColours(FastVector)
- Set a list of colours to use for colouring labels
setInstances(Instances)
- Set the instances.
setOn(boolean)
- Enables the panel
ClassPanel
public ClassPanel()
addRepaintNotify
public void addRepaintNotify(java.awt.Component c)
Adds a component that will need to be repainted if the user
changes the colour of a label.
- Parameters:
c - the component to be repainted
addActionListener
public void addActionListener(java.awt.event.ActionListener a)
Add an action listener that will be notified if the user changes the
colour of a label
- Parameters:
a - an ActionListener value
setOn
public void setOn(boolean e)
Enables the panel
- Parameters:
e - true to enable the panel
setInstances
public void setInstances(Instances insts)
Set the instances.
- Parameters:
insts - the instances
setCindex
public void setCindex(int cIndex)
Set the index of the attribute to display coloured labels for
- Parameters:
cIndex - the index of the attribute to display coloured labels for
setColours
public void setColours(FastVector cols)
Set a list of colours to use for colouring labels
- Parameters:
a - list containing java.awt.Colors
paintComponent
public void paintComponent(java.awt.Graphics gx)
Renders this component
- Parameters:
gx - the graphics context
main
public static void main(java.lang.String args[])
Main method for testing this class.
- Parameters:
args - first argument must specify an arff file. Second can
specify an optional index to colour labels on
All Packages Class Hierarchy This Package Previous Next Index WEKA's home