01: //WebOnSwing - Web Application Framework
02: //Copyright (C) 2003 Fernando Damian Petrola
03: //
04: //This library is free software; you can redistribute it and/or
05: //modify it under the terms of the GNU Lesser General Public
06: //License as published by the Free Software Foundation; either
07: //version 2.1 of the License, or (at your option) any later version.
08: //
09: //This library is distributed in the hope that it will be useful,
10: //but 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 library; if not, write to the Free Software
16: //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17:
18: package net.ar.webonswing.render.templates.html;
19:
20: import net.ar.webonswing.render.markup.*;
21: import net.ar.webonswing.render.templates.*;
22: import net.ar.webonswing.visitor.*;
23:
24: /**
25: * Este tipo de elemento de plantilla permite asociarle a un contenido un tag que contenga
26: * ciertos atributos.Este tag va a ser mezclado con el tag que se encuentre en la plantilla, en
27: * el "hueco" correspondiente donde se pego el componente.
28: *
29: * @author Fernando Damian Petrola
30: */
31: public class IdTagTemplateElement extends DefaultTemplateElement {
32: Tag theIdTag;
33:
34: public IdTagTemplateElement(Object aId, Visitable aContent,
35: Tag anIdTag) {
36: super (aId, aContent);
37: theIdTag = anIdTag;
38: }
39:
40: public IdTagTemplateElement(Object aId, Tag anIdTag) {
41: this (aId, anIdTag, anIdTag);
42: }
43:
44: public IdTagTemplateElement(Object aId, Visitable aContent) {
45: this (aId, aContent, null);
46: }
47:
48: public Tag getTheIdTag() {
49: return theIdTag;
50: }
51:
52: public void setTheIdTag(Tag tag) {
53: theIdTag = tag;
54: }
55:
56: public Object clone() throws CloneNotSupportedException {
57: IdTagTemplateElement theNewTemplateElement = (IdTagTemplateElement) super
58: .clone();
59: theNewTemplateElement.theIdTag = (Tag) theIdTag.clone();
60:
61: return theNewTemplateElement;
62: }
63:
64: }
|