KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > MemberItemView


1 /*
2   Copyright (C) 2003 Laurent Martelli <laurent@aopsys.com>
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19 package org.objectweb.jac.aspects.gui;
20
21 import org.objectweb.jac.core.rtti.MemberItem;
22
23
24 /**
25  * Defines a generic member view (is embedded, ...)
26  */

27 public abstract class MemberItemView {
28     MemberItem member;
29     String JavaDoc name;
30
31     public MemberItemView(MemberItem member, String JavaDoc name) {
32         this.member = member;
33         this.name = name;
34     }
35
36     public String JavaDoc getName() {
37         return name;
38     }
39
40     /** Wether to use an embedded view or not (for a reference) */
41     boolean embedded;
42     public void setEmbedded(boolean embedded) {
43         this.embedded = embedded;
44     }
45     public boolean isEmbedded() {
46         return embedded;
47     }
48
49     Boolean JavaDoc embeddedEditor = null;
50     public void setEmbeddedEditor(boolean embeddedEditor) {
51         this.embeddedEditor = embeddedEditor ? Boolean.TRUE : Boolean.FALSE;
52     }
53     public boolean isEmbeddedEditor(boolean defaultValue) {
54         return embeddedEditor!=null ? embeddedEditor.booleanValue() : defaultValue;
55     }
56
57     String JavaDoc viewType;
58     public void setViewType(String JavaDoc viewType) {
59         this.viewType = viewType;
60     }
61     public String JavaDoc getViewType() {
62         return viewType;
63     }
64 }
65
Popular Tags