|
||||||||||
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.JScrollPane | +--weka.gui.visualize.AttributePanel
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).
Nested Class Summary | |
protected class |
AttributePanel.AttributeSpacing
inner inner class used for plotting the points into a bar for a particular attribute. |
Nested classes inherited from class javax.swing.JScrollPane |
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
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_barColour
The default colour to use for the background of the bars if a colour is not defined in Visualize.props |
protected int |
m_cIndex
|
protected FastVector |
m_colorList
The colour map to use for colouring points |
protected Color[] |
m_DefaultColors
default colours for colouring discrete class |
protected int[] |
m_heights
Holds the random height for each instance. |
protected FastVector |
m_Listeners
The list of things listening to this panel |
protected double |
m_maxC
Holds the min and max values of the colouring attributes |
protected double |
m_minC
|
protected Instances |
m_plotInstances
The instances to be plotted |
protected JPanel |
m_span
The container window for the attribute bars, and also where the X,Y or B get printed. |
protected int |
m_xIndex
|
protected int |
m_yIndex
|
Fields inherited from class javax.swing.JScrollPane |
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
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 | |
AttributePanel()
This constructs an attributePanel. |
Method Summary | |
void |
addAttributePanelListener(AttributePanelListener a)
Add a listener to the list of things listening to this panel |
static void |
main(String[] args)
Main method for testing this class. |
void |
setCindex(int c)
Set the index of the attribute by which to colour the data. |
void |
setCindex(int c,
double h,
double l)
Set the index of the attribute by which to colour the data. |
void |
setColours(FastVector cols)
Sets a list of colours to use for colouring data points |
void |
setInstances(Instances ins)
This sets the instances to be drawn into the attribute panel |
void |
setX(int x)
shows which bar is the current x attribute. |
void |
setY(int y)
shows which bar is the current y attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Instances m_plotInstances
protected double m_maxC
protected double m_minC
protected int m_cIndex
protected int m_xIndex
protected int m_yIndex
protected FastVector m_colorList
protected Color[] m_DefaultColors
protected FastVector m_Listeners
protected int[] m_heights
protected JPanel m_span
protected Color m_barColour
Constructor Detail |
public AttributePanel()
Method Detail |
public void addAttributePanelListener(AttributePanelListener a)
a
- the listener to notify when attribute bars are clicked onpublic void setCindex(int c, double h, double l)
c
- the index of the attribute to colour onh
- maximum value of this attributel
- minimum value of this attributepublic void setCindex(int c)
c
- the index of the attribute to colour onpublic void setColours(FastVector cols)
cols
- a list of java.awt.Colorpublic void setInstances(Instances ins) throws Exception
ins
- The instances.
Exception
public void setX(int x)
x
- The attributes index.public void setY(int y)
y
- The attributes index.public static void main(String[] args)
args
- first argument should be an arff file. Second argument
can be an optional class col
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |