This class represents the canvas on which the graph is drawn.
More...
Inherits JPanel.
|
void | addListeners () |
| Adds ActionListeners to the canvas.
|
|
boolean | clickedEdge (MouseEvent e, Edge edge) |
| Checks whether the user clicked on the specified Edge. More...
|
|
boolean | clickedNode (MouseEvent e, Node node) |
| Checks whether the user clicked on the specified Node. More...
|
|
double | gaussProb (double x) |
| Calculates the probability of x according to the standard normal distribution. More...
|
|
ArrayList< Double > | kde (ArrayList< Double > angles) |
| Calculates the distribution of the specified angles with kernel density estimation. More...
|
|
ArrayList< Edge > | createConstraints (ArrayList< GridRegion > regions) |
| Automatically creates the constraints for the Constrained Delaunay Triangulation according to the specified regions. More...
|
|
ArrayList< GridRegion > | createRegions (int width, int height, GridCell[][] cellArray) |
| Creates the GridRegions which are used for the automatic mesh generation. More...
|
|
GridCell | createCell (int x, int y, int dx, int dy) |
| Creates a GridCell with a primary direction of the Edges that pass through. More...
|
|
This class represents the canvas on which the graph is drawn.
- Author
- Kurt Leimer
Definition at line 26 of file CanvasPanel.java.
void CanvasPanel.addEdge |
( |
int |
startNodeIndex, |
|
|
int |
endNodeIndex |
|
) |
| |
void CanvasPanel.addNode |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
boolean CanvasPanel.clickedEdge |
( |
MouseEvent |
e, |
|
|
Edge |
edge |
|
) |
| |
|
private |
Checks whether the user clicked on the specified Edge.
- Parameters
-
e | The mouse-click event. |
edge | The Edge which is checked. |
- Returns
- true if the user clicked on the Edge, false otherwise.
Definition at line 498 of file CanvasPanel.java.
boolean CanvasPanel.clickedNode |
( |
MouseEvent |
e, |
|
|
Node |
node |
|
) |
| |
|
private |
Checks whether the user clicked on the specified Node.
- Parameters
-
e | The mouse-click event. |
node | The Node which is checked. |
- Returns
- true if the user clicked on the Node, false otherwise.
Definition at line 509 of file CanvasPanel.java.
GridCell CanvasPanel.createCell |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
dx, |
|
|
int |
dy |
|
) |
| |
|
private |
Creates a GridCell with a primary direction of the Edges that pass through.
- Parameters
-
x | The cell array index in x-direction. |
y | The cell array index in y-direction. |
dx | The size of the cell in x-direction. |
dy | The size of the cell in y-direction. |
- Returns
- a GridCell with a primary direction.
Definition at line 647 of file CanvasPanel.java.
ArrayList<Edge> CanvasPanel.createConstraints |
( |
ArrayList< GridRegion > |
regions) | |
|
|
private |
Automatically creates the constraints for the Constrained Delaunay Triangulation according to the specified regions.
- Parameters
-
regions | The regions used for the creation of the constraints. |
- Returns
- The constraints for the Constrained Delaunay Triangulation.
Definition at line 553 of file CanvasPanel.java.
void CanvasPanel.createMesh |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| |
Performs the automatic control mesh creation.
- Parameters
-
dx | The cell size in x-direction. |
dy | The cell size in y-direction. |
Definition at line 437 of file CanvasPanel.java.
ArrayList<GridRegion> CanvasPanel.createRegions |
( |
int |
width, |
|
|
int |
height, |
|
|
GridCell |
cellArray[][] |
|
) |
| |
|
private |
Creates the GridRegions which are used for the automatic mesh generation.
- Parameters
-
width | The width of the cell array. |
height | The height of the cell array. |
cellArray | The cell array which contains GridCells with a primary direction. |
- Returns
- the GridRegions which are used for the automatic mesh generation.
Definition at line 586 of file CanvasPanel.java.
double CanvasPanel.gaussProb |
( |
double |
x) | |
|
|
private |
Calculates the probability of x according to the standard normal distribution.
- Parameters
-
x | The value whose probability is calculated. |
- Returns
- the probability of x.
Definition at line 519 of file CanvasPanel.java.
ArrayList<Edge> CanvasPanel.getEdges |
( |
) | |
|
Returns the Edges of the graph.
- Returns
- the Edges of the graph.
Definition at line 354 of file CanvasPanel.java.
ArrayList<Node> CanvasPanel.getNodes |
( |
) | |
|
Returns the Nodes of the graph.
- Returns
- the Nodes of the graph.
Definition at line 362 of file CanvasPanel.java.
ArrayList<Double> CanvasPanel.kde |
( |
ArrayList< Double > |
angles) | |
|
|
private |
Calculates the distribution of the specified angles with kernel density estimation.
- Parameters
-
angles | The angles whose distributions is calculated. |
- Returns
- the distribution of the specified angles.
Definition at line 528 of file CanvasPanel.java.
The documentation for this class was generated from the following file: