diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java index dca0a3559..0645d72c7 100755 --- a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java @@ -25,7 +25,7 @@ /** * The DialPanel is the panel that contains the buttons to dial a * phone number. - * + * * @author Yana Stamcheva */ public class DialPanel @@ -69,18 +69,18 @@ public DialPanel(MainCallPanel parentCallPanel) /** * Creates an instance of DialPanel for a specific call, by * specifying the parent CallManager and the - * CallParticipant. - * - * @param callParticipants the CallParticipants, for which the + * CallPeer. + * + * @param callPeers the CallPeers, for which the * dialpad will be opened. */ - public DialPanel(Iterator callParticipants) + public DialPanel(Iterator callPeers) { - // We need to send DTMF tones to all participants each time the user + // We need to send DTMF tones to all peers each time the user // presses a dial button, so we put the iterator into a list. - while (callParticipants.hasNext()) + while (callPeers.hasNext()) { - this.callPeersList.add(callParticipants.next()); + this.callPeersList.add(callPeers.next()); } this.init(); @@ -404,29 +404,27 @@ public void actionPerformed(ActionEvent e) /** * Sends a DTMF tone to the current DTMF operation set. - * + * * @param dtmfTone The DTMF tone to send. */ private void sendDtmfTone(DTMFTone dtmfTone) { - Iterator callParticipants - = this.callPeersList.iterator(); + Iterator callPeers = this.callPeersList.iterator(); try { - while (callParticipants.hasNext()) + while (callPeers.hasNext()) { - CallPeer participant - = callParticipants.next(); + CallPeer peer = callPeers.next(); - if (participant.getProtocolProvider() + if (peer.getProtocolProvider() .getOperationSet(OperationSetDTMF.class) != null) { OperationSetDTMF dtmfOpSet - = (OperationSetDTMF) participant.getProtocolProvider() + = (OperationSetDTMF) peer.getProtocolProvider() .getOperationSet(OperationSetDTMF.class); - dtmfOpSet.sendDTMF(participant, dtmfTone); + dtmfOpSet.sendDTMF(peer, dtmfTone); } } } diff --git a/src/net/java/sip/communicator/plugin/callhistoryform/CallListCellRenderer.java b/src/net/java/sip/communicator/plugin/callhistoryform/CallListCellRenderer.java index 417811767..e7ea38d7c 100644 --- a/src/net/java/sip/communicator/plugin/callhistoryform/CallListCellRenderer.java +++ b/src/net/java/sip/communicator/plugin/callhistoryform/CallListCellRenderer.java @@ -96,14 +96,14 @@ public Component getListCellRendererComponent(JList list, Object value, this.dataPanel.remove(durationLabel); this.remove(iconLabel); - if (value instanceof GuiCallParticipantRecord) + if (value instanceof GuiCallPeerRecord) { - GuiCallParticipantRecord participant = (GuiCallParticipantRecord) value; + GuiCallPeerRecord participant = (GuiCallPeerRecord) value; this.direction = participant.getDirection(); - if (direction.equals(GuiCallParticipantRecord.INCOMING_CALL)) + if (direction.equals(GuiCallPeerRecord.INCOMING_CALL)) iconLabel.setIcon(incomingIcon); else iconLabel.setIcon(outgoingIcon); @@ -195,7 +195,7 @@ private void internalPaintComponent(Graphics g) } else { - if (direction.equals(GuiCallParticipantRecord.INCOMING_CALL)) + if (direction.equals(GuiCallPeerRecord.INCOMING_CALL)) { GradientPaint p = new GradientPaint(0, 0, @@ -206,7 +206,7 @@ private void internalPaintComponent(Graphics g) g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7); } - else if (direction.equals(GuiCallParticipantRecord.OUTGOING_CALL)) + else if (direction.equals(GuiCallPeerRecord.OUTGOING_CALL)) { GradientPaint p = new GradientPaint(0, 0, diff --git a/src/net/java/sip/communicator/plugin/callhistoryform/CallListModel.java b/src/net/java/sip/communicator/plugin/callhistoryform/CallListModel.java index 36cc1768f..de522cab7 100644 --- a/src/net/java/sip/communicator/plugin/callhistoryform/CallListModel.java +++ b/src/net/java/sip/communicator/plugin/callhistoryform/CallListModel.java @@ -36,7 +36,7 @@ public void closeDate(Object date) for(int i = startIndex + 1; i < currentSize; i ++) { Object o = this.getElementAt(i); - if(o instanceof GuiCallParticipantRecord) { + if(o instanceof GuiCallPeerRecord) { this.closedDates.put(o, date); c.add(o); endIndex++; diff --git a/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java b/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java index 10ddacf4e..79848861b 100644 --- a/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java +++ b/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java @@ -358,12 +358,12 @@ private String checkCallType(int callType, CallRecord callRecord) if (callRecord.getDirection().equals(CallRecord.IN) && ((callType == Constants.INCOMING_CALL) || callType == Constants.INOUT_CALL)) - direction = GuiCallParticipantRecord.INCOMING_CALL; + direction = GuiCallPeerRecord.INCOMING_CALL; // out else if (callRecord.getDirection().equals(CallRecord.OUT) && (callType == Constants.OUTGOING_CALL || callType == Constants.INOUT_CALL)) - direction = GuiCallParticipantRecord.OUTGOING_CALL; + direction = GuiCallPeerRecord.OUTGOING_CALL; return direction; } @@ -462,7 +462,7 @@ private void loadTableRecords(Collection historyCalls, int calltype, direction = checkCallType(calltype, callRecord); if (direction != null) - callList.addItem(new GuiCallParticipantRecord( + callList.addItem(new GuiCallPeerRecord( participantRecord, direction)); else addMe = false; diff --git a/src/net/java/sip/communicator/plugin/callhistoryform/GuiCallParticipantRecord.java b/src/net/java/sip/communicator/plugin/callhistoryform/GuiCallParticipantRecord.java deleted file mode 100644 index e86325b25..000000000 --- a/src/net/java/sip/communicator/plugin/callhistoryform/GuiCallParticipantRecord.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.plugin.callhistoryform; - -import java.util.*; - -import net.java.sip.communicator.service.callhistory.*; -import net.java.sip.communicator.util.*; - -/** - * The GuiCallParticipantRecord is meant to be used in the call history - * to represent a history call participant record. It wraps a - * CallParticipant or a CallParticipantRecord object. - * - * @author Yana Stamcheva - */ -public class GuiCallParticipantRecord -{ - public static final String INCOMING_CALL = "IncomingCall"; - - public static final String OUTGOING_CALL = "OutgoingCall"; - - private String direction; - - private String participantName; - - private Date startTime; - - private Date callTime; - - /** - * Creates an instance of GuiCallParticipantRecord by specifying - * the participant name, the call direction (incoming or outgoing), the - * time at which the call has started and the duration of the call. - * - * @param participantName the name of the call participant - * @param direction the direction of the call - INCOMING_CALL - * or OUTGOING_CALL - * @param startTime the time at which the call has started - * @param callTime the duration of the call - */ - public GuiCallParticipantRecord(String participantName, - String direction, - Date startTime, - Date callTime) - { - this.direction = direction; - - this.participantName = participantName; - - this.startTime = startTime; - - this.callTime = callTime; - } - - /** - * Creates an instance of GuiCallParticipantRecord by specifying - * the corresponding CallParticipantRecord, which gives all the - * information for the participant and the call duration. - * - * @param participantRecord the corresponding CallParticipantRecord - * @param direction the call direction - INCOMING_CALL or OUTGOING_CALL - */ - public GuiCallParticipantRecord(CallPeerRecord participantRecord, - String direction) - { - this.direction = direction; - - this.participantName = participantRecord.getPeerAddress(); - - this.startTime = participantRecord.getStartTime(); - - this.callTime = GuiUtils.substractDates( - participantRecord.getEndTime(), startTime); - } - - /** - * Returns the call direction - INCOMING_CALL or OUTGOING_CALL. - * - * @return the call direction - INCOMING_CALL or OUTGOING_CALL. - */ - public String getDirection() - { - return direction; - } - - /** - * Returns the duration of the call. - * - * @return the duration of the call - */ - public Date getCallTime() - { - return callTime; - } - - /** - * Returns the name of the participant. - * - * @return the name of the participant - */ - public String getParticipantName() - { - return participantName; - } - - /** - * Returns the time at which the call has started. - * - * @return the time at which the call has started - */ - public Date getStartTime() - { - return startTime; - } -}