Package gvME

Examples of gvME.textConvo


                gvME.dispMan.switchDisplayable(null, getReadMsg(convo.getSender()));
                readMsg.append(tools.decodeString(original.getMessage())); //decodes string from utf8
            }
            else if(displayable == readMsg && command == msgPropsCmd)
            {
                textConvo propsConvo = convo;
                propsConvo.setLastMsg(original);
                gvME.dispMan.switchDisplayable(null, getMsgProps(propsConvo));
            }
            else if(displayable == readMsg && command == replyReadCmd)
            {
                WriteMsg wm = new WriteMsg("Reply", convo);
View Full Code Here


    private void initInboxHash()
    {
        Enumeration listEnum = list.elements();
        while(listEnum.hasMoreElements())
        {
            textConvo crnt = (textConvo) listEnum.nextElement();
            if(!crnt.getIsRead())
                numUnread++;
            getInboxHash().put(crnt.getMsgID(), crnt);
        }
        updateUnread();
    }
View Full Code Here

        int numNewMsgs = 0;
        if(newMsgs != null && (numNewMsgs = newMsgs.size()) > 0)
        {
            for(int i = numNewMsgs-1; i >= 0; i--)
            {
                textConvo newConvo = (textConvo) newMsgs.elementAt(i);
                int index = -1;
                if(getInboxHash().containsKey(newConvo.getMsgID()))
                {
                    textConvo crnt = (textConvo) getInboxHash().get(newConvo.getMsgID());
                    if(crnt.getIsRead())
                    {
                        numUnread++;
                        crnt.setIsRead(false);
                    }
                    index = list.indexOf(crnt);
                    getInboxHash().put(crnt.getMsgID(), crnt);
                    list.setElementAt(crnt, index);
                    addItem(crnt, index);
                }
                else
                {
View Full Code Here

            super.commandAction(command, displayable);
        else if(!list.isEmpty() && (command == delItemCmd || command == delAllCmd))
        {
            if(command == delItemCmd)
            {
                textConvo crnt = (textConvo)list.elementAt(getSelectedIndex());
                String hashkey = (String) crnt.getMsgID();
                getInboxHash().remove(hashkey);
                if(!crnt.getIsRead())
                    numUnread--;
                updateUnread();
            }
            if(command == delAllCmd)
            {
                getInboxHash().clear();
                numUnread = 0;
                updateUnread();
            }
            super.commandAction(command, displayable);
        }
        else if(command == refreshCmd)
        {
            refreshInbox();
        }
        else if(!list.isEmpty())
        {
            int selIndex = this.getSelectedIndex();
            textConvo original  = (textConvo) list.elementAt(selIndex);

            if(command == OKCmd)
            {
                textConvo crnt = (textConvo) list.elementAt(selIndex);
                if(!crnt.getIsRead())
                    markConvoRead(crnt, selIndex);
                gvME.dispMan.switchDisplayable(null, new MsgList(crnt));
            }
            else if(command == replyCmd)
            {
                WriteMsg wm = new WriteMsg("Reply", original);
                gvME.dispMan.switchDisplayable(null, wm);
            }
            else if(command == callCmd)
            {
                if(settings.getCallFrom().equals(""))
                    gvME.dispMan.switchDisplayable(gvME.getNoCallFromAlert(), settings.getChangeSettingsMenu());
                else{
                    MakeCall mc = new MakeCall(original.getReplyNum(), original.getSender());
                    gvME.dispMan.switchDisplayable(null, mc);
                    mc = null;
                }
            }
            else if(command == markUnreadCmd)
            {
                textConvo crnt = (textConvo) list.elementAt(selIndex);
                markConvoRead(crnt, selIndex);
            }
        }
    }
View Full Code Here

    private void initInboxHash()
    {
        Enumeration listEnum = list.elements();
        while(listEnum.hasMoreElements())
        {
            textConvo crnt = (textConvo) listEnum.nextElement();
            if(!crnt.getIsRead())
                numUnread++;
            getInboxHash().put(crnt.getMsgID(), crnt);
        }
        updateUnread();
    }
View Full Code Here

        int numNewMsgs = 0;
        if(newMsgs != null && (numNewMsgs = newMsgs.size()) > 0)
        {
            for(int i = numNewMsgs-1; i >= 0; i--)
            {
                textConvo newConvo = (textConvo) newMsgs.elementAt(i);
                int index = -1;
                if(getInboxHash().containsKey(newConvo.getMsgID()))
                {
                    textConvo crnt = (textConvo) getInboxHash().get(newConvo.getMsgID());
                    if(crnt.getIsRead())
                    {
                        numUnread++;
                        crnt.setIsRead(false);
                    }
                    index = list.indexOf(crnt);
                    getInboxHash().put(crnt.getMsgID(), crnt);
                    list.setElementAt(crnt, index);
                    addItem(crnt, index);
                }
                else
                {
View Full Code Here

            super.commandAction(command, displayable);
        else if(!list.isEmpty()&& (command == delItemCmd || command == delAllCmd))
        {
            if(command == delItemCmd)
            {
                textConvo crnt = (textConvo)list.elementAt(getSelectedIndex());
                String hashkey = (String) crnt.getMsgID();
                getInboxHash().remove(hashkey);
                if(!crnt.getIsRead())
                    numUnread--;
                updateUnread();
            }
            if(command == delAllCmd)
            {
                getInboxHash().clear();
                numUnread = 0;
                updateUnread();
            }
            super.commandAction(command, displayable);
        }
        else if(command == refreshCmd)
        {
            refreshInbox();
        }
        else if(!list.isEmpty())
        {
            int selIndex = this.getSelectedIndex();
            textConvo original  = (textConvo) list.elementAt(selIndex);

            if(command == readCmd)
            {
                textConvo crnt = (textConvo) list.elementAt(selIndex);
                if(!crnt.getIsRead())
                    markConvoRead(crnt, selIndex);
                gvME.dispMan.switchDisplayable(null, new MsgList(crnt));
            }
            else if(command == replyCmd)
            {
                WriteMsg wm = new WriteMsg("Reply", original);
                gvME.dispMan.switchDisplayable(null, wm);
            }
            else if(command == callCmd)
            {
                try{
                    MakeCall mc = new MakeCall(original.getReplyNum(), original.getSender());
                    gvME.dispMan.switchDisplayable(null, mc);
                }
                catch(Exception ex)
                {
                 //   System.out.println(ex.toString());
                    if(ex.toString().indexOf("no call from") >= 0)
                    {
                        gvME.dispMan.switchDisplayable(gvME.getNoCallFromAlert(), settings.getChangeSettingsMenu());
                    }
                }
            }
            else if(command == markUnreadCmd)
            {
                textConvo crnt = (textConvo) list.elementAt(selIndex);
                markConvoRead(crnt, selIndex);
            }
        }
    }
View Full Code Here

            super.addItem(convo);
    }

    private void sendItem(int index)
    {
        textConvo crnt = (textConvo) list.elementAt(index);
        SendMsg sm = new SendMsg(crnt, crnt.getLastMsg().getMessage());
        try {
            this.delItem(index);
        } catch (RecordStoreException ex) {
            ex.printStackTrace();
        }
View Full Code Here

        });
        return task;
    }

    public void commandAction(Command command, Displayable display) {
        textConvo sentMsg = new textConvo(recipient, contacting, new textMsg(msg));
            if (command == WaitScreen.FAILURE_COMMAND || command == cancelSendCmd) {
                try {
                    getTask().cancel();
                    gvME.getOutbox().addItem(sentMsg);
              //      System.out.println("Failed");
View Full Code Here

        try{
            rs = RecordStore.openRecordStore(rsName, true);
           
            for(int i = list.size()-1; i >= 0; i--)
            {
                textConvo crnt = (textConvo)list.elementAt(i);
                byte[] data = crnt.serialize();
                rs.addRecord(data, 0, data.length);
            }
        }
        catch(Exception ignore)
        {}
View Full Code Here

TOP

Related Classes of gvME.textConvo

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.