Class UserData


public class UserData
extends JPanel

Field Summary

private JLabel
averageTime
private Date
endTime
private JTextArea
history
private boolean
isTutorial
private boolean
isTutorialExec
private JLabel
l_Password
private JLabel
l_history
private JLabel
l_level
private JLabel
l_username
private JLabel
level
private JLabel
losts
private long
neededtime
private ShortestPath
parent
private JPasswordField
password
private JLabel
showAverageTime
private JLabel
showMisses
private JLabel
showSuccessRatio
private JLabel
showSuccesses
private JLabel
showTries
private Date
startTime
private JButton
submit
private JLabel
successRatio
private JLabel
tries
private UserGraph
userGraph
private JTextField
username
private JLabel
welcome
private JLabel
wins
private int
wrongVertexes

Constructor Summary

UserData(ShortestPath parent)

Method Summary

void
appendHistory(String str)
protected void
correctInput(Graph g)
This function compare the user input which the computize values.
void
decrementLevel()
long
getEndTime()
String
getID()
JTextArea
getInteractions()
Returns the interactions.
int
getLevel()
int
getMisses()
Returns the showLosts.
ShortestPath
getParentNew()
String
getPassword()
int
getShowAverageTime()
Returns the showAverageTime.
int
getShowSuccessRatio()
Returns the showSuccessRatio.
long
getStartTime()
Returns the startTime.
int
getTries()
Returns the showTries.
int
getWins()
Returns the showWins.
void
incrementLevel()
Sets the actualLevel.
void
incrementMiss()
Sets the showWins.
void
incrementSuccess()
Sets the showWins.
void
incrementTries()
Sets the showTries.
boolean
isTutorial()
boolean
isTutorialExec()
void
resetHistory()
void
setEndTime()
Sets the endTime.
private void
setNeededTime()
Sets the showAverageTime.
void
setParent(ShortestPath path)
void
setStartTime()
Sets the startTime.
void
setTutorial(boolean b)
void
setTutorialExec(boolean isTutorialExec)
Sets the isTutorialExec.
void
setUserGraph(UserGraph userGraph)
void
setWins(JLabel wins)
Sets the wins.
void
setWrongVertexes(int wrongVertexes)
Sets the wrongVertexes.
private void
updateSuccessRatio()
Sets the showSuccessRatio.
void
updateUserData(Graph graph)

Field Details

averageTime

private JLabel averageTime

endTime

private Date endTime

history

private JTextArea history

isTutorial

private boolean isTutorial

isTutorialExec

private boolean isTutorialExec

l_Password

private JLabel l_Password

l_history

private JLabel l_history

l_level

private JLabel l_level

l_username

private JLabel l_username

level

private JLabel level

losts

private JLabel losts

neededtime

private long neededtime

parent

private ShortestPath parent

password

private JPasswordField password

showAverageTime

private JLabel showAverageTime

showMisses

private JLabel showMisses

showSuccessRatio

private JLabel showSuccessRatio

showSuccesses

private JLabel showSuccesses

showTries

private JLabel showTries

startTime

private Date startTime

submit

private JButton submit

successRatio

private JLabel successRatio

tries

private JLabel tries

userGraph

private UserGraph userGraph

username

private JTextField username

welcome

private JLabel welcome

wins

private JLabel wins

wrongVertexes

private int wrongVertexes

Constructor Details

UserData

public UserData(ShortestPath parent)

Method Details

appendHistory

public void appendHistory(String str)

correctInput

protected void correctInput(Graph g)
This function compare the user input which the computize values. And make them visible on the screen and in the interaction. First we compare the distance of each node and the setted edges.

decrementLevel

public void decrementLevel()

getEndTime

public long getEndTime()

getID

public String getID()

getInteractions

public JTextArea getInteractions()
Returns the interactions.
Returns:
JTextArea

getLevel

public int getLevel()
Returns:
JLabel

getMisses

public int getMisses()
Returns the showLosts.
Returns:
JTextField

getParentNew

public ShortestPath getParentNew()
Returns:

getPassword

public String getPassword()

getShowAverageTime

public int getShowAverageTime()
Returns the showAverageTime.
Returns:
JTextField

getShowSuccessRatio

public int getShowSuccessRatio()
Returns the showSuccessRatio.
Returns:
JTextField

getStartTime

public long getStartTime()
Returns the startTime.
Returns:
Date

getTries

public int getTries()
Returns the showTries.
Returns:
JTextField

getWins

public int getWins()
Returns the showWins.
Returns:
JTextField

incrementLevel

public void incrementLevel()
Sets the actualLevel.
Parameters:

incrementMiss

public void incrementMiss()
Sets the showWins.
Parameters:

incrementSuccess

public void incrementSuccess()
Sets the showWins.
Parameters:

incrementTries

public void incrementTries()
Sets the showTries.
Parameters:

isTutorial

public boolean isTutorial()
Returns:

isTutorialExec

public boolean isTutorialExec()
Returns:
boolean

resetHistory

public void resetHistory()

setEndTime

public void setEndTime()
Sets the endTime.
Parameters:

setNeededTime

private void setNeededTime()
Sets the showAverageTime.
Parameters:

setParent

public void setParent(ShortestPath path)
Parameters:
path -

setStartTime

public void setStartTime()
Sets the startTime.
Parameters:

setTutorial

public void setTutorial(boolean b)
Parameters:
b -

setTutorialExec

public void setTutorialExec(boolean isTutorialExec)
Sets the isTutorialExec.
Parameters:
isTutorialExec - The isTutorialExec to set

setUserGraph

public void setUserGraph(UserGraph userGraph)
Parameters:
userGraph -

setWins

public void setWins(JLabel wins)
Sets the wins.
Parameters:
wins - The wins to set

setWrongVertexes

public void setWrongVertexes(int wrongVertexes)
Sets the wrongVertexes.
Parameters:
wrongVertexes - The wrongVertexes to set

updateSuccessRatio

private void updateSuccessRatio()
Sets the showSuccessRatio.
Parameters:

updateUserData

public void updateUserData(Graph graph)