Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: edu/ou/kmi/buddyspace/gui/BSJIDActionButton.java


1   package edu.ou.kmi.buddyspace.gui;
2   
3   /*
4    * BSJIDActionButton.java
5    *
6    * Project: BuddySpace
7    * (C) Copyright Knowledge Media Institute 2002
8    *
9    *
10   * Created on 1 October 2002, 10:01
11   */
12  
13  import javax.swing.*;
14  
15  import org.jabber.jabberbeans.util.*;
16  
17  /**
18   * <code>BSJIDActionButton</code> stores <code>JID</code> and desired
19   * action namespace information.
20   *
21   * @author  Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
22   */
23  public class BSJIDActionButton extends JButton {
24      
25      private JID jid = null;
26      private String namespace = null;
27      
28      /** Constructor */
29      public BSJIDActionButton(String text, JID jid) {
30          super(text);
31          this.jid = jid;
32      }
33      
34      /** Constructor */
35      public BSJIDActionButton(Icon icon, JID jid) {
36          super(icon);
37          this.jid = jid;
38      }
39      
40      /** Constructor */
41      public BSJIDActionButton(String text, JID jid, String namespace) {
42          this(text, jid);
43          this.namespace = namespace;
44      }
45      
46      /** Constructor */
47      public BSJIDActionButton(Icon icon, JID jid, String namespace) {
48          this(icon, jid);
49          this.namespace = namespace;
50      }
51      
52      /** Constructor */
53      public BSJIDActionButton(String text, Icon icon, JID jid, String namespace) {
54          super(text, icon);
55          this.jid = jid;
56          this.namespace = namespace;
57      }
58      
59      /** Sets JID */
60      public void setJID(JID jid) {
61          this.jid = jid;
62      }
63      
64      /** Returns JID */
65      public JID getJID() {
66          return jid;
67      }
68      
69      /** Sets namespace */
70      public void setNamespace(String namespace) {
71          this.namespace = namespace;
72      }
73      
74      /** Returns namespace */
75      public String getNamespace() {
76          return namespace;
77      }
78  }