1 /* 2 * Copyright 2011 FatWire Corporation. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.fatwire.gst.foundation.html; 17 18 /** 19 * @author Dolf Dijkstra 20 * @since Apr 16, 2011 21 */ 22 abstract class BaseElement { 23 24 private final HtmlCoreAttr core = new HtmlCoreAttr(); 25 private final HtmlEventsAttr events = new HtmlEventsAttr(); 26 private final HtmlI18NAttr i18n = new HtmlI18NAttr(); 27 28 /** 29 * @return classname 30 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#getClassName() 31 */ 32 public final String getClassName() { 33 return core.getClassName(); 34 } 35 36 /** 37 * @return id 38 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#getId() 39 */ 40 public final String getId() { 41 return core.getId(); 42 } 43 44 /** 45 * @return style 46 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#getStyle() 47 */ 48 public final String getStyle() { 49 return core.getStyle(); 50 } 51 52 /** 53 * @return title 54 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#getTitle() 55 */ 56 public final String getTitle() { 57 return core.getTitle(); 58 } 59 60 /** 61 * @param className 62 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#setClassName(java.lang.String) 63 */ 64 public final void setClassName(final String className) { 65 core.setClassName(className); 66 } 67 68 /** 69 * @param id 70 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#setId(java.lang.String) 71 */ 72 public final void setId(final String id) { 73 core.setId(id); 74 } 75 76 /** 77 * @param style 78 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#setStyle(java.lang.String) 79 */ 80 public final void setStyle(final String style) { 81 core.setStyle(style); 82 } 83 84 /** 85 * @param title 86 * @see com.fatwire.gst.foundation.html.HtmlCoreAttr#setTitle(java.lang.String) 87 */ 88 public final void setTitle(final String title) { 89 core.setTitle(title); 90 } 91 92 /** 93 * @return onclick 94 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnclick() 95 */ 96 public final String getOnclick() { 97 return events.getOnclick(); 98 } 99 100 /** 101 * @return ondblclick 102 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOndblclick() 103 */ 104 public final String getOndblclick() { 105 return events.getOndblclick(); 106 } 107 108 /** 109 * @return onkeydown 110 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnkeydown() 111 */ 112 public final String getOnkeydown() { 113 return events.getOnkeydown(); 114 } 115 116 /** 117 * @return event 118 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnkeypress() 119 */ 120 public final String getOnkeypress() { 121 return events.getOnkeypress(); 122 } 123 124 /** 125 * @return event 126 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnkeyup() 127 */ 128 public final String getOnkeyup() { 129 return events.getOnkeyup(); 130 } 131 132 /** 133 * @return event 134 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnmousedown() 135 */ 136 public final String getOnmousedown() { 137 return events.getOnmousedown(); 138 } 139 140 /** 141 * @return event 142 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnmousemove() 143 */ 144 public final String getOnmousemove() { 145 return events.getOnmousemove(); 146 } 147 148 /** 149 * @return event 150 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnmouseout() 151 */ 152 public final String getOnmouseout() { 153 return events.getOnmouseout(); 154 } 155 156 /** 157 * @return event 158 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnmouseover() 159 */ 160 public final String getOnmouseover() { 161 return events.getOnmouseover(); 162 } 163 164 /** 165 * @return event 166 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#getOnmouseup() 167 */ 168 public final String getOnmouseup() { 169 return events.getOnmouseup(); 170 } 171 172 /** 173 * @param onclick 174 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnclick(java.lang.String) 175 */ 176 public final void setOnclick(final String onclick) { 177 events.setOnclick(onclick); 178 } 179 180 /** 181 * @param ondblclick 182 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOndblclick(java.lang.String) 183 */ 184 public final void setOndblclick(final String ondblclick) { 185 events.setOndblclick(ondblclick); 186 } 187 188 /** 189 * @param onkeydown 190 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnkeydown(java.lang.String) 191 */ 192 public final void setOnkeydown(final String onkeydown) { 193 events.setOnkeydown(onkeydown); 194 } 195 196 /** 197 * @param onkeypress 198 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnkeypress(java.lang.String) 199 */ 200 public final void setOnkeypress(final String onkeypress) { 201 events.setOnkeypress(onkeypress); 202 } 203 204 /** 205 * @param onkeyup 206 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnkeyup(java.lang.String) 207 */ 208 public final void setOnkeyup(final String onkeyup) { 209 events.setOnkeyup(onkeyup); 210 } 211 212 /** 213 * @param onmousedown 214 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnmousedown(java.lang.String) 215 */ 216 public final void setOnmousedown(final String onmousedown) { 217 events.setOnmousedown(onmousedown); 218 } 219 220 /** 221 * @param onmousemove 222 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnmousemove(java.lang.String) 223 */ 224 public final void setOnmousemove(final String onmousemove) { 225 events.setOnmousemove(onmousemove); 226 } 227 228 /** 229 * @param onmouseout 230 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnmouseout(java.lang.String) 231 */ 232 public final void setOnmouseout(final String onmouseout) { 233 events.setOnmouseout(onmouseout); 234 } 235 236 /** 237 * @param onmouseover 238 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnmouseover(java.lang.String) 239 */ 240 public final void setOnmouseover(final String onmouseover) { 241 events.setOnmouseover(onmouseover); 242 } 243 244 /** 245 * @param onmouseup 246 * @see com.fatwire.gst.foundation.html.HtmlEventsAttr#setOnmouseup(java.lang.String) 247 */ 248 public final void setOnmouseup(final String onmouseup) { 249 events.setOnmouseup(onmouseup); 250 } 251 252 /** 253 * @return dir 254 * @see com.fatwire.gst.foundation.html.HtmlI18NAttr#getDir() 255 */ 256 public final String getDir() { 257 return i18n.getDir(); 258 } 259 260 /** 261 * @return lang 262 * @see com.fatwire.gst.foundation.html.HtmlI18NAttr#getLang() 263 */ 264 public final String getLang() { 265 return i18n.getLang(); 266 } 267 268 /** 269 * @param dir 270 * @see com.fatwire.gst.foundation.html.HtmlI18NAttr#setDir(java.lang.String) 271 */ 272 public final void setDir(final String dir) { 273 i18n.setDir(dir); 274 } 275 276 /** 277 * @param lang 278 * @see com.fatwire.gst.foundation.html.HtmlI18NAttr#setLang(java.lang.String) 279 */ 280 public final void setLang(final String lang) { 281 i18n.setLang(lang); 282 } 283 284 }