addVertex
private void addVertex(Node startVertex,
Node node)
Method addVertex.
adjustArea
private void adjustArea(int height,
int width)
Method getNodes.
calculateNumNodes
private int calculateNumNodes(int level,
int successRatio)
checkWeightsRoom
private void checkWeightsRoom()
checkingEdges
private void checkingEdges(matrix[][] )
clearEgdes
private void clearEgdes(int maxColumns,
int maxRows,
matrix[][] )
clickedOnNode
private Node clickedOnNode(int x,
int y)
Method clickedOnNode.
createEdges
private void createEdges(int numEdges,
int numNodes)
createGraph
public void createGraph()
createNewNode
private void createNewNode(int i,
int j)
Method createNewNode.
createNodeName
private String createNodeName()
Method createNodeName.
createNodes
private void createNodes(int numOfNodes,
int maxColumns,
int maxRows,
matrix[][] )
createTutorial
public void createTutorial()
drawEdge
private void drawEdge(Graphics g,
Vertex v,
FontMetrics fm)
drawNode
private void drawNode(Graphics g,
Node n,
FontMetrics fm)
drawTempLine
private void drawTempLine(Node node,
Graphics g)
enoughRoom
private boolean enoughRoom(int x,
int y)
Method enoughRoom.
findNewPlace
private void findNewPlace(Node node,
int maxColumns,
int maxRows,
matrix[][] )
getAlpabet
private char[] getAlpabet()
Returns the alpabet.
initWeights
private void initWeights(Vertex v)
isLock
public boolean isLock()
isWeightCloseBy
private boolean isWeightCloseBy(int x,
int y)
mouseClicked
public void mouseClicked(MouseEvent e)
Mouse Listener functions
mouseDragged
public void mouseDragged(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
mouseMoved
public void mouseMoved(MouseEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
paint
public void paint(Graphics g)
repairGraph
private void repairGraph(ArrayList unreachableNodes)
searchRedundantEgde
private Vertex searchRedundantEgde(ArrayList al)
searchUnreachableNodes
public ArrayList searchUnreachableNodes()
setAlpabet
private void setAlpabet(char[] alpabet)
Sets the alpabet.
alpabet
- The alpabet to set
setGraph
private void setGraph(Graph graph)
Method setGraph.
setLock
public void setLock(boolean lock)
setNewPosWeight
private void setNewPosWeight(Vertex v,
int diff,
boolean inMiddle)
setWeights
private void setWeights()