01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.samples.resources.client;
09:
10: import net.mygwt.ui.client.data.Model;
11:
12: public class Folder extends Model {
13:
14: public Folder() {
15:
16: }
17:
18: public Folder(String name) {
19: set("name", name);
20: }
21:
22: public Folder(String name, Model[] children) {
23: this (name);
24: for (int i = 0; i < children.length; i++) {
25: add(children[i]);
26: }
27: }
28:
29: public String getName() {
30: return getAsString("name");
31: }
32:
33: public String toString() {
34: return getName();
35: }
36:
37: }
|