Package net.rim.blackberry.api.phone.phonelogs

Examples of net.rim.blackberry.api.phone.phonelogs.ConferencePhoneCallLog


         */
        protected void makeMenu(final Menu menu, final int instance) {
            super.makeMenu(menu, instance);

            menu.add(new AddParticipant());
            final ConferencePhoneCallLog conferencePhoneCallLog =
                    (ConferencePhoneCallLog) _controller.getCallLog();

            if (conferencePhoneCallLog.numberOfParticipants() > 2) // Can't have
                                                                   // less than
                                                                   // 2
                                                                   // participants
                                                                   // in a
                                                                   // conference
View Full Code Here


         * @return True if the conference phone call log is valid; false
         *         otherwise.
         */
        private boolean saveConferencePhoneCallLog() {
            if (_controller.validate()) {
                final ConferencePhoneCallLog conferencePhoneCallLog =
                        (ConferencePhoneCallLog) _controller.getCallLog();
                PhoneLogsDemo.this._normalCallModel
                        .addRow(conferencePhoneCallLog);

                return true;
View Full Code Here

            if (callLog instanceof PhoneCallLog) {
                final PhoneCallLog phoneCallLog = (PhoneCallLog) callLog;
                _controller = new PhoneCallLogController(phoneCallLog);
            } else {
                final ConferencePhoneCallLog conferencePhoneCallLog =
                        (ConferencePhoneCallLog) callLog;
                _controller =
                        new ConferencePhoneCallLogController(
                                conferencePhoneCallLog);
            }
View Full Code Here

            if (callLog instanceof PhoneCallLog) {
                final PhoneCallLog phoneCallLog = (PhoneCallLog) callLog;
                final PhoneCallLog copy = copyPhoneCallLog(phoneCallLog);
                _controller = new PhoneCallLogController(copy);
            } else {
                final ConferencePhoneCallLog conferencePhoneCallLog =
                        (ConferencePhoneCallLog) callLog;
                final ConferencePhoneCallLog copy =
                        copyConferencePhoneCallLog(conferencePhoneCallLog);
                _controller = new ConferencePhoneCallLogController(copy);
            }

            final Vector fields = _controller.getFields(CallLogController.EDIT);
View Full Code Here

         */
        protected void makeMenu(final Menu menu, final int instance) {
            super.makeMenu(menu, instance);

            if (_controller instanceof ConferencePhoneCallLogController) {
                final ConferencePhoneCallLog conferencePhoneCallLog =
                        (ConferencePhoneCallLog) _controller.getCallLog();
                menu.add(new AddParticipant());

                if (conferencePhoneCallLog.numberOfParticipants() > 2) {
                    final Field field = getLeafFieldWithFocus();
                    final int index = field.getIndex();

                    if (index >= FIRST_PARTICIPANT_INDEX) {
                        menu.add(new DeleteParticipant(index
View Full Code Here

         *            The conference phone call log to be copied
         * @return A copy of the conference phone call log
         */
        private ConferencePhoneCallLog copyConferencePhoneCallLog(
                final ConferencePhoneCallLog callLog) {
            final ConferencePhoneCallLog newLog =
                    new ConferencePhoneCallLog(new Date(callLog.getDate()
                            .getTime()), callLog.getDuration(), callLog
                            .getStatus(), new PhoneCallLogID(callLog
                            .getParticipantAt(0).getNumber()),
                            new PhoneCallLogID(callLog.getParticipantAt(1)
                                    .getNumber()), callLog.getNotes());

            final int numParticipants = callLog.numberOfParticipants();

            for (int i = 2; i < numParticipants; ++i) {
                newLog.addParticipant(new PhoneCallLogID(callLog
                        .getParticipantAt(i).getNumber()));
            }

            return newLog;
        }
View Full Code Here

        /**
         * Creates a new ConferencePhoneCallLogController object
         */
        public ConferencePhoneCallLogController() {
            this(new ConferencePhoneCallLog(new Date(), 0,
                    CallLog.STATUS_NORMAL, new PhoneCallLogID(""),
                    new PhoneCallLogID(""), ""));
        }
View Full Code Here

         * controller's fields
         */
        protected void updateLog() {
            super.updateLog();

            final ConferencePhoneCallLog conferencePhoneCallLog =
                    (ConferencePhoneCallLog) _callLog;
            final int numParticipants = _participants.size();

            for (int i = 0; i < numParticipants; ++i) {
                final BasicEditField participant =
                        (BasicEditField) _participants.elementAt(i);
                conferencePhoneCallLog.setParticipantAt(i, new PhoneCallLogID(
                        participant.getText()));
            }

            final int oldNumParticipants =
                    conferencePhoneCallLog.numberOfParticipants();

            for (int i = oldNumParticipants - 1; i >= numParticipants; --i) {
                conferencePhoneCallLog.removeParticipantAt(i);
            }
        }
View Full Code Here

         * Adds a new participant field to this controller
         */
        public void addParticipant() {
            _participants.addElement(new BasicEditField("Participant: ", "",
                    Integer.MAX_VALUE, BasicEditField.FILTER_PHONE));
            final ConferencePhoneCallLog conferencePhoneCallLog =
                    (ConferencePhoneCallLog) _callLog;
            conferencePhoneCallLog.addParticipant(new PhoneCallLogID(""));
        }
View Full Code Here

         * @param index
         *            The index of the participant to be removed
         */
        public void removeParticipantAt(final int index) {
            _participants.removeElementAt(index);
            final ConferencePhoneCallLog conferencePhoneCallLog =
                    (ConferencePhoneCallLog) _callLog;
            conferencePhoneCallLog.removeParticipantAt(index);
        }
View Full Code Here

TOP

Related Classes of net.rim.blackberry.api.phone.phonelogs.ConferencePhoneCallLog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.