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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? thebox.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
     * @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 getMessageHeaderAt(int index) {
        return storage.getMessageAt( index );
    }

    public MessageHeader getSelectedHeader() {
//        return storageAt(getSelectedIndex());
        return getMessageHeaderAt( getSelectedIndex() );
    }

    /**
     * Indicates whether there proceeds some action beyond the mails in this
     * box.
     * @return true if there proceeds some action beyond the mails int this
     * box
     * 
     * TODO: this is now used only for canceling ticker. Refactor!
     */
    protected boolean isBusy() {
        return false;
    }
    
    /**
     * Displays report message which has originated because of some exception.
     * 
     * @param report message which to display. If it ends with '+' it will
     *  be just printed to the standard output, if it ends with '*', the focus
     *  will be returned back after displaying the message.
     * @param sourceFile the source file where the message which is reported
     *  was originated
     * @param ex the exception because of the message is reported
     */
    public void report(String report, String sourceFile, Exception ex) {
        if (DEBUG) {
            ex.printStackTrace();
        }
        
        report(report, sourceFile);
    }
    
    /**
     * Stores mail to this box. 
     * If this box is persistent, makes the copy of given mail and stores it to
     * the RMS database and container of this box.
     * If this box is not persistent, stores the mail only to the container of
     * this box and does not make a copy.
     * @param header the mail to be stored
     * @return the mail that was stored (in case of persistent box, this is the
     *  copy of mail in parameter)
     */
    public abstract MessageHeader storeMail(MessageHeader header);

    /**
     * Displays report message.
     * 
     * @param report message which to display. If it ends with '+' it will
     *  be just printed to the standard output, if it ends with '*', the focus
     *  will be returned back after displaying the message.
     * @param sourceFile the source file where the message which is reported
     *  was originated
     */
    public synchronized void report(String report, String sourceFile) {
          if (DEBUG) System.out.println("DEBUG " + sourceFile + " - " + report);
        //return;
        if (report.startsWith("+")) //not important messages
        {
            return;
        }
        Displayable display;
        activity = report;

        if (report.endsWith("*")) //then we need to get back the focus afted displaying an alert
        {
            display = this;
        } else {
            display = null;
        }

        if (report.startsWith("100:")) {
            getMujMail().alert.setAlert(this, display, report.substring(4), MyAlert.DEFAULT, AlertType.ERROR);
        } else if (report.startsWith("200:")) {
            getMujMail().alert.setAlert(this, display, report.substring(4), MyAlert.DEFAULT, AlertType.WARNING);
        } else if (report.startsWith("300:")) {
            getMujMail().alert.setAlert(this, display, report.substring(4), MyAlert.DEFAULT, AlertType.INFO);
        }

        repaint();

        if (report.startsWith("*")) { //important message
            Functions.sleep(1500);
        }
    }

    /**
     * Set the information that will be displayed on the progress bar.
     * Note, that progress bar will be displayed only if isBusy() returns true.
     *
     * TODO: replace by tasks
     * 
     * @param activity the message displayed on the progress bar
     *  if it starts with *, this thread will be 500 milliseconds sleep
     * @param max the number of time units when the activity will be finished
     * @param actual actual number of time units
     */
    private synchronized void setProgress(String activity, int max, int actual) {
        this.activity = activity;
        repaint();

        if (activity.startsWith("*")) {
            Functions.sleep(500);
        }
    }

    public void markAsDeleted(MessageHeader message) {
        if (message != null) {
            if (message.deleted) //was it marked as deleted?
            {
                --deleted;
            } //decrease the counter for marked mails
            else {
                ++deleted;
            }
            message.deleted = !message.deleted; //change its state

            /*
            MailAccount msgAcct = (MailAccount)this.getMujMail().mailAccounts.get(message.accountID);
            
            //Set '\Deleted' flag on server if it's an IMAP account
            if (msgAcct.type == MailAccount.IMAP)
            {
            	msgAcct.protocol.setFlags(message, "(\\Deleted)");
            }
            */

            shiftSelectedIndex(true);

            repaint();
        }
    }

    /**
     * Marks a given message as Seen/Unseen depending on the current flag.
     * In case the message's account is of type IMAP4, command to update
     * IMAP server is send too.
     * @param message		Message to mark as Seen/Unseen
     */
    public void markSeen(MessageHeader message) {
        MailAccount msgAcct = (MailAccount)this.getMujMail().getMailAccounts().get(message.getAccountID());

    	if (message.readStatus == MessageHeader.READ)
    	{
    		message.readStatus = MessageHeader.NOT_READ;
            //Unset '\Seen' flag on server if it's an IMAP account
            if (msgAcct != null && msgAcct.isIMAP())
            {
            	msgAcct.getProtocol().setFlags(message, "(\\Seen)", InProtocol.REMOVE_FLAGS, this);
            }    	
    	}
    	else
    	{
    		message.readStatus = MessageHeader.READ;
            //Set '\Seen' flag on server if it's an IMAP account
            if (msgAcct != null && msgAcct.isIMAP())
            {
            	msgAcct.getProtocol().setFlags(message, "(\\Seen)", InProtocol.SET_FLAGS, this);
            }    	
    	}
    	
    	try {
            // msgAcct.getProtocol().getBox().mailDB.saveHeader(message); // Alf: Why so complicated??
            message.getBox().getMailDB().saveHeader(message);
        } catch (MyException e) {
            MujMail.mujmail.alert.setAlert("Error saving message header", AlertType.ERROR);
        }
        
        repaint();
    }

    /**
     * Marks a given message as Seen/Unseen depending on the current flag.
     * In case the message's account is of type IMAP4, command to update
     * IMAP server is send too.
     * @param message		Message to mark as Seen/Unseen
     */
    public void markFlagged(MessageHeader message) {
        MailAccount msgAcct = (MailAccount)this.getMujMail().getMailAccounts().get(message.getAccountID());
    	if (message.flagged)
    	{
    		message.flagged = false;
            //Unset '\Flagged' flag on server if it's an IMAP account
            if (msgAcct != null && msgAcct.isIMAP())
            {
            	msgAcct.getProtocol().setFlags(message, "(\\Flagged)", InProtocol.REMOVE_FLAGS, this);
            }
    	}
    	else
    	{
    		message.flagged = true;
            //Set '\Flagged' flag on server if it's an IMAP account
            if (msgAcct != null && msgAcct.isIMAP())
            {
            	msgAcct.getProtocol().setFlags(message, "(\\Flagged)", InProtocol.SET_FLAGS, this);
            }
    	}

    	try {
            //  msgAcct.getProtocol().getBox().mailDB.saveHeader(message);
            message.getBox().getMailDB().saveHeader(message);
    	} catch (MyException e) {
            MujMail.mujmail.alert.setAlert("Error saving message header", AlertType.ERROR);
    	}
    	
    	repaint();
    }

    /**
     * Do the work of deleting all mails from database. Called by 
     * deleteAllMailsFromBoxAndDB(boolean).
     * If the box is Persistent, should delete all mails from database of this
     * persistent box.
     * If the box is Unpersistent, should delete also messages from containers
     * of boxes to which stored mails belong.
     */
    protected abstract void deleteAllMailsFromDB();
    
    public void exit() {
        getMujMail().mainMenu();
    }
    
    /**
     * Returns true if this box is empty.
     * @return true if this box is empty.
     */
    public boolean isEmpty() {
        return storage.isEmpty();
    }
    
    /**
     * Deletes all mails in this storage from this storage and from database.
     * Note that this storage does not store any mails so the mails will be
     * deleted from databases of other boxes.
     * 
     * @param sure if it is true, deletes mails in spite of the box is busy and
     *  don't ask user.
     */
    public void deleteAllMailsFromBoxAndDB(boolean sure) {
        if (!sure) {
            if (isBusy()) {
                getMujMail().alert.setAlert(this, this, Lang.get(Lang.ALRT_SYS_BUSY), MyAlert.DEFAULT, AlertType.INFO);
            } else {
                getMujMail().alert.setAlert(this, this, Lang.get(Lang.ALRT_SYS_DEL_ALL_CONFIRM), MyAlert.DB_CLEAR_CONFIRM, AlertType.CONFIRMATION);
            }
            return;
        }
        
        deleteAllMailsFromDB();
        
        synchronized (storage) {
            storage.removeAllMessages();
        }
        
        deleted = 0;
        cur = 0;
        repaint();
    }
    
    /**
     * Immediately deletes given message.
     * @param message the message to be deleted
     * @param  trashMode describes the storing of deleted mail to trash
     */
    public void deleteNowFromBoxAndDB(MessageHeader message, 
            Trash.TrashModes trashMode) {
        message.deleteFromDBAndBox(this, trashMode);
        cur = 0;
        repaint();
    }
    
    /**
     * Do the physical work of deleting marked mails from box and database.
     * Called by deleteMarkedFromBoxAndDB().
     */
    protected abstract void doDeleteMarkedFromBoxAndDB();

    /**
     * Do batch deleteFromDBAndBox of all messages marked as deleted.
     */
    public void deleteMarkedFromBoxAndDB() {
        if (deleted > 0) {
            cancelTicker();
            doDeleteMarkedFromBoxAndDB();
            cur = 0;
            
            repaint();
        }
    }

    protected void cancelTicker() {
        if (tickerTimer != null) {
            tickerTimer.cancel();
            tickerTimer = null;
            tIndex = 0;
            tStarted = false;
        }
    }
    
    /** Shows Box on foreground of display */
    void showBox() {
        mujMail.getDisplay().setCurrent(this);
    }

    /**
     * Cancels ticker and disables running of ticker.
     */
    public void disableTicker() {
        cancelTicker();
        tickerEnabled = false;
    }
    
    /**
     * Enables running of ticker.
     */
    public void enableTicker() {
        tickerEnabled = true;
    }

    public int getSelectedIndex() {
        cancelTicker();
        return cur;
    }

    /**
     * Moves the current index (depends on direction) and returns new current
     * index. It works as cyclic list (from last item it's moved to the first).
     * 
     * @param cur current position
     * @param direction where to move, <code>true</code> moves down (+1)
     * @return new index to current item
     */
    private int moveCurrent( final int cur, final boolean direction ) {
          if (DEBUG) System.out.println( "DEBUG TheBox.moveCurrent(cur=" + cur + ", direction=" + direction + ")" );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本在线不卡一区| 91.xcao| 欧美丝袜自拍制服另类| 26uuu亚洲| 亚洲黄色免费网站| 精品一区二区三区免费观看| 成人av电影免费观看| 日韩欧美的一区| 一区二区三区在线播| 国产精品一区二区在线观看网站| 欧美午夜电影一区| 综合久久久久久| 国产电影一区在线| 精品日韩成人av| 亚洲在线视频网站| 91在线精品一区二区| 国产亚洲欧美激情| 麻豆视频一区二区| 91精品国产综合久久精品图片| 樱桃国产成人精品视频| 成人动漫av在线| 欧美激情资源网| 国产乱理伦片在线观看夜一区| 日韩欧美中文字幕公布| 亚洲国产人成综合网站| 91麻豆免费看片| 亚洲天堂福利av| aa级大片欧美| 亚洲少妇中出一区| fc2成人免费人成在线观看播放 | 中文字幕第一区| 国产一区二区三区av电影| 欧美精品一区二区三区蜜臀| 蜜桃视频一区二区三区| 精品国产一区二区三区忘忧草| 久热成人在线视频| 欧美成人a∨高清免费观看| 久久爱另类一区二区小说| 欧美精品一区二区三区久久久 | 国内外成人在线视频| 日韩欧美资源站| 国产九色sp调教91| 久久久久久久一区| 高潮精品一区videoshd| 中文字幕在线观看不卡| 日本乱人伦aⅴ精品| 亚洲第一福利视频在线| 3atv在线一区二区三区| 捆绑变态av一区二区三区| 2024国产精品| www.欧美.com| 亚洲成av人影院在线观看网| 日韩视频一区二区三区在线播放| 韩国三级在线一区| 中文字幕一区二区在线播放 | 精品久久久久香蕉网| 国产九色精品成人porny| 1024国产精品| 欧美日韩精品免费| 国产精品亚洲成人| 亚洲欧美日韩成人高清在线一区| 欧美吞精做爰啪啪高潮| 精品中文字幕一区二区 | 精品奇米国产一区二区三区| 成人一区二区三区视频在线观看| 亚洲欧洲日韩女同| 欧美一区二区三区免费在线看| 韩国一区二区三区| 一区二区三区四区乱视频| 欧美一区二区三区不卡| 成人av在线观| 蜜臀av一区二区在线观看| 欧美国产一区在线| 在线电影欧美成精品| 成人性生交大片免费看中文 | 国内一区二区视频| 一区二区三区中文字幕精品精品 | 69p69国产精品| 不卡一区二区中文字幕| 日韩av在线播放中文字幕| 中文字幕二三区不卡| 日韩精品一区二| 色婷婷亚洲精品| 国产成人av资源| 日韩av中文字幕一区二区三区 | 91在线视频18| 黄色小说综合网站| 亚洲成人av一区二区| 国产精品国产三级国产三级人妇 | 亚洲欧美日韩久久精品| 26uuu国产在线精品一区二区| 91福利国产成人精品照片| 懂色一区二区三区免费观看| 日韩精品一级中文字幕精品视频免费观看 | 欧美色视频在线| 粉嫩蜜臀av国产精品网站| 麻豆精品在线播放| 亚洲二区在线观看| 亚洲欧美日韩一区二区| 国产色综合一区| 日韩欧美一区电影| 欧美肥妇bbw| 777午夜精品免费视频| 色综合色狠狠天天综合色| 丁香桃色午夜亚洲一区二区三区| 免费人成精品欧美精品| 午夜视频一区二区三区| 亚洲一区二区三区视频在线| 成人欧美一区二区三区黑人麻豆 | 精品剧情在线观看| 日韩美女主播在线视频一区二区三区 | 国产乱码精品一区二区三区av | 欧美日韩美女一区二区| 色88888久久久久久影院按摩| 91视频在线看| 91一区二区在线观看| 91小宝寻花一区二区三区| 99久久免费视频.com| 99久久777色| 色激情天天射综合网| 色狠狠桃花综合| 欧美日韩www| 欧美一区二区三区四区高清| 欧美成人福利视频| 久久综合网色—综合色88| 久久精品一区二区| 国产欧美精品一区二区色综合朱莉| 国产欧美中文在线| 亚洲欧洲日韩女同| 亚州成人在线电影| 日本少妇一区二区| 国产呦萝稀缺另类资源| 国产成人在线视频播放| 成年人网站91| 欧美日韩在线三区| 日韩免费观看高清完整版| 国产午夜精品久久久久久久 | 欧美韩国日本综合| 亚洲美女视频在线观看| 亚洲成av人片一区二区梦乃| 久久成人av少妇免费| 成人av午夜电影| 在线免费不卡视频| 日韩视频免费直播| 国产精品久久久久久久蜜臀 | 亚洲欧美激情小说另类| 午夜精品久久久久久久99樱桃| 免费在线视频一区| 成人激情免费视频| 在线不卡免费欧美| 国产午夜久久久久| 亚洲成人免费影院| 国产精品影视网| 欧美在线视频你懂得| 日韩免费视频一区二区| 亚洲另类色综合网站| 蜜臀av亚洲一区中文字幕| 91影视在线播放| 亚洲一区二区视频在线观看| 午夜精品久久久久久久久久| 成熟亚洲日本毛茸茸凸凹| 在线播放国产精品二区一二区四区 | 欧美午夜精品一区二区蜜桃| 久久亚洲春色中文字幕久久久| 亚洲精品国久久99热| 国产一区激情在线| 欧美日韩国产一级| 亚洲欧洲制服丝袜| 国产精选一区二区三区| 56国语精品自产拍在线观看| 国产精品私人影院| 久色婷婷小香蕉久久| 欧美男人的天堂一二区| 自拍偷拍欧美精品| 国产成人免费网站| 日韩小视频在线观看专区| 一区二区视频免费在线观看| 国产成人免费视频网站高清观看视频| 欧美日韩中文一区| 亚洲男人都懂的| 成人激情动漫在线观看| 久久奇米777| 精品一区二区三区不卡| 91精品一区二区三区久久久久久 | 久久精品人人做人人综合 | 精品国产精品网麻豆系列| 亚洲在线视频一区| 日本韩国欧美三级| 亚洲欧洲中文日韩久久av乱码| 国产高清精品在线| 精品国产精品一区二区夜夜嗨| 免费观看日韩av| 在线不卡a资源高清| 日韩avvvv在线播放| 欧美人体做爰大胆视频| 亚洲一区二区三区小说| 在线观看日韩精品| 亚洲成人激情社区| 欧美精品久久一区二区三区| 亚洲国产aⅴ天堂久久|