Package gvME

Examples of gvME.textMsg


     * @param msgs Vector of textMsg's in the current textConvo
     */
    private void getMsgList(Vector msgs)
    {
        Enumeration addMsgEnum = msgs.elements();
        textMsg crntMsg;
        StringBuffer itemBuff = new StringBuffer();
        while(addMsgEnum.hasMoreElements())
        {
            crntMsg = (textMsg) addMsgEnum.nextElement();
            itemBuff = new StringBuffer(crntMsg.getMessage());

            if(itemBuff.length() > itemLength)
            {
                itemBuff.setLength(itemLength);
                itemBuff.append("...");
View Full Code Here


    }

    public void commandAction(Command command, Displayable displayable) {
        int selIndex = this.getSelectedIndex();
        System.out.println(String.valueOf(selIndex));
        textMsg original = null;

        if(displayable == this && command == backCmd)
        {
            try {
                gvME.dispMan.switchDisplayable(null, gvME.getInbox());
            } catch (IOException ex) {
                Logger.add(getClass().getName(), ex.getMessage());
                ex.printStackTrace();
            } catch (Exception ex) {
                Logger.add(getClass().getName(), ex.getMessage());
                ex.printStackTrace();
            }
        }
        else if(displayable == readMsg && command == backCmd)
        {
            gvME.dispMan.switchDisplayable(null, this);
        }
        else if(!MsgListToItemMap.isEmpty())
        {
            original = (textMsg) MsgListToItemMap.elementAt(selIndex);

            if(command == fwdCmd)
            {
                WriteMsg wm = new WriteMsg("Forward", convo);
                gvME.dispMan.switchDisplayable(null, wm);
            }
            else if(command == replyCmd)
            {
                WriteMsg wm = new WriteMsg("Reply", convo);
                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(convo.getReplyNum(), convo.getSender());
                    gvME.dispMan.switchDisplayable(null, mc);
                    mc = null;
                }
            }
            else if(displayable == this && command == viewMsgCmd)
            {
                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);
View Full Code Here

     */
    private void getMsgList(Vector msgs)
    {
        MsgListToItemMap = new Vector();
        Enumeration addMsgEnum = msgs.elements();
        textMsg crntMsg;
        StringBuffer itemBuff = new StringBuffer();
        while(addMsgEnum.hasMoreElements())
        {
            crntMsg = (textMsg) addMsgEnum.nextElement();
            itemBuff = new StringBuffer(crntMsg.getMessage());

            if(itemBuff.length() > itemLength)
            {
                itemBuff.setLength(itemLength);
                itemBuff.append("...");
View Full Code Here

        }
    }

    public void commandAction(Command command, Displayable displayable) {
        int selIndex = this.getSelectedIndex();
        textMsg original = null;

        if(displayable == this && command == backCmd)
        {
            try {
                MsgListToItemMap = null;
                gvME.dispMan.switchDisplayable(null, gvME.getInbox());
            } catch (IOException ex) {
                Logger.add(getClass().getName(), ex.getMessage());
                ex.printStackTrace();
            } catch (Exception ex) {
                Logger.add(getClass().getName(), ex.getMessage());
                ex.printStackTrace();
            }
        }
        else if(displayable == readMsg && command == backCmd)
        {
            gvME.dispMan.switchDisplayable(null, this);
        }
        else if(!MsgListToItemMap.isEmpty())
        {
            original = (textMsg) MsgListToItemMap.elementAt(selIndex);

            if(command == fwdCmd)
            {
                WriteMsg wm = new WriteMsg("Forward", convo);
                gvME.dispMan.switchDisplayable(null, wm);
            }
            else if(command == replyCmd)
            {
                WriteMsg wm = new WriteMsg("Reply", convo);
                gvME.dispMan.switchDisplayable(null, wm);
            }
            else if(command == callCmd)
            {
                try{
                    MakeCall mc = new MakeCall(convo.getReplyNum(), convo.getSender());
                    gvME.dispMan.switchDisplayable(null, mc);
                }
                catch(Exception ex)
                {
                    if(ex.toString().indexOf("no call from") >= 0)
                    {
                        gvME.dispMan.switchDisplayable(gvME.getNoCallFromAlert(), settings.getChangeSettingsMenu());
                    }
                }
            }
            else if(displayable == this && command == viewMsgCmd)
            {
                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);
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

TOP

Related Classes of gvME.textMsg

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.