001 /* 002 * Copyright 2007 - 2007 JEuclid, http://jeuclid.sf.net 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.w3c.dom.mathml; 017 018 import org.w3c.dom.DOMException; 019 020 /* 021 * Please note: This file was automatically generated from the source of the 022 * MathML specification. Do not edit it. If there are errors or missing 023 * elements, please correct the stylesheet instead. 024 */ 025 026 /** 027 * This interface extends the MathMLPresentationElement interface for the 028 * MathML multiscripts (including prescripts or tensors) element 029 * mmultiscripts. 030 * 031 * 032 */ 033 public interface MathMLMultiScriptsElement extends MathMLPresentationElement { 034 /** 035 * A string representing the minimum amount to shift the baseline of the 036 * subscripts down, if specified; this is the element's subscriptshift 037 * attribute. 038 * 039 * @return value of the subscriptshift attribute. 040 */ 041 String getSubscriptshift(); 042 043 /** 044 * setter for the subscriptshift attribute. 045 * 046 * @param subscriptshift 047 * new value for subscriptshift. 048 * @see #getSubscriptshift() 049 */ 050 void setSubscriptshift(String subscriptshift); 051 052 /** 053 * A string representing the minimum amount to shift the baseline of the 054 * superscripts up, if specified; this is the element's superscriptshift 055 * attribute. 056 * 057 * @return value of the superscriptshift attribute. 058 */ 059 String getSuperscriptshift(); 060 061 /** 062 * setter for the superscriptshift attribute. 063 * 064 * @param superscriptshift 065 * new value for superscriptshift. 066 * @see #getSuperscriptshift() 067 */ 068 void setSuperscriptshift(String superscriptshift); 069 070 /** 071 * A MathMLElement representing the base of the script. This is the first 072 * child of the element. 073 * 074 * @return value of the base attribute. 075 */ 076 MathMLElement getBase(); 077 078 /** 079 * setter for the base attribute. 080 * 081 * @param base 082 * new value for base. 083 * @see #getBase() 084 */ 085 void setBase(MathMLElement base); 086 087 /** 088 * A NodeList representing the prescripts of the script, which appear in 089 * the order described by the expression (prescript presuperscript)*. This 090 * is the same as traversing the contents of the NodeList returned by 091 * Node::childNodes() from the Node following the mprescripts (if present) 092 * to the end of the list. 093 * 094 * @return value of the prescripts attribute. 095 */ 096 MathMLNodeList getPrescripts(); 097 098 /** 099 * A MathMLNodeList representing the scripts of the script, which appear 100 * in the order described by the expression (script superscript)*. This is 101 * the same as traversing the contents of the NodeList returned by 102 * Node::childNodes() from the first Node up to and including the Node 103 * preceding the mprescripts (if present). 104 * 105 * @return value of the scripts attribute. 106 */ 107 MathMLNodeList getScripts(); 108 109 /** 110 * The number of script/subscript columns preceding (to the left of) the 111 * base. Should always be half of getprescripts().length() 112 * 113 * @return value of the numprescriptcolumns attribute. 114 */ 115 int getNumprescriptcolumns(); 116 117 /** 118 * The number of script/subscript columns following (to the right of) the 119 * base. Should always be half of getscripts().length() 120 * 121 * @return value of the numscriptcolumns attribute. 122 */ 123 int getNumscriptcolumns(); 124 125 /** 126 * A convenience method to retrieve pre-subscript children of the element, 127 * referenced by column index . 128 * 129 * @param colIndex 130 * Column index of prescript (where 1 represents the leftmost 131 * prescript column). 132 * @return Returns the MathMLElement representing the colIndex-th 133 * presubscript (to the left of the base, counting from 1 at the 134 * far left). Note that this may be the MathMLElement 135 * corresponding to the special element none in the case of a 136 * missing presubscript (see the discussion of mmultiscripts), or 137 * it may be null if colIndex is out of range for the element. 138 */ 139 MathMLElement getPreSubScript(int colIndex); 140 141 /** 142 * A convenience method to retrieve subscript children of the element, 143 * referenced by column index. 144 * 145 * @param colIndex 146 * Column index of script (where 1 represents the leftmost 147 * script column, the first to the right of the base). 148 * @return Returns the MathMLElement representing the colIndex-th 149 * subscript to the right of the base. Note that this may be the 150 * MathMLElement corresponding to the special element none in the 151 * case of a missing subscript (see the discussion of 152 * mmultiscripts), or it may be null if colIndex is out of range 153 * for the element. 154 */ 155 MathMLElement getSubScript(int colIndex); 156 157 /** 158 * A convenience method to retrieve pre-superscript children of the 159 * element, referenced by column index . 160 * 161 * @param colIndex 162 * Column index of pre-superscript (where 1 represents the 163 * leftmost prescript column). 164 * @return Returns the MathMLElement representing the colIndex-th 165 * presuperscript (to the left of the base, counting from 1 at the 166 * far left). Note that this may be the MathMLElement 167 * corresponding to the special element none in the case of a 168 * missing presuperscript (see the discussion of mmultiscripts), 169 * or it may be null if colIndex is out of range for the element. 170 */ 171 MathMLElement getPreSuperScript(int colIndex); 172 173 /** 174 * A convenience method to retrieve superscript children of the element, 175 * referenced by column index . 176 * 177 * @param colIndex 178 * Column index of script (where 1 represents the leftmost 179 * script column, the first to the right of the base) 180 * @return Returns the MathMLElement representing the colIndex-th 181 * superscript to the right of the base. Note that this may be the 182 * MathMLElement corresponding to the special element none in the 183 * case of a missing superscript (see the discussion of 184 * mmultiscripts), or it may be null if colIndex is out of range 185 * for the element. 186 */ 187 MathMLElement getSuperScript(int colIndex); 188 189 /** 190 * A convenience method to insert a pre-subscript before the position 191 * referenced by column index. If colIndex is 0, the new pre-subscript is 192 * appended as the last pre-subscript of the mmultiscripts element; if 193 * colIndex is 1, a new pre-subscript is prepended at the far left. Note 194 * that inserting a new pre-subscript will cause the insertion of an empty 195 * pre-superscript in the same column. 196 * 197 * @param colIndex 198 * Column index of pre-subscript (where 1 represents the 199 * leftmost prescript column). 200 * @param newScript 201 * A MathMLElement representing the element to be inserted as a 202 * pre-subscript. 203 * @return The MathMLElement child of this MathMLMultiScriptsElement 204 * representing the new script in the DOM. 205 * @throws DOMException 206 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 207 * element that cannot be a pre-subscript. INDEX_SIZE_ERR: 208 * Raised if colIndex is greater than the number of 209 * pre-scripts of the element. 210 */ 211 MathMLElement insertPreSubScriptBefore(int colIndex, 212 MathMLElement newScript) throws DOMException; 213 214 /** 215 * A convenience method to set the pre-subscript child at the position 216 * referenced by colIndex. If there is currently a pre-subscript at this 217 * position, it is replaced by newScript. 218 * 219 * @param colIndex 220 * Column index of pre-subscript (where 1 represents the 221 * leftmost prescript column). 222 * @param newScript 223 * MathMLElement representing the element that is to be set as 224 * the colIndex-th pre-subscript child of this element. 225 * @return The MathMLElement child of this MathMLMultiScriptsElement 226 * representing the new pre-subscript in the DOM. 227 * @throws DOMException 228 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 229 * element that cannot be a pre-subscript. INDEX_SIZE_ERR: 230 * Raised if colIndex is greater than one more than the number 231 * of pre-scripts of the element. 232 */ 233 MathMLElement setPreSubScriptAt(int colIndex, MathMLElement newScript) 234 throws DOMException; 235 236 /** 237 * A convenience method to insert a subscript before the position 238 * referenced by column index. If colIndex is 0, the new subscript is 239 * appended as the last subscript of the mmultiscripts element; if 240 * colIndex is 1, a new subscript is prepended at the far left. Note that 241 * inserting a new subscript will cause the insertion of an empty 242 * superscript in the same column. 243 * 244 * @param colIndex 245 * Column index of subscript, where 1 represents the leftmost 246 * script column (the first to the right of the base). 247 * @param newScript 248 * A MathMLElement representing the element to be inserted as a 249 * subscript. 250 * @return The MathMLElement child of this MathMLMultiScriptsElement that 251 * represents the new subscript in the DOM. 252 * @throws DOMException 253 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 254 * element that cannot be a subscript. INDEX_SIZE_ERR: Raised 255 * if colIndex is greater than the number of scripts of the 256 * element. 257 */ 258 MathMLElement insertSubScriptBefore(int colIndex, MathMLElement newScript) 259 throws DOMException; 260 261 /** 262 * A convenience method to set the subscript child at the position 263 * referenced by colIndex. If there is currently a subscript at this 264 * position, it is replaced by newScript. 265 * 266 * @param colIndex 267 * Column index of subscript, where 1 represents the leftmost 268 * script column (the first to the right of the base). 269 * @param newScript 270 * MathMLElement representing the element that is to be set as 271 * the colIndex-th subscript child of this element. 272 * @return The MathMLElement child of this element representing the new 273 * subscript in the DOM. 274 * @throws DOMException 275 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 276 * element that cannot be a subscript. INDEX_SIZE_ERR: Raised 277 * if colIndex is greater than one more than the number of 278 * scripts of the element. 279 */ 280 MathMLElement setSubScriptAt(int colIndex, MathMLElement newScript) 281 throws DOMException; 282 283 /** 284 * A convenience method to insert a pre-superscript before the position 285 * referenced by column index. If colIndex is 0, the new pre-superscript 286 * is appended as the last pre-superscript of the mmultiscripts element; 287 * if colIndex is 1, a new pre-superscript is prepended at the far left. 288 * Note that inserting a new pre-superscript will cause the insertion of 289 * an empty pre-subscript in the same column. 290 * 291 * @param colIndex 292 * Column index of pre-superscript (where 1 represents the 293 * leftmost prescript column). 294 * @param newScript 295 * A MathMLElement representing the element to be inserted as a 296 * pre-superscript. 297 * @return The MathMLElement child of this element that represents the new 298 * pre-superscript in the DOM. 299 * @throws DOMException 300 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 301 * element that cannot be a pre-superscript. INDEX_SIZE_ERR: 302 * Raised if colIndex is greater than the number of 303 * pre-scripts of the element. 304 */ 305 MathMLElement insertPreSuperScriptBefore(int colIndex, 306 MathMLElement newScript) throws DOMException; 307 308 /** 309 * A convenience method to set the pre-superscript child at the position 310 * referenced by colIndex. If there is currently a pre-superscript at this 311 * position, it is replaced by newScript. 312 * 313 * @param colIndex 314 * Column index of pre-superscript (where 1 represents the 315 * leftmost prescript column). 316 * @param newScript 317 * MathMLElement representing the element that is to be set as 318 * the colIndex-th pre-superscript child of this element. 319 * @return The MathMLElement child of this element that represents the new 320 * pre-superscript in the DOM. 321 * @throws DOMException 322 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 323 * element that cannot be a pre-superscript. INDEX_SIZE_ERR: 324 * Raised if colIndex is greater than one more than the number 325 * of pre-scripts of the element. 326 */ 327 MathMLElement setPreSuperScriptAt(int colIndex, MathMLElement newScript) 328 throws DOMException; 329 330 /** 331 * A convenience method to insert a superscript before the position 332 * referenced by column index. If colIndex is 0, the new superscript is 333 * appended as the last superscript of the mmultiscripts element; if 334 * colIndex is 1, a new superscript is prepended at the far left. Note 335 * that inserting a new superscript will cause the insertion of an empty 336 * subscript in the same column. 337 * 338 * @param colIndex 339 * Column index of superscript, where 1 represents the leftmost 340 * script column (the first to the right of the base). 341 * @param newScript 342 * A MathMLElement representing the element to be inserted as a 343 * superscript. 344 * @return The MathMLElement child of this element that represents the new 345 * superscript in the DOM. 346 * @throws DOMException 347 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 348 * element that cannot be a superscript. INDEX_SIZE_ERR: 349 * Raised if colIndex is greater than the number of scripts of 350 * the element. 351 */ 352 MathMLElement insertSuperScriptBefore(int colIndex, 353 MathMLElement newScript) throws DOMException; 354 355 /** 356 * A convenience method to set the superscript child at the position 357 * referenced by colIndex. If there is currently a superscript at this 358 * position, it is replaced by newScript. 359 * 360 * @param colIndex 361 * Column index of superscript, where 1 represents the leftmost 362 * script column (the first to the right of the base). 363 * @param newScript 364 * MathMLElement representing the element that is to be set as 365 * the colIndex-th superscript child of this element. 366 * @return The MathMLElement child of this element that represents the new 367 * superscript in the DOM. 368 * @throws DOMException 369 * HIERARCHY_REQUEST_ERR: Raised if newScript represents an 370 * element that cannot be a superscript. INDEX_SIZE_ERR: 371 * Raised if colIndex is greater than one more than the number 372 * of scripts of the element. 373 */ 374 MathMLElement setSuperScriptAt(int colIndex, MathMLElement newScript) 375 throws DOMException; 376 };