01: /**
02: * org/ozone-db/xml/dom/html/HTMLLegendElementImpl.java
03: *
04: * The contents of this file are subject to the OpenXML Public
05: * License Version 1.0; you may not use this file except in compliance
06: * with the License. You may obtain a copy of the License at
07: * http://www.openxml.org/license.html
08: *
09: * THIS SOFTWARE IS DISTRIBUTED ON AN "AS IS" BASIS WITHOUT WARRANTY
10: * OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE INITIAL DEVELOPER
11: * AND ALL CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY DAMAGES AS A
12: * RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
13: * DERIVATIVES. SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING
14: * RIGHTS AND LIMITATIONS UNDER THE LICENSE.
15: *
16: * The Initial Developer of this code under the License is Assaf Arkin.
17: * Portions created by Assaf Arkin are Copyright (C) 1998, 1999.
18: * All Rights Reserved.
19: */package org.ozoneDB.xml.dom.html;
20:
21: import org.ozoneDB.xml.dom.*;
22: import org.w3c.dom.*;
23: import org.w3c.dom.html.*;
24:
25: /**
26: * @version $Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
27: * @author <a href="mailto:arkin@trendline.co.il">Assaf Arkin</a>
28: * @see org.w3c.dom.html.HTMLLegendElement
29: * @see ElementImpl
30: */
31: public final class HTMLLegendElementImpl extends HTMLElementImpl
32: implements HTMLLegendElement {
33:
34: public String getAccessKey() {
35: String accessKey;
36:
37: // Make sure that the access key is a single character.
38: accessKey = getAttribute("accesskey");
39: if (accessKey != null && accessKey.length() > 1) {
40: accessKey = accessKey.substring(0, 1);
41: }
42: return accessKey;
43: }
44:
45: public void setAccessKey(String accessKey) {
46: // Make sure that the access key is a single character.
47: if (accessKey != null && accessKey.length() > 1) {
48: accessKey = accessKey.substring(0, 1);
49: }
50: setAttribute("accesskey", accessKey);
51: }
52:
53: public String getAlign() {
54: return getAttribute("align");
55: }
56:
57: public void setAlign(String align) {
58: setAttribute("align", align);
59: }
60:
61: /**
62: * Constructor requires owner document.
63: *
64: * @param owner The owner HTML document
65: */
66: public HTMLLegendElementImpl(HTMLDocumentImpl owner, String name) {
67: super (owner, "LEGEND");
68: }
69:
70: }
|