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

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

?? sparkplug_dev_guide.html.svn-base

?? 開源項目openfire的完整源程序
?? SVN-BASE
?? 第 1 頁 / 共 3 頁
字號:
                if(object instanceof ContactItem){
                    popup.add(sayHelloAction);
                }
            }

            public void poppingDown(JPopupMenu popup) {

            }

            public boolean handleDefaultAction(MouseEvent e) {
                return false;
            }
        });
    }
</pre>
</fieldset>


<h3 id="addChatRoomContextListener">How do I add my own ContextMenu Listener to a ChatRoom</h3>

<ol>
  <li>Implement Plugin.
  <li>Add a ChatRoomListener to the ChatManager.
  <li>Get either the TranscriptWindow or ChatInputEditor from the ChatRoom.
  <li>Add a ContactMenuListener to the ChatArea.
</ol>

<fieldset>

    <legend>Add a ContextMenuListener to a ChatRoom, TranscriptWindow or ChatInputEditor</legend>
<pre class="java">
    private void addContactListenerToChatRoom() {
       // Retrieve a ChatManager from SparkManager
        ChatManager chatManager = SparkManager.getChatManager();

        final ContextMenuListener listener = new ContextMenuListener() {
            public void poppingUp(Object object, JPopupMenu popup) {
                final TranscriptWindow chatWindow = (TranscriptWindow)object;
                Action clearAction = new AbstractAction() {
                    public void actionPerformed(ActionEvent actionEvent) {
                        try {
                            chatWindow.insert("My own text :)");
                        }
                        catch (BadLocationException e) {
                            e.printStackTrace();
                        }
                    }
                };

                clearAction.putValue(Action.NAME, "Insert my own text");
                popup.add(clearAction);
            }

            public void poppingDown(JPopupMenu popup) {

            }

            public boolean handleDefaultAction(MouseEvent e) {
                return false;
            }
        };

        // Add a ChatRoomListener to the ChatManager to allow for notifications
        // when a room is being opened. Note: I will use a ChatRoomListenerAdapter for brevity.
        chatManager.addChatRoomListener(new ChatRoomListenerAdapter() {
            public void chatRoomOpened(ChatRoom room) {
                room.getTranscriptWindow().addContextMenuListener(listener);
            }

            public void chatRoomLeft(ChatRoom room) {
                room.getTranscriptWindow().removeContextMenuListener(listener);
            }
        });
    }
</pre>
</fieldset>

<h3 id="addMenu">How do I add my own Menu to Spark?</h3>

<ol>
  <li>Implement Plugin.
  <li>Retrieve the MainWindow from SparkManager.
  <li>Either create a new Menu or add a MenuItem to one of the pre-existing menus.
</ol>

<fieldset>

    <legend>Add a Menu To Spark</legend>
<pre class="java">
    /**
     * Adds a new menu and child menu item to Spark.
     */
    private void addMenuToSpark(){
        // Retrieve the MainWindow UI from Spark.
        final MainWindow mainWindow = SparkManager.getMainWindow();

        // Create new Menu
        JMenu myPluginMenu = new JMenu("My Plugin Menu");

        // Create Action to test Menu install.
        Action showMessage = new AbstractAction() {
            public void actionPerformed(ActionEvent actionEvent) {
                JOptionPane.showMessageDialog(mainWindow, "Yeah, It works.");
            }
        };

        // Give the menu item a name.
        showMessage.putValue(Action.NAME, "Check if it works");

        // Add to Menu
        myPluginMenu.add(showMessage);

        // Add Menu To Spark
        mainWindow.getJMenuBar().add(myPluginMenu);
    }
</pre>
</fieldset>

<h3 id="addButton">How do I add a button to a Chat Room?</h3>

<ol>
  <li>Implement Plugin.
  <li>Add a ChatRoomListener to ChatManager.
  <li>When the room is opened, add your ChatRoomButton to the ToolBar of the ChatRoom.
</ol>

<fieldset>

    <legend>Add a button to a Chat Room</legend>
<pre class="java">
    /**
     * Adds a button to each Chat Room that is opened.
     */
    private void addChatRoomButton(){
        // Retrieve ChatManager from the SparkManager
        ChatManager chatManager = SparkManager.getChatManager();

        // Create a new ChatRoomButton.
        final ChatRoomButton button = new ChatRoomButton("Push Me");


        // Add to a new ChatRoom when the ChatRoom opens.
        chatManager.addChatRoomListener(new ChatRoomListenerAdapter() {
            public void chatRoomOpened(ChatRoom room) {
                room.getToolBar().addChatRoomButton(button);
            }

            public void chatRoomLeft(ChatRoom room) {
                room.getToolBar().removeChatRoomButton(button);
            }
        });
    }
</pre>
</fieldset>

<h3 id="addSearch">How do I add my own searching feature in Spark like the User Search or Google Search in Firefox?</h3>

<ol>
  <li>Implement Plugin.
  <li>Create a searchable object by implementing the Searchable interface.
  <li>Add the Searchable implementation to the SearchManager.
</ol>

<fieldset>

    <legend>Add a search feature to Spark like User Search or Google Search in Firefox</legend>
<pre class="java">
    /**
     * Called after Spark is loaded to initialize the new plugin.
     */
    public void initialize() {
        // Register new Searchable object "SearchMe" with the SearchManager.
        SearchManager searchManager = SparkManager.getSearchManager();
        searchManager.addSearchService(new SearchMe());
    } 
</pre>
See the SearchMe code below.
<pre class="java"> 
    
package com.jivesoftware.spark.examples;

import com.jivesoftware.spark.search.Searchable;
import com.jivesoftware.spark.SparkManager;
import com.jivesoftware.resource.LaRes;

import javax.swing.Icon;
import javax.swing.JOptionPane;

/**
 * A simple example of how to integrate ones own search into Spark.
 */
public class SearchMe implements Searchable {

    /**
     * The icon to show in the search box.
     * @return the icon.
     */
    public Icon getIcon() {
        return LaRes.getImageIcon(LaRes.SMALL_AGENT_IMAGE);
    }

    /**
     * Returns the name of this search object that is displayed in the drop down box.
     * @return the name.
     */
    public String getName() {
        return &quot;Searches Nothing Really&quot;;
    }

    /**
     * Returns the text that should be displayed in grey when this searchable object
     * is initially selected.
     * @return the text.
     */
    public String getDefaultText() {
        return &quot;Click to search me.&quot;;
    }

    /**
     * Returns the text to display in the tooltip.
     * @return the tooltip text.
     */
    public String getToolTip() {
        return &quot;Shows an example of integrating ones own search into Spark.&quot;;
    }

    /**
     * Is called when a user hits &quot;Enter&quot; key.
     * @param query the query the user is searching for.
     */
    public void search(String query) {
        JOptionPane.showMessageDialog(SparkManager.getMainWindow(), &quot;Nothing Found :(&quot;);
    }
}
</pre>
</fieldset>

<h3 id="interceptFile">How can I intercept a File Transfer request?</h3>

<ol>
  <li>Implement Plugin.
  <li>Implement TransferListener.
  <li>Register your TransferListener.
</ol>

<fieldset>

    <legend>Intercept File Transfer Requests</legend>
<pre class="java">
    /**
     * Listen for incoming transfer requests and either handle them yourself, or pass them
     * off to be handled by the next listener. If no one handles it, then Spark will handle it.
     */
    private void addTransferListener(){

        SparkTransferManager transferManager = SparkManager.getTransferManager();

        transferManager.addTransferListener(new TransferListener() {
            public boolean handleTransfer(FileTransferRequest request) {
                // If I wanted to handle it, take the request, accept it and get the inputstream.
                
                // Otherwise, return false.
                return false;
            }
        });
    }
</pre>
</fieldset>

<h3 id="sendFile">How can I send a file to another user?</h3>

<ol>
  <li>Implement Plugin.
  <li>Get the full jid of the user via the UserManager.
  <li>Get the SparkTransferManager and send the file.
</ol>

<fieldset>

    <legend>Send a file to another user</legend>
<pre class="java">
    /**
     * Sends a file to a user in your ContactList.
     */
    private void sendFile(){
        // Retrieve SparkTransferManager from the SparkManager.
        SparkTransferManager transferManager = SparkManager.getTransferManager();

        // In order to send a file to a person, you will need to know their full Jabber
        // ID.

        // Retrieve the Jabber ID for a user via the UserManager. This can
        // return null if the user is not in the ContactList or is offline.
        UserManager userManager = SparkManager.getUserManager();
        String jid = userManager.getJIDFromNickname("Matt");
        if(jid != null){
            transferManager.sendFile(new File("MyFile.txt"), jid);
        }
    }
</pre>
</fieldset>

<h3 id="contactUI">How can I control the UI and event handling of a ContactItem?</h3>

<ol>
  <li>Implement Plugin.
  <li>Get the ContactList.
  <li>Get a ContactItem(s) based on a user's jid.
  <li>Add your own ContactItemHandler to the ContactItem.
</ol>

<fieldset>

    <legend>Control the UI and event handling of a ContactItem</legend>
<pre class="java">
    /**
     * Controls the UI of a ContactItem.
     */
    private void handleUIAndEventsOfContactItem(){

        ContactList contactList = SparkManager.getWorkspace().getContactList();

        ContactItem item = contactList.getContactItemByJID("paul@jivesoftware.com/spark");

        ContactItemHandler handler = new ContactItemHandler() {
            /**
             * Called when this users presence changes. You are responsible for changing the
             * icon (or not) of this contact item.
             * @param presence the users new presence.
             */
            public void handlePresence(Presence presence) {

            }

            /**
             * Is called when a user double-clicks the item.
             * @return true if you are handling the event.
             */
            public boolean handleDoubleClick() {
                return false;
            }
        };

        item.setHandler(handler);
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情久久五月天| 国产三级精品三级| 懂色一区二区三区免费观看| 久久网站热最新地址| 欧美日免费三级在线| 一本大道av一区二区在线播放| 大胆欧美人体老妇| 99re热视频这里只精品| 99re在线视频这里只有精品| 亚洲一区二区三区中文字幕| 国产精品中文字幕日韩精品| 国产白丝网站精品污在线入口| 国产二区国产一区在线观看| 粉嫩av一区二区三区粉嫩| 国模无码大尺度一区二区三区| 日韩av一区二区三区四区| 免费看欧美美女黄的网站| 国产一区二区三区av电影| 成人深夜在线观看| 欧美亚洲一区二区在线| 91精品国产欧美日韩| 国产日本欧洲亚洲| 亚洲综合一区在线| 久久精工是国产品牌吗| 不卡一区二区中文字幕| 欧美视频一区二区三区在线观看| 日韩亚洲欧美中文三级| 中文字幕免费不卡| 视频一区二区三区在线| 成人性色生活片免费看爆迷你毛片| 色天天综合色天天久久| 日韩一区二区三区在线观看| 国产精品视频一二三区| 亚洲黄色片在线观看| 日韩在线播放一区二区| 成人深夜福利app| 波多野结衣在线aⅴ中文字幕不卡| 色乱码一区二区三区88| 欧美mv日韩mv亚洲| 国产精品国产三级国产aⅴ无密码| 国产三级欧美三级| 亚洲精品你懂的| 精品sm捆绑视频| 亚洲黄色录像片| 麻豆成人91精品二区三区| 成人精品视频一区二区三区尤物| 91精品办公室少妇高潮对白| 欧美日韩一区成人| 久久精品视频网| 五月综合激情网| 久久国产精品区| 91麻豆精东视频| 欧美成人精品二区三区99精品| 国产婷婷精品av在线| 亚洲国产欧美在线| 国产麻豆精品在线| 欧美麻豆精品久久久久久| 国产人成亚洲第一网站在线播放 | 99久久99久久精品免费看蜜桃| 欧美在线制服丝袜| 国产麻豆一精品一av一免费| 91麻豆精品久久久久蜜臀| 亚洲欧美偷拍另类a∨色屁股| 久久精品国产77777蜜臀| 色综合久久中文字幕综合网| 欧美国产在线观看| 激情欧美一区二区三区在线观看| 欧美一区二区三区四区在线观看 | 91丨九色porny丨蝌蚪| 2020国产成人综合网| 蜜臀av性久久久久av蜜臀妖精| 欧美性猛片aaaaaaa做受| 亚洲乱码日产精品bd| 久久先锋资源网| 美女精品一区二区| 欧美一区二区三区性视频| 五月激情丁香一区二区三区| 成人久久久精品乱码一区二区三区 | a4yy欧美一区二区三区| 精品国产3级a| 国产一区二区三区免费看| 91精品国产综合久久久蜜臀图片| 亚洲国产cao| 777精品伊人久久久久大香线蕉| 午夜在线成人av| 欧美一二三四在线| 精品在线播放免费| 国产无一区二区| 99久免费精品视频在线观看 | 日韩电影在线一区| 91麻豆精品秘密| 日韩精品一级中文字幕精品视频免费观看| 91国偷自产一区二区三区成为亚洲经典| 亚洲人成网站在线| 色先锋aa成人| 午夜欧美电影在线观看| 精品视频一区三区九区| 免费成人小视频| 久久久久久久久岛国免费| 国产v综合v亚洲欧| 一个色妞综合视频在线观看| 欧美日韩一区二区在线观看| 日韩成人精品在线观看| 久久综合九色综合97婷婷 | 中文一区在线播放| 中文字幕一区二区三区在线观看| 色香蕉久久蜜桃| 久久99精品久久久久久国产越南 | 中文字幕一区二区视频| 91福利在线播放| 精彩视频一区二区三区| 国产精品久久久久影院色老大| 欧美视频在线一区二区三区 | 夜色激情一区二区| 91麻豆精品国产| 国产成人在线视频免费播放| 亚洲免费av观看| 久久亚洲二区三区| 欧美在线免费观看亚洲| 国产主播一区二区三区| 亚洲激情六月丁香| 日本一区二区不卡视频| 91精品国模一区二区三区| 91亚洲国产成人精品一区二区三| 一区二区日韩电影| 26uuu久久天堂性欧美| 欧洲一区二区av| 国产成人综合亚洲91猫咪| 亚洲一区二区在线免费观看视频| 欧美日韩视频在线观看一区二区三区| 精品影院一区二区久久久| 一区二区三区四区在线| 日韩欧美专区在线| 色综合一个色综合| 韩国视频一区二区| 亚洲国产精品激情在线观看| 日韩一区二区中文字幕| 在线观看区一区二| 天天综合天天综合色| 538prom精品视频线放| 国产午夜三级一区二区三| 日韩 欧美一区二区三区| 捆绑变态av一区二区三区| 日韩一级免费一区| 国产在线一区二区综合免费视频| 国产精品国产三级国产有无不卡| 国产成人在线免费| 国产精品福利电影一区二区三区四区| 一本大道av一区二区在线播放 | 久久av中文字幕片| 7777女厕盗摄久久久| 成人激情免费视频| 男人的j进女人的j一区| 欧美精品一卡两卡| 国产乱人伦偷精品视频免下载 | 天堂成人免费av电影一区| 国产嫩草影院久久久久| 中文字幕av免费专区久久| 欧美一二三在线| 欧美电影免费观看高清完整版在线 | 欧美日韩精品电影| 粉嫩av一区二区三区粉嫩| 国产盗摄视频一区二区三区| 国产一区二区在线观看视频| 国产精品69久久久久水密桃| 天天色图综合网| 国产精品国产自产拍高清av| 亚洲丝袜另类动漫二区| 亚洲一区二区三区激情| 日韩电影免费在线| 国产精品影视天天线| www.综合网.com| 欧美色图激情小说| 日韩精品专区在线影院观看| 26uuu精品一区二区| 国产日韩欧美电影| 国产精品成人一区二区艾草 | 一区二区三区四区在线| 五月激情丁香一区二区三区| 久久精品国产一区二区| 成人av在线一区二区| 欧美午夜不卡视频| 精品国产精品一区二区夜夜嗨| 国产日产欧产精品推荐色 | 中文字幕一区视频| 亚洲国产精品影院| 国产乱理伦片在线观看夜一区| 99久久夜色精品国产网站| 欧美剧情电影在线观看完整版免费励志电影| 日韩亚洲欧美综合| 成人一级视频在线观看| 欧美日韩国产三级| 国产欧美日产一区| 日本视频在线一区| 欧美日韩一卡二卡| 久久精品欧美日韩| 天堂久久一区二区三区| www.欧美色图| 日韩无一区二区| 91精品国产色综合久久|