类 ClassPanel

所有已实现的接口:
ImageObserver, MenuContainer, Serializable, Accessible

public class ClassPanel extends 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).
版本:
$Revision: 7059 $
作者:
Mark Hall (mhall@cs.waikato.ac.nz), Malcolm Ware (mfw4@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • ClassPanel

      public ClassPanel()
    • ClassPanel

      public ClassPanel(Color background)
  • 方法详细资料

    • addRepaintNotify

      public void addRepaintNotify(Component c)
      Adds a component that will need to be repainted if the user changes the colour of a label.
      参数:
      c - the component to be repainted
    • addActionListener

      public void addActionListener(ActionListener a)
      Add an action listener that will be notified if the user changes the colour of a label
      参数:
      a - an ActionListener value
    • setOn

      public void setOn(boolean e)
      Enables the panel
      参数:
      e - true to enable the panel
    • setInstances

      public void setInstances(Instances insts)
      Set the instances.
      参数:
      insts - the instances
    • setCindex

      public void setCindex(int cIndex)
      Set the index of the attribute to display coloured labels for
      参数:
      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
      参数:
      cols - a list containing java.awt.Colors
    • paintComponent

      public void paintComponent(Graphics gx)
      Renders this component
      参数:
      gx - the graphics context
    • main

      public static void main(String[] args)
      Main method for testing this class.
      参数:
      args - first argument must specify an arff file. Second can specify an optional index to colour labels on