venndiagrams
Class Venn3DiagramPanel.Potato

java.lang.Object
  extended byvenndiagrams.Venn3DiagramPanel.Potato
Enclosing class:
Venn3DiagramPanel

private class Venn3DiagramPanel.Potato
extends Object

A potato is a circle containing some informations relative to the filterings. The 3 potatoes don't have the same role. That is the reason why they have a number. The other fields are graphic.


Field Summary
private  double alpha
           
private  double beta
           
private  int num
           
private  int radius
           
private  int textX
           
private  int textY
           
private  int x
           
private  int y
           
 
Constructor Summary
Venn3DiagramPanel.Potato(int num)
           
 
Method Summary
private  String getNbLinesAndSetColor(Graphics g, int index)
          Gets the result of the filtering (number of selected lines) and sets the proper color consequently
 boolean isInPotato(int x, int y)
          Decides whether the point (x, y) is in the circle
 void paint(Graphics g)
          Draws the num-th potato with the results inside.
 void setGraphicParameters(int x, int y, int radius, int textx, int texty)
          Sets the graphic parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

num

private int num

x

private int x

y

private int y

radius

private int radius

textX

private int textX

textY

private int textY

alpha

private double alpha

beta

private double beta
Constructor Detail

Venn3DiagramPanel.Potato

public Venn3DiagramPanel.Potato(int num)
Method Detail

getNbLinesAndSetColor

private String getNbLinesAndSetColor(Graphics g,
                                     int index)
Gets the result of the filtering (number of selected lines) and sets the proper color consequently

Parameters:
g - the graphic area
index - the column index
Returns:
the result of the filtering

isInPotato

public boolean isInPotato(int x,
                          int y)
Decides whether the point (x, y) is in the circle


paint

public void paint(Graphics g)
Draws the num-th potato with the results inside.

See Also:
JComponent.paint(java.awt.Graphics)

setGraphicParameters

public void setGraphicParameters(int x,
                                 int y,
                                 int radius,
                                 int textx,
                                 int texty)
Sets the graphic parameters

Parameters:
radius - the radius of the potato