save the start call time and the call duration instead of start date and end date

cusax-fix
Yana Stamcheva 20 years ago
parent 503bf91139
commit 2f74f41f3d

@ -109,10 +109,7 @@ public Component getListCellRendererComponent(JList list, Object value,
this.durationLabel.setText(
Messages.getString("duration") + " " +
GuiUtils.formatTime(
GuiUtils.substractDates(
participant.getEndTime(),
participant.getStartTime())));
GuiUtils.formatTime(participant.getCallTime()));
//this.nameLabel.setIcon(listModel
// .getMetaContactStatusIcon(contactItem));

@ -163,7 +163,7 @@ public void callParticipantRemoved(CallParticipantEvent evt)
participantPanel.getParticipantName(),
participantPanel.getCallType(),
participantPanel.getStartTime(),
participantPanel.getEndTime());
participantPanel.getTime());
callManager.getMainFrame().getCallListManager().addCallRecord(
0, participantRecord);

@ -38,7 +38,7 @@ public class CallParticipantPanel extends JPanel
private Date startDate;
private Date endDate;
private Date callTime = new Date(0);
private Timer timer;
@ -121,7 +121,7 @@ public void actionPerformed(ActionEvent e)
new Date(System.currentTimeMillis()),
startDate);
endDate = time;
callTime = time;
timeLabel.setText(GuiUtils.formatTime(time));
}
}
@ -141,12 +141,9 @@ public Date getStartTime()
*
* @return the start time of the contained participant call
*/
public Date getEndTime()
{
if(endDate == null)
endDate = startDate;
return endDate;
public Date getTime()
{
return callTime;
}
/**

@ -8,6 +8,7 @@
import java.util.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.callhistory.*;
/**
@ -29,12 +30,12 @@ public class GuiCallParticipantRecord
private Date startTime;
private Date endTime;
private Date callTime;
public GuiCallParticipantRecord(String participantName,
String direction,
Date startTime,
Date endTime)
Date callTime)
{
this.direction = direction;
@ -42,7 +43,7 @@ public GuiCallParticipantRecord(String participantName,
this.startTime = startTime;
this.endTime = endTime;
this.callTime = callTime;
}
public GuiCallParticipantRecord(CallParticipantRecord participantRecord,
@ -54,7 +55,8 @@ public GuiCallParticipantRecord(CallParticipantRecord participantRecord,
this.startTime = participantRecord.getStartTime();
this.endTime = participantRecord.getEndTime();
this.callTime = GuiUtils.substractDates(
participantRecord.getEndTime(), startTime);
}
public String getDirection()
@ -62,9 +64,9 @@ public String getDirection()
return direction;
}
public Date getEndTime()
public Date getCallTime()
{
return endTime;
return callTime;
}
public String getParticipantName()

Loading…
Cancel
Save