KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > geinuke > block > BlockWrapper


1
2  /*
3  -- GeiNuke --
4 Copyright (c) 2005 by Roberto Sidoti [geinuke@users.sourceforge.net]
5  http://www.hostingjava.it/-geinuke/
6
7 This file is part of GeiNuke.
8
9     GeiNuke is free software; you can redistribute it and/or modify
10     it under the terms of the GNU General Public License as published by
11     the Free Software Foundation; either version 2 of the License, or
12     (at your option) any later version.
13
14     GeiNuke is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17     GNU General Public License for more details.
18
19     You should have received a copy of the GNU General Public License
20     along with GeiNuke; if not, write to the Free Software
21     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */

23 package com.geinuke.block;
24
25 import com.geinuke.common.BlockWidgetI;
26
27 public class BlockWrapper {
28
29     protected String JavaDoc name=null;
30     protected String JavaDoc desc=null;
31     protected String JavaDoc clazzName=null;
32      
33     
34     public BlockWidgetI getBlockWidget() {
35         BlockWidgetI bw=null;
36         try{
37         bw=(BlockWidgetI)Class.forName(this.clazzName).newInstance();
38         }catch(Exception JavaDoc e){
39             e.printStackTrace();
40         }
41         return bw;
42     }
43     public void setBlockWidget(String JavaDoc clazzName) {
44         this.clazzName=clazzName;
45     }
46     public String JavaDoc getDesc() {
47         return desc;
48     }
49     public void setDesc(String JavaDoc desc) {
50         this.desc = desc;
51     }
52     public String JavaDoc getName() {
53         return name;
54     }
55     public void setName(String JavaDoc name) {
56         this.name = name;
57     }
58 }
59
Popular Tags