001 // ---------- Attention: Generated code, please do not modify! ----------- 002 003 /* 004 * Licensed to the Apache Software Foundation (ASF) under one or more 005 * contributor license agreements. See the NOTICE file distributed with 006 * this work for additional information regarding copyright ownership. 007 * The ASF licenses this file to You under the Apache License, Version 2.0 008 * (the "License"); you may not use this file except in compliance with 009 * the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019 020 package org.apache.myfaces.tobago.component; 021 022 import javax.faces.context.FacesContext; 023 import org.apache.myfaces.tobago.context.Markup; 024 import org.apache.myfaces.tobago.internal.component.AbstractUIPanel; 025 import org.apache.myfaces.tobago.layout.Display; 026 import org.apache.myfaces.tobago.layout.Measure; 027 import org.apache.commons.lang.ArrayUtils; 028 import org.apache.commons.lang.StringUtils; 029 import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression; 030 import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding; 031 import org.apache.myfaces.tobago.internal.util.Deprecation; 032 import org.apache.myfaces.tobago.renderkit.MarginValues; 033 import org.apache.myfaces.tobago.renderkit.SpacingValues; 034 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer; 035 import javax.el.ELException; 036 import javax.faces.FacesException; 037 import java.util.ArrayList; 038 import java.util.List; 039 import javax.el.MethodExpression; 040 import javax.el.ValueExpression; 041 042 /** 043 Intended for use in situations when only one UIComponent child can be 044 nested, such as in the case of facets. 045 * UIComponent class, generated from template {@code component1.2.stg} with class 046 * {@link org.apache.myfaces.tobago.internal.taglib.component.PanelTagDeclaration}. 047 */ 048 public class UIPanel 049 extends AbstractUIPanel implements SupportsMarkup { 050 051 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Panel"; 052 053 private org.apache.myfaces.tobago.context.Markup markup; 054 private org.apache.myfaces.tobago.layout.Measure marginLeft; 055 private org.apache.myfaces.tobago.layout.Measure minimumHeight; 056 private org.apache.myfaces.tobago.layout.Measure borderLeft; 057 private java.lang.String tip; 058 private org.apache.myfaces.tobago.layout.Measure height; 059 private org.apache.myfaces.tobago.layout.Measure minimumWidth; 060 private java.lang.Integer rowSpan; 061 private org.apache.myfaces.tobago.layout.Measure left; 062 private java.lang.Integer columnSpan; 063 private org.apache.myfaces.tobago.layout.Measure borderRight; 064 private org.apache.myfaces.tobago.layout.Measure paddingBottom; 065 private org.apache.myfaces.tobago.layout.Measure maximumHeight; 066 private org.apache.myfaces.tobago.layout.Measure top; 067 private org.apache.myfaces.tobago.layout.Measure currentWidth; 068 private org.apache.myfaces.tobago.layout.Measure paddingTop; 069 private org.apache.myfaces.tobago.layout.Measure marginTop; 070 private org.apache.myfaces.tobago.layout.Measure marginRight; 071 private org.apache.myfaces.tobago.layout.Measure width; 072 private org.apache.myfaces.tobago.layout.Measure currentHeight; 073 private org.apache.myfaces.tobago.layout.Measure preferredHeight; 074 private org.apache.myfaces.tobago.layout.Display display; 075 private org.apache.myfaces.tobago.layout.Measure borderBottom; 076 private org.apache.myfaces.tobago.layout.Measure maximumWidth; 077 private org.apache.myfaces.tobago.layout.Measure paddingLeft; 078 private org.apache.myfaces.tobago.layout.Measure paddingRight; 079 private org.apache.myfaces.tobago.layout.Measure preferredWidth; 080 private org.apache.myfaces.tobago.layout.Measure marginBottom; 081 private java.lang.Integer verticalIndex; 082 private org.apache.myfaces.tobago.layout.Measure borderTop; 083 private org.apache.myfaces.tobago.context.Markup currentMarkup; 084 private java.lang.Integer horizontalIndex; 085 086 087 public org.apache.myfaces.tobago.context.Markup getMarkup() { 088 if (markup != null) { 089 return markup; 090 } 091 ValueExpression ve = getValueExpression("markup"); 092 if (ve != null) { 093 try { 094 Object object = ve.getValue(getFacesContext().getELContext()); 095 return Markup.valueOf(object); 096 } catch (ELException e) { 097 throw new FacesException(e); 098 } 099 } 100 return null; 101 } 102 103 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) { 104 this.markup = markup; 105 } 106 107 public org.apache.myfaces.tobago.layout.Measure getMarginLeft() { 108 if (marginLeft != null) { 109 return marginLeft; 110 } 111 ValueExpression ve = getValueExpression("marginLeft"); 112 if (ve != null) { 113 try { 114 Object object = ve.getValue(getFacesContext().getELContext()); 115 return Measure.valueOf(object); 116 } catch (ELException e) { 117 throw new FacesException(e); 118 } 119 } 120 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this); 121 } 122 123 public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) { 124 this.marginLeft = marginLeft; 125 } 126 127 public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() { 128 if (minimumHeight != null) { 129 return minimumHeight; 130 } 131 ValueExpression ve = getValueExpression("minimumHeight"); 132 if (ve != null) { 133 try { 134 Object object = ve.getValue(getFacesContext().getELContext()); 135 return Measure.valueOf(object); 136 } catch (ELException e) { 137 throw new FacesException(e); 138 } 139 } 140 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this); 141 } 142 143 public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) { 144 this.minimumHeight = minimumHeight; 145 } 146 147 /** 148 This attribute is for internal use only. 149 150 */ 151 public org.apache.myfaces.tobago.layout.Measure getBorderLeft() { 152 if (borderLeft != null) { 153 return borderLeft; 154 } 155 ValueExpression ve = getValueExpression("borderLeft"); 156 if (ve != null) { 157 try { 158 Object object = ve.getValue(getFacesContext().getELContext()); 159 return Measure.valueOf(object); 160 } catch (ELException e) { 161 throw new FacesException(e); 162 } 163 } 164 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 165 getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this); 166 } 167 168 public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) { 169 this.borderLeft = borderLeft; 170 } 171 172 /** 173 Text value to display as tooltip. 174 175 */ 176 public java.lang.String getTip() { 177 if (tip != null) { 178 return tip; 179 } 180 ValueExpression ve = getValueExpression("tip"); 181 if (ve != null) { 182 try { 183 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 184 } catch (ELException e) { 185 throw new FacesException(e); 186 } 187 } 188 return null; 189 } 190 191 public void setTip(java.lang.String tip) { 192 this.tip = tip; 193 } 194 195 /** 196 This value will usually be set by the layout manager. 197 198 */ 199 public org.apache.myfaces.tobago.layout.Measure getHeight() { 200 if (height != null) { 201 return height; 202 } 203 ValueExpression ve = getValueExpression("height"); 204 if (ve != null) { 205 try { 206 Object object = ve.getValue(getFacesContext().getELContext()); 207 return Measure.valueOf(object); 208 } catch (ELException e) { 209 throw new FacesException(e); 210 } 211 } 212 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this); 213 } 214 215 public void setHeight(org.apache.myfaces.tobago.layout.Measure height) { 216 this.height = height; 217 } 218 219 public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() { 220 if (minimumWidth != null) { 221 return minimumWidth; 222 } 223 ValueExpression ve = getValueExpression("minimumWidth"); 224 if (ve != null) { 225 try { 226 Object object = ve.getValue(getFacesContext().getELContext()); 227 return Measure.valueOf(object); 228 } catch (ELException e) { 229 throw new FacesException(e); 230 } 231 } 232 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this); 233 } 234 235 public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) { 236 this.minimumWidth = minimumWidth; 237 } 238 239 public java.lang.Integer getRowSpan() { 240 if (rowSpan != null) { 241 return rowSpan; 242 } 243 ValueExpression ve = getValueExpression("rowSpan"); 244 if (ve != null) { 245 try { 246 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 247 if (number != null) { 248 return number.intValue(); 249 } 250 } catch (ELException e) { 251 throw new FacesException(e); 252 } 253 } 254 return 1; 255 } 256 257 public void setRowSpan(java.lang.Integer rowSpan) { 258 this.rowSpan = rowSpan; 259 } 260 261 /** 262 This value will usually be set by the layout manager. 263 264 */ 265 public org.apache.myfaces.tobago.layout.Measure getLeft() { 266 if (left != null) { 267 return left; 268 } 269 ValueExpression ve = getValueExpression("left"); 270 if (ve != null) { 271 try { 272 Object object = ve.getValue(getFacesContext().getELContext()); 273 return Measure.valueOf(object); 274 } catch (ELException e) { 275 throw new FacesException(e); 276 } 277 } 278 return null; 279 } 280 281 public void setLeft(org.apache.myfaces.tobago.layout.Measure left) { 282 this.left = left; 283 } 284 285 public java.lang.Integer getColumnSpan() { 286 if (columnSpan != null) { 287 return columnSpan; 288 } 289 ValueExpression ve = getValueExpression("columnSpan"); 290 if (ve != null) { 291 try { 292 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 293 if (number != null) { 294 return number.intValue(); 295 } 296 } catch (ELException e) { 297 throw new FacesException(e); 298 } 299 } 300 return 1; 301 } 302 303 public void setColumnSpan(java.lang.Integer columnSpan) { 304 this.columnSpan = columnSpan; 305 } 306 307 /** 308 This attribute is for internal use only. 309 310 */ 311 public org.apache.myfaces.tobago.layout.Measure getBorderRight() { 312 if (borderRight != null) { 313 return borderRight; 314 } 315 ValueExpression ve = getValueExpression("borderRight"); 316 if (ve != null) { 317 try { 318 Object object = ve.getValue(getFacesContext().getELContext()); 319 return Measure.valueOf(object); 320 } catch (ELException e) { 321 throw new FacesException(e); 322 } 323 } 324 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 325 getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this); 326 } 327 328 public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) { 329 this.borderRight = borderRight; 330 } 331 332 /** 333 This attribute is for internal use only. 334 335 */ 336 public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() { 337 if (paddingBottom != null) { 338 return paddingBottom; 339 } 340 ValueExpression ve = getValueExpression("paddingBottom"); 341 if (ve != null) { 342 try { 343 Object object = ve.getValue(getFacesContext().getELContext()); 344 return Measure.valueOf(object); 345 } catch (ELException e) { 346 throw new FacesException(e); 347 } 348 } 349 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 350 getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this); 351 } 352 353 public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) { 354 this.paddingBottom = paddingBottom; 355 } 356 357 public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() { 358 if (maximumHeight != null) { 359 return maximumHeight; 360 } 361 ValueExpression ve = getValueExpression("maximumHeight"); 362 if (ve != null) { 363 try { 364 Object object = ve.getValue(getFacesContext().getELContext()); 365 return Measure.valueOf(object); 366 } catch (ELException e) { 367 throw new FacesException(e); 368 } 369 } 370 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this); 371 } 372 373 public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) { 374 this.maximumHeight = maximumHeight; 375 } 376 377 /** 378 This value will usually be set by the layout manager. 379 380 */ 381 public org.apache.myfaces.tobago.layout.Measure getTop() { 382 if (top != null) { 383 return top; 384 } 385 ValueExpression ve = getValueExpression("top"); 386 if (ve != null) { 387 try { 388 Object object = ve.getValue(getFacesContext().getELContext()); 389 return Measure.valueOf(object); 390 } catch (ELException e) { 391 throw new FacesException(e); 392 } 393 } 394 return null; 395 } 396 397 public void setTop(org.apache.myfaces.tobago.layout.Measure top) { 398 this.top = top; 399 } 400 401 /** 402 This value will usually be set by the layout manager. It holds the current width computed by the layout manager. 403 404 */ 405 public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() { 406 if (currentWidth != null) { 407 return currentWidth; 408 } 409 ValueExpression ve = getValueExpression("currentWidth"); 410 if (ve != null) { 411 try { 412 Object object = ve.getValue(getFacesContext().getELContext()); 413 return Measure.valueOf(object); 414 } catch (ELException e) { 415 throw new FacesException(e); 416 } 417 } 418 return getWidth(); 419 } 420 421 public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) { 422 this.currentWidth = currentWidth; 423 } 424 425 /** 426 This attribute is for internal use only. 427 428 */ 429 public org.apache.myfaces.tobago.layout.Measure getPaddingTop() { 430 if (paddingTop != null) { 431 return paddingTop; 432 } 433 ValueExpression ve = getValueExpression("paddingTop"); 434 if (ve != null) { 435 try { 436 Object object = ve.getValue(getFacesContext().getELContext()); 437 return Measure.valueOf(object); 438 } catch (ELException e) { 439 throw new FacesException(e); 440 } 441 } 442 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 443 getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this); 444 } 445 446 public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) { 447 this.paddingTop = paddingTop; 448 } 449 450 public org.apache.myfaces.tobago.layout.Measure getMarginTop() { 451 if (marginTop != null) { 452 return marginTop; 453 } 454 ValueExpression ve = getValueExpression("marginTop"); 455 if (ve != null) { 456 try { 457 Object object = ve.getValue(getFacesContext().getELContext()); 458 return Measure.valueOf(object); 459 } catch (ELException e) { 460 throw new FacesException(e); 461 } 462 } 463 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this); 464 } 465 466 public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) { 467 this.marginTop = marginTop; 468 } 469 470 public org.apache.myfaces.tobago.layout.Measure getMarginRight() { 471 if (marginRight != null) { 472 return marginRight; 473 } 474 ValueExpression ve = getValueExpression("marginRight"); 475 if (ve != null) { 476 try { 477 Object object = ve.getValue(getFacesContext().getELContext()); 478 return Measure.valueOf(object); 479 } catch (ELException e) { 480 throw new FacesException(e); 481 } 482 } 483 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this); 484 } 485 486 public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) { 487 this.marginRight = marginRight; 488 } 489 490 /** 491 This value will usually be set by the layout manager. 492 493 */ 494 public org.apache.myfaces.tobago.layout.Measure getWidth() { 495 if (width != null) { 496 return width; 497 } 498 ValueExpression ve = getValueExpression("width"); 499 if (ve != null) { 500 try { 501 Object object = ve.getValue(getFacesContext().getELContext()); 502 return Measure.valueOf(object); 503 } catch (ELException e) { 504 throw new FacesException(e); 505 } 506 } 507 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this); 508 } 509 510 public void setWidth(org.apache.myfaces.tobago.layout.Measure width) { 511 this.width = width; 512 } 513 514 /** 515 This value will usually be set by the layout manager. It holds the current height computed by the layout manager. 516 517 */ 518 public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() { 519 if (currentHeight != null) { 520 return currentHeight; 521 } 522 ValueExpression ve = getValueExpression("currentHeight"); 523 if (ve != null) { 524 try { 525 Object object = ve.getValue(getFacesContext().getELContext()); 526 return Measure.valueOf(object); 527 } catch (ELException e) { 528 throw new FacesException(e); 529 } 530 } 531 return getHeight(); 532 } 533 534 public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) { 535 this.currentHeight = currentHeight; 536 } 537 538 public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() { 539 if (preferredHeight != null) { 540 return preferredHeight; 541 } 542 ValueExpression ve = getValueExpression("preferredHeight"); 543 if (ve != null) { 544 try { 545 Object object = ve.getValue(getFacesContext().getELContext()); 546 return Measure.valueOf(object); 547 } catch (ELException e) { 548 throw new FacesException(e); 549 } 550 } 551 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this); 552 } 553 554 public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) { 555 this.preferredHeight = preferredHeight; 556 } 557 558 /** 559 This attribute is for internal use only. 560 561 */ 562 public org.apache.myfaces.tobago.layout.Display getDisplay() { 563 if (display != null) { 564 return display; 565 } 566 ValueExpression ve = getValueExpression("display"); 567 if (ve != null) { 568 try { 569 return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext()); 570 } catch (ELException e) { 571 throw new FacesException(e); 572 } 573 } 574 return null; 575 } 576 577 public void setDisplay(org.apache.myfaces.tobago.layout.Display display) { 578 this.display = display; 579 } 580 581 /** 582 This attribute is for internal use only. 583 584 */ 585 public org.apache.myfaces.tobago.layout.Measure getBorderBottom() { 586 if (borderBottom != null) { 587 return borderBottom; 588 } 589 ValueExpression ve = getValueExpression("borderBottom"); 590 if (ve != null) { 591 try { 592 Object object = ve.getValue(getFacesContext().getELContext()); 593 return Measure.valueOf(object); 594 } catch (ELException e) { 595 throw new FacesException(e); 596 } 597 } 598 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 599 getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this); 600 } 601 602 public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) { 603 this.borderBottom = borderBottom; 604 } 605 606 public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() { 607 if (maximumWidth != null) { 608 return maximumWidth; 609 } 610 ValueExpression ve = getValueExpression("maximumWidth"); 611 if (ve != null) { 612 try { 613 Object object = ve.getValue(getFacesContext().getELContext()); 614 return Measure.valueOf(object); 615 } catch (ELException e) { 616 throw new FacesException(e); 617 } 618 } 619 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this); 620 } 621 622 public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) { 623 this.maximumWidth = maximumWidth; 624 } 625 626 /** 627 This attribute is for internal use only. 628 629 */ 630 public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() { 631 if (paddingLeft != null) { 632 return paddingLeft; 633 } 634 ValueExpression ve = getValueExpression("paddingLeft"); 635 if (ve != null) { 636 try { 637 Object object = ve.getValue(getFacesContext().getELContext()); 638 return Measure.valueOf(object); 639 } catch (ELException e) { 640 throw new FacesException(e); 641 } 642 } 643 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 644 getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this); 645 } 646 647 public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) { 648 this.paddingLeft = paddingLeft; 649 } 650 651 /** 652 This attribute is for internal use only. 653 654 */ 655 public org.apache.myfaces.tobago.layout.Measure getPaddingRight() { 656 if (paddingRight != null) { 657 return paddingRight; 658 } 659 ValueExpression ve = getValueExpression("paddingRight"); 660 if (ve != null) { 661 try { 662 Object object = ve.getValue(getFacesContext().getELContext()); 663 return Measure.valueOf(object); 664 } catch (ELException e) { 665 throw new FacesException(e); 666 } 667 } 668 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 669 getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this); 670 } 671 672 public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) { 673 this.paddingRight = paddingRight; 674 } 675 676 public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() { 677 if (preferredWidth != null) { 678 return preferredWidth; 679 } 680 ValueExpression ve = getValueExpression("preferredWidth"); 681 if (ve != null) { 682 try { 683 Object object = ve.getValue(getFacesContext().getELContext()); 684 return Measure.valueOf(object); 685 } catch (ELException e) { 686 throw new FacesException(e); 687 } 688 } 689 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this); 690 } 691 692 public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) { 693 this.preferredWidth = preferredWidth; 694 } 695 696 public org.apache.myfaces.tobago.layout.Measure getMarginBottom() { 697 if (marginBottom != null) { 698 return marginBottom; 699 } 700 ValueExpression ve = getValueExpression("marginBottom"); 701 if (ve != null) { 702 try { 703 Object object = ve.getValue(getFacesContext().getELContext()); 704 return Measure.valueOf(object); 705 } catch (ELException e) { 706 throw new FacesException(e); 707 } 708 } 709 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this); 710 } 711 712 public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) { 713 this.marginBottom = marginBottom; 714 } 715 716 /** 717 This attribute is for internal use only. 718 719 */ 720 public java.lang.Integer getVerticalIndex() { 721 if (verticalIndex != null) { 722 return verticalIndex; 723 } 724 ValueExpression ve = getValueExpression("verticalIndex"); 725 if (ve != null) { 726 try { 727 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 728 if (number != null) { 729 return number.intValue(); 730 } 731 } catch (ELException e) { 732 throw new FacesException(e); 733 } 734 } 735 return null; 736 } 737 738 public void setVerticalIndex(java.lang.Integer verticalIndex) { 739 this.verticalIndex = verticalIndex; 740 } 741 742 /** 743 This attribute is for internal use only. 744 745 */ 746 public org.apache.myfaces.tobago.layout.Measure getBorderTop() { 747 if (borderTop != null) { 748 return borderTop; 749 } 750 ValueExpression ve = getValueExpression("borderTop"); 751 if (ve != null) { 752 try { 753 Object object = ve.getValue(getFacesContext().getELContext()); 754 return Measure.valueOf(object); 755 } catch (ELException e) { 756 throw new FacesException(e); 757 } 758 } 759 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 760 getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this); 761 } 762 763 public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) { 764 this.borderTop = borderTop; 765 } 766 767 public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() { 768 if (currentMarkup != null) { 769 return currentMarkup; 770 } 771 ValueExpression ve = getValueExpression("currentMarkup"); 772 if (ve != null) { 773 try { 774 Object object = ve.getValue(getFacesContext().getELContext()); 775 return Markup.valueOf(object); 776 } catch (ELException e) { 777 throw new FacesException(e); 778 } 779 } 780 return null; 781 } 782 783 public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) { 784 this.currentMarkup = currentMarkup; 785 } 786 787 /** 788 This attribute is for internal use only. 789 790 */ 791 public java.lang.Integer getHorizontalIndex() { 792 if (horizontalIndex != null) { 793 return horizontalIndex; 794 } 795 ValueExpression ve = getValueExpression("horizontalIndex"); 796 if (ve != null) { 797 try { 798 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 799 if (number != null) { 800 return number.intValue(); 801 } 802 } catch (ELException e) { 803 throw new FacesException(e); 804 } 805 } 806 return null; 807 } 808 809 public void setHorizontalIndex(java.lang.Integer horizontalIndex) { 810 this.horizontalIndex = horizontalIndex; 811 } 812 813 public void restoreState(FacesContext context, Object componentState) { 814 Object[] values = (Object[]) componentState; 815 super.restoreState(context, values[0]); 816 markup = (org.apache.myfaces.tobago.context.Markup) values[1]; 817 marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2]; 818 minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[3]; 819 borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[4]; 820 tip = (java.lang.String) values[5]; 821 height = (org.apache.myfaces.tobago.layout.Measure) values[6]; 822 minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[7]; 823 rowSpan = (java.lang.Integer) values[8]; 824 left = (org.apache.myfaces.tobago.layout.Measure) values[9]; 825 columnSpan = (java.lang.Integer) values[10]; 826 borderRight = (org.apache.myfaces.tobago.layout.Measure) values[11]; 827 paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[12]; 828 maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[13]; 829 top = (org.apache.myfaces.tobago.layout.Measure) values[14]; 830 currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[15]; 831 paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[16]; 832 marginTop = (org.apache.myfaces.tobago.layout.Measure) values[17]; 833 marginRight = (org.apache.myfaces.tobago.layout.Measure) values[18]; 834 width = (org.apache.myfaces.tobago.layout.Measure) values[19]; 835 currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[20]; 836 preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[21]; 837 display = (org.apache.myfaces.tobago.layout.Display) values[22]; 838 borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[23]; 839 maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[24]; 840 paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[25]; 841 paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[26]; 842 preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[27]; 843 marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[28]; 844 verticalIndex = (java.lang.Integer) values[29]; 845 borderTop = (org.apache.myfaces.tobago.layout.Measure) values[30]; 846 currentMarkup = (org.apache.myfaces.tobago.context.Markup) values[31]; 847 horizontalIndex = (java.lang.Integer) values[32]; 848 } 849 850 public Object saveState(FacesContext context) { 851 Object[] values = new Object[33]; 852 values[0] = super.saveState(context); 853 values[1] = markup; 854 values[2] = marginLeft; 855 values[3] = minimumHeight; 856 values[4] = borderLeft; 857 values[5] = tip; 858 values[6] = height; 859 values[7] = minimumWidth; 860 values[8] = rowSpan; 861 values[9] = left; 862 values[10] = columnSpan; 863 values[11] = borderRight; 864 values[12] = paddingBottom; 865 values[13] = maximumHeight; 866 values[14] = top; 867 values[15] = currentWidth; 868 values[16] = paddingTop; 869 values[17] = marginTop; 870 values[18] = marginRight; 871 values[19] = width; 872 values[20] = currentHeight; 873 values[21] = preferredHeight; 874 values[22] = display; 875 values[23] = borderBottom; 876 values[24] = maximumWidth; 877 values[25] = paddingLeft; 878 values[26] = paddingRight; 879 values[27] = preferredWidth; 880 values[28] = marginBottom; 881 values[29] = verticalIndex; 882 values[30] = borderTop; 883 values[31] = currentMarkup; 884 values[32] = horizontalIndex; 885 return values; 886 } 887 888 889 }