1 5 package org.exoplatform.services.portal.model; 6 7 13 abstract public class Component implements Cloneable { 14 private String id = "" ; 15 private String renderer = "default"; 16 private String decorator = "default"; 17 private String width ; 18 private String height ; 19 20 public Component() { 21 29 } 30 31 public Component(String renderer, String style, String width, String height) { 32 this.renderer = renderer ; 33 this.decorator = style ; 34 this.width = width ; 35 this.height = height ; 36 } 37 38 public String getId() { return id ;} 39 public void setId(String s) { id = s ; } 40 41 public String getRenderer() { return renderer ; } 42 public void setRenderer(String s) { 43 if(s == null) renderer = "default" ; 44 else renderer = s ; 45 } 46 47 public String getDecorator() { return decorator ; } 48 public void setDecorator(String s) { 49 if (s == null) decorator = "default" ; 50 else decorator = s ; 51 } 52 53 public String getWidth() { return width ; } 54 public void setWidth(String s) { width = s ;} 55 56 public String getHeight() { return height ; } 57 public void setHeight(String s) { height = s ;} 58 59 public Object deepCloneObject() throws Exception { 60 return super.clone() ; 61 } 62 63 abstract public Component softCloneObject() ; 64 65 protected void copyBasicProperties(Component comp) { 66 id = comp.getId() ; 67 renderer = comp.getRenderer() ; 68 decorator = comp.getDecorator() ; 69 width = comp.getWidth() ; 70 height = comp.getHeight() ; 71 } 72 } | Popular Tags |