亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? thebox.java

?? 手機(jī)郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/*
MujMail - Simple mail client for J2ME
Copyright (C) 2003 Petr Spatka <petr.spatka@centrum.cz>
Copyright (C) 2005 Pavel Machek <pavel@ucw.cz>
Copyright (C) 2006 Nguyen Son Tung <n.sontung@gmail.com>
Copyright (C) 2008 David Hauzar <david.hauzar.mujmail@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


package mujmail;

import mujmail.util.Functions;
import java.util.Enumeration;
import java.util.Timer;
import java.util.TimerTask;

import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

import mujmail.account.MailAccount;
import mujmail.ordering.ComparatorStrategy;
import mujmail.ordering.Criterion;
import mujmail.ordering.Ordering;
import mujmail.protocols.InProtocol;
import mujmail.threading.ThreadedEmails;
//#ifdef MUJMAIL_DEBUG_CONSOLE
import mujmail.debug.DebugConsole;
//#endif
//#ifdef MUJMAIL_TOUCH_SCR
import mujmail.pointer.MujMailPointerEventListener;
import mujmail.pointer.MujMailPointerEventProducer;
//#endif

/**
 * Represents boxes: see Inbox, Outbox, ...
 * 
 * Each message is stored in the container and RMS database of one persistent box.
 * Moreover, it can be stored in the container of more Nonpersistent boxes.
 * See documentation of PersistentBox and UnpersistentBox for more details.
 * 
 * It displays the box. That is, it displays headers of mails in the box (paint()) and
 * it displays the progress bar (paintProgress(), report())
 */
public abstract class TheBox extends Canvas implements CommandListener {
    
    /** Set to true if debug information should be displayed while reporting
     messages using methods report() */
    private static final boolean DEBUG = false;
    
    /** The name of this source file */
    private static final String SOURCE_FILE = "TheBox";
    
    private boolean tickerEnabled = true;

    /** The name of the box that is shown to user */
    private String name;
    
    protected final MujMail mujMail;
    /** Mails in the box. */
    protected IStorage storage;

    int deleted; //counter of mails that are going to be deleted
    /**
     * Index of currently selected message.
     * Even if threading is enabled this number is index to the storage vector
     * (the empty messages are skipped in this index).  
     */
    int cur; //the currently selected mail
    /**
     * This number indicates the number of empty message before {@link #cur}
     * index. It's used when showing index of the message in box.
     */
    int empties;
    byte pageJump; //offset of the next page from the current page of email list
    Image imNormal, imDeleted, imRead, imAnswered, imSent, imFailedSent, imAttch, imFlagged, imRoot;
    public Command stop, exit, delete, deleteNow, viewMessage, empty, sort, seen,
            flagged, showHeader;
    boolean btnsHidden = false; //are some buttons hidden?	
    String activity = "";

    //represents sort mode of the box. 
    //the most right bit represents sort order, the other 3bits represents sort criteria
    //the meaning of criterion bits are defined in Functions.SRT_HDR_*
    //private byte sortMode;

    private Ordering ordering;
    private Criterion criterion;

    /** Item used for text rotating (shifting if too long) */
    Timer tickerTimer;
    short tIndex; //aindex is substring index of the tText, from where the ticker should begin			
    boolean tStarted; //indicates whether the ticker has been initiated
    String tText;//a text of the ticker
    int tY; //y-position of the ticker

    private final EventListener eventListener = new EventListener();
    //#ifdef MUJMAIL_TOUCH_SCR
    private final MujMailPointerEventProducer pointerEventTransformer;
    //#endif

    /** Used to paint something below header details. */
    protected MessagePartPainter belowHeaderDetailsPainter;
    /** Used to paint header details. */
    protected MessagePartPainter headerDetailsPainter;

    protected MujMail getMujMail() {
        if (mujMail == null) {
            System.out.println("mujmail is null");
        }
        return MujMail.mujmail;
    }

    /**
     * Increments the number of deleted messages in this box.
     */
    public void incDeleted() {
        deleted++;
    }

    /**
     * @return the ordering
     */
    public Ordering getOrdering() {
        return ordering;
    }

    public void setOrdering(Ordering ordering) {
        this.ordering = ordering;
    }

    /**
     * @return the criterion
     */
    public Criterion getCriterion() {
        return criterion;
    }

    public void setCriterion(Criterion criterion) {
        this.criterion = criterion;
    }

    public IStorage getStorage() {
        return storage;
    }

    public void setStorage(ThreadedEmails storage) {
        //#ifdef MUJMAIL_DEBUG_CONSOLE
        DebugConsole.println("Setting storage " + storage);
        if (storage == null) {
            DebugConsole.println("Setting storage is null");
            return;
        }
        //#endif
        if ( DEBUG && storage != null ) {
              System.out.println("DEBUG InBox.setStorage(ThreadedEmails) - new storage size: " + (storage == null?"":Integer.toString( storage.getSize()) ) );
              System.out.println("DEBUG InBox.setStorage(ThreadedEmails) - new storage: " );
              //#ifdef MUJMAIL_DEVELOPMENT
//#               ((ThreadedEmails)storage).printToConsole();
              //#endif
          }
          
        this.storage = storage;
    }

    private class Ticker extends TimerTask {

        public void run() {
            tStarted = true;
            if (isBusy()) {
                return;
            }
            repaint(); //we just repaint the needed part not whole screen			
        }
    }

    /**
     * Creates the box.
     * 
     * @param mMail 		the main object in the application
     * @param name 			the name of the box
     * @param searchable 	true if the box should be searchable
     */
    public TheBox(MujMail mMail, String name) {
        
        setBelowHeaderDetailsPainter();
        setHeaderDetailsPainter();
        
        this.name = name;
        mujMail = mMail;
        //storage = new Vector();
        storage = new ThreadedEmails();
        imNormal = Functions.getIcon("m_normal.png");
        imDeleted = Functions.getIcon("m_deleted.png");
        imRead = Functions.getIcon("m_opened.png");
        imAnswered = Functions.getIcon("m_answered.png");
        imSent = Functions.getIcon("m_sent.png");
        imFailedSent = Functions.getIcon("m_failed_send.png");
        imAttch = Functions.getIcon("m_attachment.png");
        imFlagged = Functions.getIcon("m_flagged.png");
        imRoot = Functions.getIcon( "m_root.png" );

        exit = new Command(Lang.get(Lang.BTN_BACK), Command.BACK, 0);
        viewMessage = new Command(Lang.get(Lang.BTN_TB_VIEW_MESS), Command.OK, 1);
        stop = new Command(Lang.get(Lang.BTN_TB_STOP), Command.STOP, 2);
        delete = new Command(Lang.get(Lang.BTN_DEL_UNDEL), Command.ITEM, 4);
        deleteNow = new Command(Lang.get(Lang.BTN_TB_DEL_NOW), Command.ITEM, 5);
        empty = new Command(Lang.get(Lang.BTN_CLEAR), Command.ITEM, 7);
        sort = new Command(Lang.get(Lang.BTN_TB_SORT), Command.ITEM, 9);
        seen = new Command(Lang.get(Lang.BTN_TB_MARK_SEEN), Command.ITEM, 6);
        flagged = new Command(Lang.get(Lang.BTN_TB_MARK_FLAGGED), Command.ITEM, 10);
        showHeader = new Command(Lang.get(Lang.BTN_MF_HEADERS_DETAILS), Command.ITEM, 11);
        addCommand(sort);
        addCommand(deleteNow);
        addCommand(viewMessage);
        addCommand(exit);
        addCommand(delete);
        addCommand(empty);
        addCommand(seen);
        addCommand(flagged);
        addCommand(showHeader);
        setCommandListener(this);
        
        //#ifdef MUJMAIL_TOUCH_SCR
        pointerEventTransformer = new MujMailPointerEventProducer(eventListener, getWidth(), getHeight());
        //#endif

          // TODO (Betlista): this shouldn't be here (my opinion, I think it should be loaded or something)
        this.ordering = Ordering.NATURAL;
        this.criterion = Criterion.TIME;
    }

    public void commandAction(Command c, Displayable d) {
          if (DEBUG) System.out.println( "DEBUG TheBox.commandAction(Command, Displayable)  - displayable: " + d.getClass().toString() );
        standardButtons(c);
    }

    /// Manages standard command actions of the boxes
    private void standardButtons(Command c) {
        if (c == viewMessage) {
            MujMail.mujmail.mailForm.viewMessage(getSelectedHeader(), this);
        } else if (c == exit) {
            exit();
        } else if (c == delete) {
            markAsDeleted(getSelectedHeader());
        } else if (c == deleteNow) {
            deleteMarkedFromBoxAndDB();
        } else if (c == seen) {
        	markSeen(getSelectedHeader());
        } else if (c == flagged) {
        	markFlagged(getSelectedHeader());
        } else if (c == empty) {
            deleteAllMailsFromBoxAndDB(false);
        } else if (c == sort) {
            MujMail.mujmail.getSettings().showSortFrm(this);
        } else if (c == showHeader) {
              if (DEBUG) System.out.println( "DEBUG TheBox.standardButtons() - c == showHeader" );
            MujMail.mujmail.mailForm.showHeader(getSelectedHeader(), this);
        }

    }

    

    public String toString() {
        return name;
    }
    
    /**
     * Gets the enumeration of all messages in this box.
     * @return the enumeration of all messages in this box
     */
    public Enumeration getMessages() {
        return storage.getEnumeration();
    }
    
    /**
     * @return gets box name
     */
    public final String getName() {
        return name;
    }
    
    /** 
     * Changes name of the box.
     * @param newName Name to set.
     */
    public void setName(String newName) {
        if (newName != null) {
            name = newName;
        }
    }
    
    /**
     * Gets number of messages in this box.
     * If threading is enabled it returns number of messages without empty root
     * messages.
     * 
     * @return the number of messages.
     */
    public int getMessageCount() {
    	final int storageSize = storage.getSize();
    	int emptyRootsNumber = 0;
    	if ( storage instanceof ThreadedEmails ) {
    		emptyRootsNumber = ((ThreadedEmails)storage).getEmptyRootsNumber();
    	}
        return storageSize - emptyRootsNumber;
    }

    // TODO (Betlista): why there are 2 methods for retrieving messages? (storageAt(int), getMessage(int) ) 
    /*
     * Return i-th message in storage.
     * 
     * @param index of the message to be retrieved
     * @return message for requested index or null if there is not message with such index
     */
//    public MessageHeader storageAt(int index) {
//        if (index >= storage.size() || index < 0) {
//            return null;
//        }
//        return (MessageHeader) storage.elementAt(index);
//    }

    /**
     * Return i-th message in storage.
     * 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品天美传媒| 亚洲免费看黄网站| 91啪九色porn原创视频在线观看| 亚洲最色的网站| 久久亚洲捆绑美女| 欧美日韩一区三区四区| 高清不卡在线观看av| 亚洲与欧洲av电影| 国产精品美女www爽爽爽| 欧美一区二区三区思思人| 成人一区二区视频| 久久66热偷产精品| 偷偷要91色婷婷| 亚洲男人都懂的| 欧美激情自拍偷拍| 精品久久久影院| 欧美精品乱人伦久久久久久| 97精品国产露脸对白| 精品无人区卡一卡二卡三乱码免费卡| 一区二区三区久久| 国产精品卡一卡二| 久久久99久久精品欧美| 欧美变态口味重另类| 69精品人人人人| 色婷婷综合中文久久一本| 国产 欧美在线| 激情综合网激情| 美腿丝袜亚洲一区| 肉色丝袜一区二区| 午夜精品一区二区三区三上悠亚| 中文字幕欧美一| 国产精品热久久久久夜色精品三区| 日韩欧美国产一区二区在线播放| 欧美丝袜丝交足nylons| 91色综合久久久久婷婷| 99久久精品国产导航| 国产成人精品www牛牛影视| 狠狠色综合播放一区二区| 捆绑变态av一区二区三区| 热久久国产精品| 五月天激情综合| 亚洲国产日韩综合久久精品| 玉足女爽爽91| 亚洲一卡二卡三卡四卡| 午夜精品福利一区二区三区蜜桃| 亚洲午夜免费视频| 亚洲高清免费观看高清完整版在线观看| 亚洲精品va在线观看| 亚洲免费毛片网站| 性做久久久久久| 天天影视涩香欲综合网| 日本不卡一区二区三区| 麻豆专区一区二区三区四区五区| 秋霞午夜av一区二区三区| 老司机精品视频线观看86 | 久久精品国产精品亚洲综合| 奇米在线7777在线精品| 久久精品国产99| 国产一区二区在线免费观看| 国产高清在线观看免费不卡| 成人午夜又粗又硬又大| 91影院在线观看| 欧美日韩免费在线视频| 日韩欧美一区二区不卡| 国产亚洲一区二区三区| 亚洲色图都市小说| 亚洲成av人片在www色猫咪| 美腿丝袜一区二区三区| 国产成人免费视频网站| 色婷婷综合五月| 欧美一区二区成人| 国产拍欧美日韩视频二区| 亚洲伦理在线精品| 日日夜夜免费精品视频| 国产精品中文字幕一区二区三区| 丁香亚洲综合激情啪啪综合| 色吊一区二区三区| 欧美电影精品一区二区| 中文字幕亚洲区| 三级在线观看一区二区| 国产精品亚洲综合一区在线观看| 91在线你懂得| 日韩欧美国产高清| 中文字幕一区二区三区在线播放 | 日日摸夜夜添夜夜添国产精品| 免费在线成人网| 成人动漫一区二区| 91麻豆精品国产自产在线| 久久精品欧美日韩精品| 亚洲一区二区av在线| 国产另类ts人妖一区二区| 91国产精品成人| 久久久久国产精品麻豆ai换脸| 亚洲综合在线免费观看| 国产一区久久久| 欧美日韩高清影院| 国产精品素人视频| 日本va欧美va瓶| 在线观看日韩电影| 国产女人18水真多18精品一级做| 一区二区三区四区精品在线视频| 免费成人在线播放| 在线观看亚洲专区| 中文av字幕一区| 韩国一区二区三区| 欧美丰满少妇xxxxx高潮对白| 中日韩av电影| 国产一区欧美一区| 欧美大片日本大片免费观看| 一区二区三区欧美视频| 高清不卡在线观看| 久久久夜色精品亚洲| 日韩极品在线观看| 日本高清成人免费播放| 国产精品色哟哟网站| 精品一区二区在线观看| 欧美日本精品一区二区三区| 国产精品久久久久久久蜜臀| 精品一区中文字幕| 欧美日韩精品一区二区天天拍小说 | 国产精品视频一二| 韩日精品视频一区| 日韩一区二区高清| 日本欧美一区二区在线观看| 欧美中文字幕一区二区三区| 国产精品九色蝌蚪自拍| 国产麻豆91精品| 精品国产免费人成在线观看| 日韩高清不卡在线| 制服丝袜亚洲网站| 日韩—二三区免费观看av| 欧美三日本三级三级在线播放| 一区视频在线播放| 99免费精品视频| 亚洲欧洲国产日本综合| 国产91综合网| 国产精品青草久久| 不卡免费追剧大全电视剧网站| 国产日韩三级在线| 国产精品一线二线三线| 久久久国际精品| 国产91精品露脸国语对白| 欧美精品一区二区三区蜜臀 | 91国偷自产一区二区使用方法| 中文字幕在线一区二区三区| 岛国一区二区在线观看| 国产精品系列在线| 91视频免费看| 亚洲国产视频在线| 日韩精品一区二区三区中文不卡 | 亚洲高清免费视频| 777午夜精品视频在线播放| 奇米精品一区二区三区四区| 日韩欧美国产成人一区二区| 国产最新精品精品你懂的| 久久精品水蜜桃av综合天堂| 福利一区二区在线观看| 亚洲欧洲无码一区二区三区| 色综合一区二区三区| 亚洲电影一区二区| 日韩精品一区二区在线| 大美女一区二区三区| 亚洲精品中文在线影院| 6080日韩午夜伦伦午夜伦| 久久精品国产99国产精品| 国产精品系列在线| 欧美日韩一区成人| 久久66热偷产精品| 亚洲欧美另类图片小说| 欧美日韩情趣电影| 国产精品66部| 亚洲一区二区欧美| 26uuu精品一区二区| 99精品欧美一区| 日韩黄色免费电影| 亚洲国产精品av| 精品视频一区二区不卡| 狠狠色狠狠色综合日日91app| 日本一区二区高清| 欧美日韩国产高清一区二区 | 亚洲色图制服诱惑| 日韩一卡二卡三卡四卡| 处破女av一区二区| 日韩精品成人一区二区在线| 国产精品视频你懂的| 欧美一区二区免费观在线| 丰满亚洲少妇av| 三级欧美在线一区| 国产精品成人在线观看| 91麻豆精品国产91久久久久| 国产91精品在线观看| 亚洲图片自拍偷拍| 国产精品女同一区二区三区| 91精品免费在线观看| 一本一道久久a久久精品| 久久99精品久久久久| 亚洲福利一二三区| 国产精品乱码久久久久久| 精品国产一二三区| 欧美丝袜自拍制服另类|