|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.visualize.ClassPanel
public class ClassPanel
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).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ClassPanel()
|
|
ClassPanel(Color background)
|
|
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener a)
Add an action listener that will be notified if the user changes the colour of a label |
void |
addRepaintNotify(Component c)
Adds a component that will need to be repainted if the user changes the colour of a label. |
static void |
main(String[] args)
Main method for testing this class. |
void |
paintComponent(Graphics gx)
Renders this component |
void |
setCindex(int cIndex)
Set the index of the attribute to display coloured labels for |
void |
setColours(FastVector cols)
Set a list of colours to use for colouring labels |
void |
setInstances(Instances insts)
Set the instances. |
void |
setOn(boolean e)
Enables the panel |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClassPanel()
public ClassPanel(Color background)
| Method Detail |
|---|
public void addRepaintNotify(Component c)
c - the component to be repaintedpublic void addActionListener(ActionListener a)
a - an ActionListener valuepublic void setOn(boolean e)
e - true to enable the panelpublic void setInstances(Instances insts)
insts - the instancespublic void setCindex(int cIndex)
cIndex - the index of the attribute to display coloured labels forpublic void setColours(FastVector cols)
cols - a list containing java.awt.Colorspublic void paintComponent(Graphics gx)
paintComponent in class JComponentgx - the graphics contextpublic static void main(String[] args)
args - first argument must specify an arff file. Second can
specify an optional index to colour labels on
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||