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.AbstractUIBox; 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 Renders a panel with border and title. 044 * UIComponent class, generated from template {@code component1.2.stg} with class 045 * {@link org.apache.myfaces.tobago.internal.taglib.component.BoxTagDeclaration}. 046 */ 047 public class UIBox 048 extends AbstractUIBox implements SupportsMarkup { 049 050 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Box"; 051 052 private org.apache.myfaces.tobago.context.Markup markup; 053 private org.apache.myfaces.tobago.layout.Measure marginLeft; 054 private org.apache.myfaces.tobago.layout.Measure minimumHeight; 055 private org.apache.myfaces.tobago.layout.Measure borderLeft; 056 private org.apache.myfaces.tobago.layout.Measure height; 057 private org.apache.myfaces.tobago.layout.Measure minimumWidth; 058 private java.lang.Integer rowSpan; 059 private org.apache.myfaces.tobago.layout.Measure left; 060 private java.lang.Integer columnSpan; 061 private org.apache.myfaces.tobago.layout.Measure borderRight; 062 private org.apache.myfaces.tobago.layout.Measure paddingBottom; 063 private org.apache.myfaces.tobago.layout.Measure maximumHeight; 064 private org.apache.myfaces.tobago.layout.Measure top; 065 private org.apache.myfaces.tobago.layout.Measure currentWidth; 066 private org.apache.myfaces.tobago.layout.Measure paddingTop; 067 private org.apache.myfaces.tobago.layout.Measure marginTop; 068 private org.apache.myfaces.tobago.layout.Measure marginRight; 069 private org.apache.myfaces.tobago.layout.Measure width; 070 private org.apache.myfaces.tobago.layout.Measure currentHeight; 071 private org.apache.myfaces.tobago.layout.Measure preferredHeight; 072 private java.lang.String label; 073 private org.apache.myfaces.tobago.layout.Display display; 074 private org.apache.myfaces.tobago.layout.Measure borderBottom; 075 private org.apache.myfaces.tobago.layout.Measure maximumWidth; 076 private org.apache.myfaces.tobago.layout.Measure paddingLeft; 077 private java.lang.Boolean collapsed; 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 This value will usually be set by the layout manager. 174 175 */ 176 public org.apache.myfaces.tobago.layout.Measure getHeight() { 177 if (height != null) { 178 return height; 179 } 180 ValueExpression ve = getValueExpression("height"); 181 if (ve != null) { 182 try { 183 Object object = ve.getValue(getFacesContext().getELContext()); 184 return Measure.valueOf(object); 185 } catch (ELException e) { 186 throw new FacesException(e); 187 } 188 } 189 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this); 190 } 191 192 public void setHeight(org.apache.myfaces.tobago.layout.Measure height) { 193 this.height = height; 194 } 195 196 public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() { 197 if (minimumWidth != null) { 198 return minimumWidth; 199 } 200 ValueExpression ve = getValueExpression("minimumWidth"); 201 if (ve != null) { 202 try { 203 Object object = ve.getValue(getFacesContext().getELContext()); 204 return Measure.valueOf(object); 205 } catch (ELException e) { 206 throw new FacesException(e); 207 } 208 } 209 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this); 210 } 211 212 public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) { 213 this.minimumWidth = minimumWidth; 214 } 215 216 public java.lang.Integer getRowSpan() { 217 if (rowSpan != null) { 218 return rowSpan; 219 } 220 ValueExpression ve = getValueExpression("rowSpan"); 221 if (ve != null) { 222 try { 223 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 224 if (number != null) { 225 return number.intValue(); 226 } 227 } catch (ELException e) { 228 throw new FacesException(e); 229 } 230 } 231 return 1; 232 } 233 234 public void setRowSpan(java.lang.Integer rowSpan) { 235 this.rowSpan = rowSpan; 236 } 237 238 /** 239 This value will usually be set by the layout manager. 240 241 */ 242 public org.apache.myfaces.tobago.layout.Measure getLeft() { 243 if (left != null) { 244 return left; 245 } 246 ValueExpression ve = getValueExpression("left"); 247 if (ve != null) { 248 try { 249 Object object = ve.getValue(getFacesContext().getELContext()); 250 return Measure.valueOf(object); 251 } catch (ELException e) { 252 throw new FacesException(e); 253 } 254 } 255 return null; 256 } 257 258 public void setLeft(org.apache.myfaces.tobago.layout.Measure left) { 259 this.left = left; 260 } 261 262 public java.lang.Integer getColumnSpan() { 263 if (columnSpan != null) { 264 return columnSpan; 265 } 266 ValueExpression ve = getValueExpression("columnSpan"); 267 if (ve != null) { 268 try { 269 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 270 if (number != null) { 271 return number.intValue(); 272 } 273 } catch (ELException e) { 274 throw new FacesException(e); 275 } 276 } 277 return 1; 278 } 279 280 public void setColumnSpan(java.lang.Integer columnSpan) { 281 this.columnSpan = columnSpan; 282 } 283 284 /** 285 This attribute is for internal use only. 286 287 */ 288 public org.apache.myfaces.tobago.layout.Measure getBorderRight() { 289 if (borderRight != null) { 290 return borderRight; 291 } 292 ValueExpression ve = getValueExpression("borderRight"); 293 if (ve != null) { 294 try { 295 Object object = ve.getValue(getFacesContext().getELContext()); 296 return Measure.valueOf(object); 297 } catch (ELException e) { 298 throw new FacesException(e); 299 } 300 } 301 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 302 getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this); 303 } 304 305 public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) { 306 this.borderRight = borderRight; 307 } 308 309 /** 310 This attribute is for internal use only. 311 312 */ 313 public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() { 314 if (paddingBottom != null) { 315 return paddingBottom; 316 } 317 ValueExpression ve = getValueExpression("paddingBottom"); 318 if (ve != null) { 319 try { 320 Object object = ve.getValue(getFacesContext().getELContext()); 321 return Measure.valueOf(object); 322 } catch (ELException e) { 323 throw new FacesException(e); 324 } 325 } 326 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 327 getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this); 328 } 329 330 public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) { 331 this.paddingBottom = paddingBottom; 332 } 333 334 public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() { 335 if (maximumHeight != null) { 336 return maximumHeight; 337 } 338 ValueExpression ve = getValueExpression("maximumHeight"); 339 if (ve != null) { 340 try { 341 Object object = ve.getValue(getFacesContext().getELContext()); 342 return Measure.valueOf(object); 343 } catch (ELException e) { 344 throw new FacesException(e); 345 } 346 } 347 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this); 348 } 349 350 public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) { 351 this.maximumHeight = maximumHeight; 352 } 353 354 /** 355 This value will usually be set by the layout manager. 356 357 */ 358 public org.apache.myfaces.tobago.layout.Measure getTop() { 359 if (top != null) { 360 return top; 361 } 362 ValueExpression ve = getValueExpression("top"); 363 if (ve != null) { 364 try { 365 Object object = ve.getValue(getFacesContext().getELContext()); 366 return Measure.valueOf(object); 367 } catch (ELException e) { 368 throw new FacesException(e); 369 } 370 } 371 return null; 372 } 373 374 public void setTop(org.apache.myfaces.tobago.layout.Measure top) { 375 this.top = top; 376 } 377 378 /** 379 This value will usually be set by the layout manager. It holds the current width computed by the layout manager. 380 381 */ 382 public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() { 383 if (currentWidth != null) { 384 return currentWidth; 385 } 386 ValueExpression ve = getValueExpression("currentWidth"); 387 if (ve != null) { 388 try { 389 Object object = ve.getValue(getFacesContext().getELContext()); 390 return Measure.valueOf(object); 391 } catch (ELException e) { 392 throw new FacesException(e); 393 } 394 } 395 return getWidth(); 396 } 397 398 public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) { 399 this.currentWidth = currentWidth; 400 } 401 402 /** 403 This attribute is for internal use only. 404 405 */ 406 public org.apache.myfaces.tobago.layout.Measure getPaddingTop() { 407 if (paddingTop != null) { 408 return paddingTop; 409 } 410 ValueExpression ve = getValueExpression("paddingTop"); 411 if (ve != null) { 412 try { 413 Object object = ve.getValue(getFacesContext().getELContext()); 414 return Measure.valueOf(object); 415 } catch (ELException e) { 416 throw new FacesException(e); 417 } 418 } 419 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 420 getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this); 421 } 422 423 public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) { 424 this.paddingTop = paddingTop; 425 } 426 427 public org.apache.myfaces.tobago.layout.Measure getMarginTop() { 428 if (marginTop != null) { 429 return marginTop; 430 } 431 ValueExpression ve = getValueExpression("marginTop"); 432 if (ve != null) { 433 try { 434 Object object = ve.getValue(getFacesContext().getELContext()); 435 return Measure.valueOf(object); 436 } catch (ELException e) { 437 throw new FacesException(e); 438 } 439 } 440 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this); 441 } 442 443 public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) { 444 this.marginTop = marginTop; 445 } 446 447 public org.apache.myfaces.tobago.layout.Measure getMarginRight() { 448 if (marginRight != null) { 449 return marginRight; 450 } 451 ValueExpression ve = getValueExpression("marginRight"); 452 if (ve != null) { 453 try { 454 Object object = ve.getValue(getFacesContext().getELContext()); 455 return Measure.valueOf(object); 456 } catch (ELException e) { 457 throw new FacesException(e); 458 } 459 } 460 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this); 461 } 462 463 public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) { 464 this.marginRight = marginRight; 465 } 466 467 /** 468 This value will usually be set by the layout manager. 469 470 */ 471 public org.apache.myfaces.tobago.layout.Measure getWidth() { 472 if (width != null) { 473 return width; 474 } 475 ValueExpression ve = getValueExpression("width"); 476 if (ve != null) { 477 try { 478 Object object = ve.getValue(getFacesContext().getELContext()); 479 return Measure.valueOf(object); 480 } catch (ELException e) { 481 throw new FacesException(e); 482 } 483 } 484 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this); 485 } 486 487 public void setWidth(org.apache.myfaces.tobago.layout.Measure width) { 488 this.width = width; 489 } 490 491 /** 492 This value will usually be set by the layout manager. It holds the current height computed by the layout manager. 493 494 */ 495 public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() { 496 if (currentHeight != null) { 497 return currentHeight; 498 } 499 ValueExpression ve = getValueExpression("currentHeight"); 500 if (ve != null) { 501 try { 502 Object object = ve.getValue(getFacesContext().getELContext()); 503 return Measure.valueOf(object); 504 } catch (ELException e) { 505 throw new FacesException(e); 506 } 507 } 508 return getHeight(); 509 } 510 511 public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) { 512 this.currentHeight = currentHeight; 513 } 514 515 public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() { 516 if (preferredHeight != null) { 517 return preferredHeight; 518 } 519 ValueExpression ve = getValueExpression("preferredHeight"); 520 if (ve != null) { 521 try { 522 Object object = ve.getValue(getFacesContext().getELContext()); 523 return Measure.valueOf(object); 524 } catch (ELException e) { 525 throw new FacesException(e); 526 } 527 } 528 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this); 529 } 530 531 public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) { 532 this.preferredHeight = preferredHeight; 533 } 534 535 /** 536 Text value to display as label. 537 If text contains an underscore the next character is used as accesskey. 538 539 */ 540 public java.lang.String getLabel() { 541 if (label != null) { 542 return label; 543 } 544 ValueExpression ve = getValueExpression("label"); 545 if (ve != null) { 546 try { 547 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 548 } catch (ELException e) { 549 throw new FacesException(e); 550 } 551 } 552 return null; 553 } 554 555 public void setLabel(java.lang.String label) { 556 this.label = label; 557 } 558 559 /** 560 This attribute is for internal use only. 561 562 */ 563 public org.apache.myfaces.tobago.layout.Display getDisplay() { 564 if (display != null) { 565 return display; 566 } 567 ValueExpression ve = getValueExpression("display"); 568 if (ve != null) { 569 try { 570 return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext()); 571 } catch (ELException e) { 572 throw new FacesException(e); 573 } 574 } 575 return null; 576 } 577 578 public void setDisplay(org.apache.myfaces.tobago.layout.Display display) { 579 this.display = display; 580 } 581 582 /** 583 This attribute is for internal use only. 584 585 */ 586 public org.apache.myfaces.tobago.layout.Measure getBorderBottom() { 587 if (borderBottom != null) { 588 return borderBottom; 589 } 590 ValueExpression ve = getValueExpression("borderBottom"); 591 if (ve != null) { 592 try { 593 Object object = ve.getValue(getFacesContext().getELContext()); 594 return Measure.valueOf(object); 595 } catch (ELException e) { 596 throw new FacesException(e); 597 } 598 } 599 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 600 getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this); 601 } 602 603 public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) { 604 this.borderBottom = borderBottom; 605 } 606 607 public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() { 608 if (maximumWidth != null) { 609 return maximumWidth; 610 } 611 ValueExpression ve = getValueExpression("maximumWidth"); 612 if (ve != null) { 613 try { 614 Object object = ve.getValue(getFacesContext().getELContext()); 615 return Measure.valueOf(object); 616 } catch (ELException e) { 617 throw new FacesException(e); 618 } 619 } 620 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this); 621 } 622 623 public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) { 624 this.maximumWidth = maximumWidth; 625 } 626 627 /** 628 This attribute is for internal use only. 629 630 */ 631 public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() { 632 if (paddingLeft != null) { 633 return paddingLeft; 634 } 635 ValueExpression ve = getValueExpression("paddingLeft"); 636 if (ve != null) { 637 try { 638 Object object = ve.getValue(getFacesContext().getELContext()); 639 return Measure.valueOf(object); 640 } catch (ELException e) { 641 throw new FacesException(e); 642 } 643 } 644 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 645 getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this); 646 } 647 648 public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) { 649 this.paddingLeft = paddingLeft; 650 } 651 652 /** 653 Flag indicating whether or not this component is collapsed. 654 <br />Default: <code>false</code> 655 */ 656 public boolean isCollapsed() { 657 if (collapsed != null) { 658 return collapsed; 659 } 660 ValueExpression ve = getValueExpression("collapsed"); 661 if (ve != null) { 662 try { 663 Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext()); 664 if (bool != null) { 665 return bool; 666 } 667 } catch (ELException e) { 668 throw new FacesException(e); 669 } 670 } 671 return false; 672 } 673 674 public void setCollapsed(boolean collapsed) { 675 this.collapsed = collapsed; 676 } 677 678 /** 679 This attribute is for internal use only. 680 681 */ 682 public org.apache.myfaces.tobago.layout.Measure getPaddingRight() { 683 if (paddingRight != null) { 684 return paddingRight; 685 } 686 ValueExpression ve = getValueExpression("paddingRight"); 687 if (ve != null) { 688 try { 689 Object object = ve.getValue(getFacesContext().getELContext()); 690 return Measure.valueOf(object); 691 } catch (ELException e) { 692 throw new FacesException(e); 693 } 694 } 695 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 696 getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this); 697 } 698 699 public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) { 700 this.paddingRight = paddingRight; 701 } 702 703 public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() { 704 if (preferredWidth != null) { 705 return preferredWidth; 706 } 707 ValueExpression ve = getValueExpression("preferredWidth"); 708 if (ve != null) { 709 try { 710 Object object = ve.getValue(getFacesContext().getELContext()); 711 return Measure.valueOf(object); 712 } catch (ELException e) { 713 throw new FacesException(e); 714 } 715 } 716 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this); 717 } 718 719 public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) { 720 this.preferredWidth = preferredWidth; 721 } 722 723 public org.apache.myfaces.tobago.layout.Measure getMarginBottom() { 724 if (marginBottom != null) { 725 return marginBottom; 726 } 727 ValueExpression ve = getValueExpression("marginBottom"); 728 if (ve != null) { 729 try { 730 Object object = ve.getValue(getFacesContext().getELContext()); 731 return Measure.valueOf(object); 732 } catch (ELException e) { 733 throw new FacesException(e); 734 } 735 } 736 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this); 737 } 738 739 public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) { 740 this.marginBottom = marginBottom; 741 } 742 743 /** 744 This attribute is for internal use only. 745 746 */ 747 public java.lang.Integer getVerticalIndex() { 748 if (verticalIndex != null) { 749 return verticalIndex; 750 } 751 ValueExpression ve = getValueExpression("verticalIndex"); 752 if (ve != null) { 753 try { 754 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 755 if (number != null) { 756 return number.intValue(); 757 } 758 } catch (ELException e) { 759 throw new FacesException(e); 760 } 761 } 762 return null; 763 } 764 765 public void setVerticalIndex(java.lang.Integer verticalIndex) { 766 this.verticalIndex = verticalIndex; 767 } 768 769 /** 770 This attribute is for internal use only. 771 772 */ 773 public org.apache.myfaces.tobago.layout.Measure getBorderTop() { 774 if (borderTop != null) { 775 return borderTop; 776 } 777 ValueExpression ve = getValueExpression("borderTop"); 778 if (ve != null) { 779 try { 780 Object object = ve.getValue(getFacesContext().getELContext()); 781 return Measure.valueOf(object); 782 } catch (ELException e) { 783 throw new FacesException(e); 784 } 785 } 786 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 787 getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this); 788 } 789 790 public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) { 791 this.borderTop = borderTop; 792 } 793 794 public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() { 795 if (currentMarkup != null) { 796 return currentMarkup; 797 } 798 ValueExpression ve = getValueExpression("currentMarkup"); 799 if (ve != null) { 800 try { 801 Object object = ve.getValue(getFacesContext().getELContext()); 802 return Markup.valueOf(object); 803 } catch (ELException e) { 804 throw new FacesException(e); 805 } 806 } 807 return null; 808 } 809 810 public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) { 811 this.currentMarkup = currentMarkup; 812 } 813 814 /** 815 This attribute is for internal use only. 816 817 */ 818 public java.lang.Integer getHorizontalIndex() { 819 if (horizontalIndex != null) { 820 return horizontalIndex; 821 } 822 ValueExpression ve = getValueExpression("horizontalIndex"); 823 if (ve != null) { 824 try { 825 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 826 if (number != null) { 827 return number.intValue(); 828 } 829 } catch (ELException e) { 830 throw new FacesException(e); 831 } 832 } 833 return null; 834 } 835 836 public void setHorizontalIndex(java.lang.Integer horizontalIndex) { 837 this.horizontalIndex = horizontalIndex; 838 } 839 840 public void restoreState(FacesContext context, Object componentState) { 841 Object[] values = (Object[]) componentState; 842 super.restoreState(context, values[0]); 843 markup = (org.apache.myfaces.tobago.context.Markup) values[1]; 844 marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2]; 845 minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[3]; 846 borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[4]; 847 height = (org.apache.myfaces.tobago.layout.Measure) values[5]; 848 minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[6]; 849 rowSpan = (java.lang.Integer) values[7]; 850 left = (org.apache.myfaces.tobago.layout.Measure) values[8]; 851 columnSpan = (java.lang.Integer) values[9]; 852 borderRight = (org.apache.myfaces.tobago.layout.Measure) values[10]; 853 paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[11]; 854 maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[12]; 855 top = (org.apache.myfaces.tobago.layout.Measure) values[13]; 856 currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[14]; 857 paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[15]; 858 marginTop = (org.apache.myfaces.tobago.layout.Measure) values[16]; 859 marginRight = (org.apache.myfaces.tobago.layout.Measure) values[17]; 860 width = (org.apache.myfaces.tobago.layout.Measure) values[18]; 861 currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[19]; 862 preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[20]; 863 label = (java.lang.String) values[21]; 864 display = (org.apache.myfaces.tobago.layout.Display) values[22]; 865 borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[23]; 866 maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[24]; 867 paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[25]; 868 collapsed = (java.lang.Boolean) values[26]; 869 paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[27]; 870 preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[28]; 871 marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[29]; 872 verticalIndex = (java.lang.Integer) values[30]; 873 borderTop = (org.apache.myfaces.tobago.layout.Measure) values[31]; 874 currentMarkup = (org.apache.myfaces.tobago.context.Markup) values[32]; 875 horizontalIndex = (java.lang.Integer) values[33]; 876 } 877 878 public Object saveState(FacesContext context) { 879 Object[] values = new Object[34]; 880 values[0] = super.saveState(context); 881 values[1] = markup; 882 values[2] = marginLeft; 883 values[3] = minimumHeight; 884 values[4] = borderLeft; 885 values[5] = height; 886 values[6] = minimumWidth; 887 values[7] = rowSpan; 888 values[8] = left; 889 values[9] = columnSpan; 890 values[10] = borderRight; 891 values[11] = paddingBottom; 892 values[12] = maximumHeight; 893 values[13] = top; 894 values[14] = currentWidth; 895 values[15] = paddingTop; 896 values[16] = marginTop; 897 values[17] = marginRight; 898 values[18] = width; 899 values[19] = currentHeight; 900 values[20] = preferredHeight; 901 values[21] = label; 902 values[22] = display; 903 values[23] = borderBottom; 904 values[24] = maximumWidth; 905 values[25] = paddingLeft; 906 values[26] = collapsed; 907 values[27] = paddingRight; 908 values[28] = preferredWidth; 909 values[29] = marginBottom; 910 values[30] = verticalIndex; 911 values[31] = borderTop; 912 values[32] = currentMarkup; 913 values[33] = horizontalIndex; 914 return values; 915 } 916 917 918 }