View Javadoc
1   /*
2    * Copyright (c) 2002-2025 Gargoyle Software Inc.
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    * https://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.htmlunit.javascript.host.html;
16  
17  import org.htmlunit.html.HtmlTableBody;
18  import org.htmlunit.html.HtmlTableFooter;
19  import org.htmlunit.html.HtmlTableHeader;
20  import org.htmlunit.javascript.configuration.JsxClass;
21  import org.htmlunit.javascript.configuration.JsxConstructor;
22  import org.htmlunit.javascript.configuration.JsxGetter;
23  import org.htmlunit.javascript.configuration.JsxSetter;
24  
25  /**
26   * A JavaScript object representing "HTMLTableSectionElement", it is used by
27   * {@link HtmlTableBody}, {@link HtmlTableHeader}, and {@link HtmlTableFooter}.
28   *
29   * @author Daniel Gredler
30   * @author Ahmed Ashour
31   * @author Ronald Brill
32   */
33  @JsxClass(domClass = HtmlTableBody.class)
34  @JsxClass(domClass = HtmlTableHeader.class)
35  @JsxClass(domClass = HtmlTableFooter.class)
36  public class HTMLTableSectionElement extends RowContainer {
37  
38      /** The default value of the "vAlign" property. */
39      private static final String VALIGN_DEFAULT_VALUE = "top";
40  
41      /**
42       * JavaScript constructor.
43       */
44      @Override
45      @JsxConstructor
46      public void jsConstructor() {
47          super.jsConstructor();
48      }
49  
50      /**
51       * Returns the value of the {@code vAlign} property.
52       * @return the value of the {@code vAlign} property
53       */
54      @JsxGetter
55      public String getVAlign() {
56          return getVAlign(getValidVAlignValues(), VALIGN_DEFAULT_VALUE);
57      }
58  
59      /**
60       * Sets the value of the {@code vAlign} property.
61       * @param vAlign the value of the {@code vAlign} property
62       */
63      @JsxSetter
64      public void setVAlign(final Object vAlign) {
65          setVAlign(vAlign, getValidVAlignValues());
66      }
67  
68      /**
69       * Returns the valid "vAlign" values for this element, depending on the browser being emulated.
70       * @return the valid "vAlign" values for this element, depending on the browser being emulated
71       */
72      private String[] getValidVAlignValues() {
73          return null;
74      }
75  
76      /**
77       * Returns the value of the {@code ch} property.
78       * @return the value of the {@code ch} property
79       */
80      @Override
81      @JsxGetter
82      public String getCh() {
83          return super.getCh();
84      }
85  
86      /**
87       * Sets the value of the {@code ch} property.
88       * @param ch the value of the {@code ch} property
89       */
90      @Override
91      @JsxSetter
92      public void setCh(final String ch) {
93          super.setCh(ch);
94      }
95  
96      /**
97       * Returns the value of the {@code chOff} property.
98       * @return the value of the {@code chOff} property
99       */
100     @Override
101     @JsxGetter
102     public String getChOff() {
103         return super.getChOff();
104     }
105 
106     /**
107      * Sets the value of the {@code chOff} property.
108      * @param chOff the value of the {@code chOff} property
109      */
110     @Override
111     @JsxSetter
112     public void setChOff(final String chOff) {
113         super.setChOff(chOff);
114     }
115 }