Class Vertex


public class Vertex
extends java.lang.Object

Field Summary

private Color
color
private int
cordXOfWeight
private int
cordYOfWeight
private Node
end
private GeneralPath
gPath
private boolean
isAddedToSolution
private boolean
isSelected
private Node
start
private int
weight

Constructor Summary

Vertex(Node start, Node end, int weight)

Method Summary

int
calcCordWeight(Node f, Node end)
Color
getColor()
int
getCordXOfWeight()
int
getCordYOfWeight()
int
getCosts()
Node
getEnd()
GeneralPath
getGPath()
Node
getOtherNode(Node n)
Node
getStart()
int
getWeight()
boolean
isAddedToSolution()
Returns the isAddedToSolution.
boolean
isNodePartOfVertex(Node n)
boolean
isSelected()
Returns the isSelected.
void
setAddedToSolution(boolean b)
void
setColor(Color color)
void
setCordXOfWeight(int cordXOfWeight)
Sets the cordXOfWeight.
void
setCordYOfWeight(int cordYOfWeight)
Sets the cordYOfWeight.
void
setEnd(Node node)
void
setGPath(GeneralPath path)
void
setIsAddedToSolution(boolean b)
Method setIsAddedToSolution.
void
setIsSelected(boolean isSelected)
Sets the isSelected.
void
setStart(Node node)
void
setWeight(int weight)
Sets the weight.

Field Details

color

private Color color

cordXOfWeight

private int cordXOfWeight

cordYOfWeight

private int cordYOfWeight

end

private Node end

gPath

private GeneralPath gPath

isAddedToSolution

private boolean isAddedToSolution

isSelected

private boolean isSelected

start

private Node start

weight

private int weight

Constructor Details

Vertex

public Vertex(Node start,
              Node end,
              int weight)

Method Details

calcCordWeight

public int calcCordWeight(Node f,
                          Node end)

getColor

public Color getColor()
Returns:

getCordXOfWeight

public int getCordXOfWeight()

getCordYOfWeight

public int getCordYOfWeight()

getCosts

public int getCosts()

getEnd

public Node getEnd()

getGPath

public GeneralPath getGPath()
Returns:

getOtherNode

public Node getOtherNode(Node n)
Parameters:
Returns:

getStart

public Node getStart()

getWeight

public int getWeight()
Returns:

isAddedToSolution

public boolean isAddedToSolution()
Returns the isAddedToSolution.
Returns:
boolean

isNodePartOfVertex

public boolean isNodePartOfVertex(Node n)
Parameters:
Returns:

isSelected

public boolean isSelected()
Returns the isSelected.
Returns:
boolean

setAddedToSolution

public void setAddedToSolution(boolean b)
Parameters:
b -

setColor

public void setColor(Color color)
Parameters:
color -

setCordXOfWeight

public void setCordXOfWeight(int cordXOfWeight)
Sets the cordXOfWeight.
Parameters:
cordXOfWeight - The cordXOfWeight to set

setCordYOfWeight

public void setCordYOfWeight(int cordYOfWeight)
Sets the cordYOfWeight.
Parameters:
cordYOfWeight - The cordYOfWeight to set

setEnd

public void setEnd(Node node)
Parameters:
node -

setGPath

public void setGPath(GeneralPath path)
Parameters:
path -

setIsAddedToSolution

public void setIsAddedToSolution(boolean b)
Method setIsAddedToSolution.
Parameters:
b -

setIsSelected

public void setIsSelected(boolean isSelected)
Sets the isSelected.
Parameters:
isSelected - The isSelected to set

setStart

public void setStart(Node node)
Parameters:
node -

setWeight

public void setWeight(int weight)
Sets the weight.
Parameters:
weight - The weight to set