<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    何以解憂?唯有Java

    其實程序員也懂得浪漫!
    posts - 90, comments - 637, trackbacks - 0, articles - 2
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
          今天試著翻譯了一點SwingApplicationFramework 的其中一個源代碼的注釋,感覺翻譯的不怎么樣(這是我第一次翻譯API)。現(xiàn)在把它貼出來,大家看看,希望大家能夠給點意見,批評指正一下,有什么翻譯不妥的地方盡管提出來,好讓我改進改進,先謝謝了!

    下面是部分代碼注釋的翻譯:

    package org.jdesktop.application;

    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.beans.PropertyChangeSupport;
    import javax.swing.SwingUtilities;


    /**
     *
     * An encapsulation of the PropertyChangeSupport methods based on 
     * java.beans.PropertyChangeSupport.PropertyChangeListeners are fired
     * on the event dispatching thread.
     
     *中文翻譯:
     *一個封裝的PropertyChangeSupport方法基于java.beans.PropertyChangeSupport
     *當事件調(diào)度線程的時候PropertyChangeListeners將被激活
     * 
     *
     * <p>
     * Note: this class is only public because the so-called "fix"
     * for javadoc bug 
     * <a href="
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4780441">4780441</a>
     * still fails to correctly document public methods inherited from a package
     * private class.  
     * 中文:
     *   提示:這個類只能是public 因為所謂的用來“fix”(修復(fù))javadoc 的bug。
     *  <a href="
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4780441">4780441</a>
     *  仍然不能得體的書寫 public 方法 繼承于私有類包
     
    */
    public class AbstractBean {
        
    private final PropertyChangeSupport pcs;

        
    public AbstractBean() {
        pcs 
    = new EDTPropertyChangeSupport(this);
        }

        
    /**
         * Add a PropertyChangeListener to the listener list.
         * The listener is registered for all properties and its 
         * {
    @code propertyChange} method will run on the event dispatching
         * thread.
         * <p>
         * If {
    @code listener} is null, no exception is thrown and no action
         * is taken.
         * 中文:
         *    添加一個PropertyChangeListener到監(jiān)聽器列表中
         *    監(jiān)聽器為所有的屬性都進行了注冊,并且他的{
    @code propertyChange} 方法將會在
         *    事件調(diào)度線程的時候運行。
         * <p>
         *    如果{
    @code listener} 為空,則不會拋出異常,也不會有動作執(zhí)行(發(fā)生)
         * 
    @param listener the PropertyChangeListener to be added.
         *                  中文:PropertyChangeListener 將會被添加到監(jiān)聽器列表中。
         * 
    @see #removePropertyChangeListener  中文:移除PropertyChangeListener
                  
         * 
    @see java.beans.PropertyChangeSupport#addPropertyChangeListener
         
    */
        
    public void addPropertyChangeListener(PropertyChangeListener listener) {
            pcs.addPropertyChangeListener(listener);
        }
      
        
    /**
         * Remove a PropertyChangeListener from the listener list.
         * 
         * <p>
         * If {
    @code listener} is null, no exception is thrown and no action
         * is taken.
         *
         * 從監(jiān)聽器列表中移除一個PropertyChangeListener
         * 如果{
    @code listener} 為空,則不會拋出異常,也不會有動作執(zhí)行(發(fā)生)
         *
         * 
    @param listener the PropertyChangeListener to be removed.
                           中文:PropertyChangeListener 將會被添加到監(jiān)聽器列表中
         * 
    @see #addPropertyChangeListener  中文:添加事件監(jiān)聽器
         * 
    @see java.beans.PropertyChangeSupport#removePropertyChangeListener
         
    */
        
    public void removePropertyChangeListener(PropertyChangeListener listener) {
            pcs.removePropertyChangeListener(listener);
        }

        
    /**
         * Add a PropertyChangeListener for a specific property.  The listener
         * will be invoked only when a call on firePropertyChange names that
         * specific property.
         * The same listener object may be added more than once.  For each
         * property,  the listener will be invoked the number of times it was added
         * for that property.
         * If <code>propertyName</code> or <code>listener</code> is null, no
         * exception is thrown and no action is taken.
         
         * 中文:為一個具體的屬性添加PropertyChangeListener(屬性變化監(jiān)聽器)。
         *        這個監(jiān)聽器只會在特殊屬性被命名的時候被調(diào)用
         *        同樣的監(jiān)聽器也許會被添加多次。對于不同的屬性,監(jiān)聽器將會被他所監(jiān)聽的屬性調(diào)用多次
         *        如果<code>propertyName</code>或<code>listener</code>為空,則不會拋出異常,
         *        也不會有動作被執(zhí)行(發(fā)生)
         * 
    @param propertyName  The name of the property to listen on. 中文:被監(jiān)聽的屬性名字
         * 
    @param listener  the PropertyChangeListener to be added    中文:PropertyChangeListener將會被添加
         * 
    @see java.beans.PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener)
         
    */
        
    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
            pcs.addPropertyChangeListener(propertyName, listener);
        }

        
    /**
         * Remove a PropertyChangeListener for a specific property.
         * If <code>listener</code> was added more than once to the same event
         * source for the specified property, it will be notified one less time
         * after being removed.
         * If <code>propertyName</code> is null,  no exception is thrown and no
         * action is taken.
         * If <code>listener</code> is null, or was never added for the specified
         * property, no exception is thrown and no action is taken.
         *
           中文:為具體的屬性移除一個PropertyChangeListener。如果<code>listener</code> 
                  被多次的添加的同一個事件源中,它將會在移除的時候一次也不少的被通知到
                  如果<code>propertyName</code> 為空,則則不會拋出異常,
         *        也不會有動作被執(zhí)行(發(fā)生)
                  如果<code>listener</code> 為空或者根本沒有被添加到特定的屬性中,則不會拋出異常,
         *        也不會有動作被執(zhí)行(發(fā)生)
         
         * 
    @param propertyName  The name of the property that was listened on.  中文:被監(jiān)聽的屬性名字
         * 
    @param listener  The PropertyChangeListener to be removed    PropertyChangeListener將被移除
         * 
    @see java.beans.PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener)
         
    */
        
    public synchronized void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
            pcs.removePropertyChangeListener(propertyName, listener);
        }
       …………



    評論

    # re: 翻譯 SwingApplicationFramework API 1.0.3 (一):預(yù)覽(希望多提意見)  回復(fù)  更多評論   

    2008-04-22 22:02 by BeanSoft
    翻譯多了 就好了!呵呵,支持,繼續(xù)!

    # re: 翻譯 SwingApplicationFramework API 1.0.3 (一):預(yù)覽(希望多提意見)  回復(fù)  更多評論   

    2008-04-23 08:49 by 枯寬
    支持,加油,繼續(xù)!!!

    # re: 翻譯 SwingApplicationFramework API 1.0.3 (一):預(yù)覽(希望多提意見)  回復(fù)  更多評論   

    2008-04-23 09:13 by 忘憂結(jié)
    幫博主加油,繼續(xù)努力!

    # re: 翻譯 SwingApplicationFramework API 1.0.3 (一):預(yù)覽(希望多提意見)  回復(fù)  更多評論   

    2008-04-23 13:30 by 日月雨林@gmail.com
    @BeanSoft
    @枯寬
    @忘憂結(jié)

    謝謝你們的支持,我會努力的把她翻譯出來的!

    # re: 翻譯 SwingApplicationFramework API 1.0.3 (一):預(yù)覽(希望多提意見)  回復(fù)  更多評論   

    2008-04-24 11:25 by Java用戶
    奉獻精神要支持

    # re: 翻譯 SwingApplicationFramework API 1.0.3 (一):預(yù)覽(希望多提意見)  回復(fù)  更多評論   

    2008-05-02 11:25 by 天山茗客
    加油,支持你!
    主站蜘蛛池模板: 黄色短视频免费看| 日韩在线视频免费看| 亚洲国产精品成人精品小说| 成人免费午间影院在线观看| 国产免费一区二区三区免费视频 | 超清首页国产亚洲丝袜| 99ee6热久久免费精品6| 亚洲AV日韩AV永久无码色欲| 国产成人精品日本亚洲专区61 | 69av免费观看| 色噜噜狠狠色综合免费视频| 久久久久久久亚洲Av无码| 日韩毛片免费在线观看| 免费无码VA一区二区三区| 国产精品亚洲精品日韩动图| 精品日韩亚洲AV无码一区二区三区 | 亚洲免费在线观看| 亚洲免费人成视频观看| 伊人久久综在合线亚洲91| 天天干在线免费视频| 久久九九AV免费精品| 免费国产a理论片| 亚洲综合校园春色| 亚洲不卡中文字幕无码| 全部免费毛片在线| 在线v片免费观看视频| 免费国产99久久久香蕉| 少妇亚洲免费精品| 97se亚洲国产综合自在线| 亚洲av色影在线| 2048亚洲精品国产| 四虎www成人影院免费观看| 19禁啪啪无遮挡免费网站| 国产午夜不卡AV免费| 污视频网站免费在线观看| 亚洲七久久之综合七久久| 亚洲国产精品张柏芝在线观看 | 亚洲乱码国产乱码精华| 91精品国产亚洲爽啪在线影院 | 在线看片无码永久免费aⅴ| 免费福利网站在线观看|