⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xeventbuilder.java

📁 一款即时通讯软件
💻 JAVA
字号:
/*
 *   License
 *
 * The contents of this file are subject to the Jabber Open Source License
 * Version 1.0 (the "License").  You may not copy or use this file, in either
 * source code or executable form, except in compliance with the License.  You
 * may obtain a copy of the License at http://www.jabber.com/license/ or at
 * http://www.opensource.org/.  
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 *   Copyrights
 *
 * Portions created by or assigned to Jabber.com, Inc. are 
 * Copyright (c) 2000 Jabber.com, Inc.  All Rights Reserved.  Contact
 * information for Jabber.com, Inc. is available at http://www.jabber.com/.
 *
 * Portions Copyright (c) 1999-2000 David Waite 
 *
 *   Acknowledgements
 * 
 * Special thanks to the Jabber Open Source Contributors for their
 * suggestions and support of Jabber.
 * 
 *   Changes
 *
 * @author  David Waite <a href="mailto:dwaite@jabber.com">
 *                      <i>&lt;dwaite@jabber.com&gt;</i></a>
 *
 * @author  $Author: chris $
 * @version $Revision: 1.1 $
 *
 * j.komzak
 * Changed into XEventBuilder
 */

package edu.ou.kmi.buddyspace.xml;

/*
 * XEventBuilder.java
 *
 * Project: BuddySpace
 * (C) Copyright Knowledge Media Institute 2003
 *
 *
 * Created on 22 October 2003, 11:35
 */

import java.util.Vector;
import org.jabber.jabberbeans.*;
import org.jabber.jabberbeans.Extension.*;

/**
 * <code>XEventBuilder</code> is used to construct XEvent objects
 *
 * @author  Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
 */
public class XEventBuilder
    implements ExtensionBuilder
{
    /** offline */
    private boolean offline = false;
    /** delivered */
    private boolean delivered = false;
    /** composing */
    private boolean composing = false;
    /** displayed */
    private boolean displayed = false;
    /** id */
    private String id = null;
    
    /** Creates a new <code>XEventBuilder</code> instance. */
    public XEventBuilder()
    { reset(); }
    
    /**
     * <code>reset</code> the builder to a default state, so it can be reused.
     */
    public void reset() {
        offline = false;
        composing = false;
        delivered = false;
        displayed = false;
        id = null;
    }
    
    /**
     * returns if the offline flag is present.
     */
    public boolean isOffline() {
        return offline;
    }
    
    /**
     * sets if the offline flag is present.
     */
    public void setIsOffline(boolean newIsOffline) {
        offline = newIsOffline;
    }
    
    
    /**
     * returns if the delivered flag is present.
     */
    public boolean isDelivered() {
        return delivered;
    }
    
    /**
     * sets if the delivered flag is present.
     */
    public void setIsDelivered(boolean newIsDelivered) {
        delivered = newIsDelivered;
    }
    
    
    /**
     * returns if the displayed flag is present.
     */
    public boolean isDisplayed() {
        return displayed;
    }
    
    /**
     * sets if the displayed flag is present.
     */
    public void setIsDisplayed(boolean newIsDisplayed) {
        displayed = newIsDisplayed;
    }
    
    
    /**
     * returns if the composing flag is present.
     */
    public boolean isComposing() {
        return composing;
    }
    
    /**
     * sets if the composing flag is present.
     */
    public void setIsComposing(boolean newIsComposing) {
        composing = newIsComposing;
    }
    
    
    /**
     * returns the id in the object.
     */
    public String getID() {
        return id;
    }
    
    /**
     * sets the id.
     */
    public void setID(String newID) {
        id = newID;
    }
    

    /**
     * <code>build</code> a new XEvent object
     *
     * @return an <code>Extension</code> value
     * @exception InstantiationException if insufficient or incorrect data
     * was proviced.
     */
    public Extension build()
        throws InstantiationException
    { return new XEvent(this); }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -