|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--weka.gui.visualize.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 inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected Color[] |
m_DefaultColors
default colours for colouring discrete class |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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()
|
Method Summary | |
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 |
protected void |
paintNominal(Graphics gx)
Renders the legend for a nominal colouring attribute |
protected void |
paintNumeric(Graphics gx)
Renders the legend for a numeric colouring attribute |
protected 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 |
protected void |
setInstances(Instances insts)
Set the instances. |
protected void |
setNominal()
Sets the legend to be for a nominal variable |
protected void |
setNumeric()
Sets the legend to be for a numeric variable |
protected void |
setOn(boolean e)
Enables the panel |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Color[] m_DefaultColors
Constructor Detail |
public ClassPanel()
Method Detail |
public void addRepaintNotify(Component c)
c
- the component to be repaintedprotected void setOn(boolean e)
e
- true to enable the panelprotected void setInstances(Instances insts)
insts
- the instancesprotected void setCindex(int cIndex)
cIndex
- the index of the attribute to display coloured labels forpublic void setColours(FastVector cols)
protected void setNominal()
protected void setNumeric()
protected void paintNominal(Graphics gx)
gx
- the graphics contextprotected void paintNumeric(Graphics gx)
gx
- the graphics contextpublic void paintComponent(Graphics gx)
paintComponent
in class JComponent
gx
- 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 |