KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > planetamessenger > mos > ui > JProtocolTreeItem


1 /*
2     =========================================================================
3     Package ui - Implements user interface components
4
5     This module is developed and maintained by PlanetaMessenger.org.
6     Specs, New and updated versions can be found in
7     http://www.planetamessenger.org
8     If you want contact the Team please send a email to Project Manager
9     Leidson Campos Alves Ferreira at leidson@planetamessenger.org
10
11     Copyright (C) since 2001 by PlanetaMessenger.org
12
13     This program is free software; you can redistribute it and/or modify
14     it under the terms of the GNU General Public License as published by
15     the Free Software Foundation; either version 2 of the License, or
16     (at your option) any later version.
17
18     This program is distributed in the hope that it will be useful,
19     but WITHOUT ANY WARRANTY; without even the implied warranty of
20     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21     GNU General Public License for more details.
22
23     You should have received a copy of the GNU General Public License
24     along with this program; if not, write to the Free Software
25     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27     =========================================================================
28 */

29 /**
30  *
31  * $Id: JProtocolTreeItem.java,v 1.6 2007/01/28 17:39:21 popolony2k Exp $
32  * $Author: popolony2k $
33  * $Name: $
34  * $Revision: 1.6 $
35  * $State: Exp $
36  *
37  */

38
39 package org.planetamessenger.mos.ui;
40
41
42
43 public class JProtocolTreeItem {
44
45   java.lang.String JavaDoc strText;
46   java.lang.String JavaDoc strClassName;
47   int nPluginId;
48   boolean bInstall;
49  
50   
51   /**
52    * Creates and initialize the Protocol
53    * tree item.
54    */

55   public JProtocolTreeItem() {
56     
57     strText = "";
58     strClassName = "";
59     nPluginId = -1;
60     bInstall = false;
61   }
62
63   /**
64    * Initializes all TreeItem data from constructor.
65    * @param strText The Item text;
66    * @param strClassName The item class name;
67    * @param nPluginId The PluginId of this item;
68    */

69   public JProtocolTreeItem( java.lang.String JavaDoc strText, java.lang.String JavaDoc strClassName, int nPluginId ) {
70
71     this.strText = strText;
72     this.strClassName = strClassName;
73     this.nPluginId = nPluginId;
74     this.bInstall = false;
75   }
76
77   /**
78    * Set the item text.
79    * @param strText The new item text;
80    */

81   public void setText( java.lang.String JavaDoc strText ) {
82
83     this.strText = strText;
84   }
85
86   /**
87    * Returns the item text.
88    */

89   public java.lang.String JavaDoc getText() {
90
91     return strText;
92   }
93
94   /**
95    * Set the item className.
96    * @param strText The new item className;
97    */

98   public void setClassName( java.lang.String JavaDoc strClassName ) {
99
100     this.strClassName = strClassName;
101   }
102
103   /**
104    * Returns the item className.
105    */

106   public java.lang.String JavaDoc getClassName() {
107
108     return strClassName;
109   }
110
111   /**
112    * Sets the PluginId of this object;
113    * @param nPluginId The new PluginId;
114    */

115   public void setPluginId( int nPluginId ) {
116
117     this.nPluginId = nPluginId;
118   }
119
120   /**
121    * Returns the PluginId of this
122    * object;
123    */

124   public int getPluginId() {
125
126     return nPluginId;
127   }
128   
129   /**
130    * Mark the plugin to be installed;
131    * @param bInstall Mark the item to be installed;
132    */

133   public void setInstall( boolean bInstall ) {
134     
135     this.bInstall = bInstall;
136   }
137
138   /**
139    * Get the Install flag of this option.
140    */

141   public boolean getInstall() {
142     
143     return bInstall;
144   }
145
146   /**
147    * Override the default toString mnthod.
148    * Returns this item as string.
149    */

150   public java.lang.String JavaDoc toString() {
151
152     return strText;
153   }
154 }
155
156 // JProtocolTreeItem class
157
Popular Tags