|
||||||||||
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 | +--edu.stanford.nlp.ie.pnp.ConfusionMatrixPlotter.CellPlotter
Component for drawing a single cell with a circle.
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 |
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 | |
ConfusionMatrixPlotter.CellPlotter()
Constructs a new CellPlotter with value=0 and labelShowing=false. |
|
ConfusionMatrixPlotter.CellPlotter(boolean labelShowing)
Constructs a new CellPlotter with value=0 and the label showing or not as given. |
|
ConfusionMatrixPlotter.CellPlotter(int value)
Constructs a new CellPlotter with the given value and labelShowing=false. |
|
ConfusionMatrixPlotter.CellPlotter(int value,
boolean labelShowing)
Constructs a new CellPlotter representing the given value (count), and with the label showing or not as given. |
Method Summary | |
protected void |
drawCell(Graphics2D g2)
Fills in the background, draws the circle, then optionally draws the label. |
protected void |
drawCircle(Graphics2D g2)
Draws the circle centered in the cell. |
protected void |
drawLabel(Graphics2D g2)
Draws the label (with the number of the value) on the cell. |
int |
getValue()
Returns the value (count) represented by this CellPlotter. |
boolean |
isLabelShowing()
Returns whether to paint the number of the value on the cell. |
void |
paintComponent(Graphics g)
Calls drawCell to paint this cell. |
void |
setLabelShowing(boolean labelShowing)
Sets whether to paint the number of the value on the cell. |
void |
setValue(int value)
Sets the value (count) represented by this CellPlotter. |
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 |
Constructor Detail |
public ConfusionMatrixPlotter.CellPlotter(int value, boolean labelShowing)
public ConfusionMatrixPlotter.CellPlotter(int value)
public ConfusionMatrixPlotter.CellPlotter(boolean labelShowing)
public ConfusionMatrixPlotter.CellPlotter()
Method Detail |
public void paintComponent(Graphics g)
paintComponent
in class JComponent
protected void drawCell(Graphics2D g2)
protected void drawCircle(Graphics2D g2)
protected void drawLabel(Graphics2D g2)
public boolean isLabelShowing()
public void setLabelShowing(boolean labelShowing)
public int getValue()
public void setValue(int value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |