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.AbstractUIPage; 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 page element. 044 * UIComponent class, generated from template {@code component1.2.stg} with class 045 * {@link org.apache.myfaces.tobago.internal.taglib.component.PageTagDeclaration}. 046 */ 047 public class UIPage 048 extends AbstractUIPage implements SupportsMarkup { 049 050 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Page"; 051 052 private org.apache.myfaces.tobago.context.Markup markup; 053 private org.apache.myfaces.tobago.layout.Measure marginLeft; 054 private java.lang.Object state; 055 private org.apache.myfaces.tobago.layout.Measure minimumHeight; 056 private java.lang.String focusId; 057 private org.apache.myfaces.tobago.layout.Measure borderLeft; 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 java.lang.String label; 076 private org.apache.myfaces.tobago.layout.Measure borderBottom; 077 private org.apache.myfaces.tobago.layout.Measure maximumWidth; 078 private org.apache.myfaces.tobago.layout.Measure paddingLeft; 079 private org.apache.myfaces.tobago.layout.Measure paddingRight; 080 private org.apache.myfaces.tobago.layout.Measure preferredWidth; 081 private org.apache.myfaces.tobago.layout.Measure marginBottom; 082 private org.apache.myfaces.tobago.layout.Measure borderTop; 083 private java.lang.Integer verticalIndex; 084 private org.apache.myfaces.tobago.context.Markup currentMarkup; 085 private java.lang.String applicationIcon; 086 private java.lang.Integer horizontalIndex; 087 088 089 public org.apache.myfaces.tobago.context.Markup getMarkup() { 090 if (markup != null) { 091 return markup; 092 } 093 ValueExpression ve = getValueExpression("markup"); 094 if (ve != null) { 095 try { 096 Object object = ve.getValue(getFacesContext().getELContext()); 097 return Markup.valueOf(object); 098 } catch (ELException e) { 099 throw new FacesException(e); 100 } 101 } 102 return null; 103 } 104 105 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) { 106 this.markup = markup; 107 } 108 109 public org.apache.myfaces.tobago.layout.Measure getMarginLeft() { 110 if (marginLeft != null) { 111 return marginLeft; 112 } 113 ValueExpression ve = getValueExpression("marginLeft"); 114 if (ve != null) { 115 try { 116 Object object = ve.getValue(getFacesContext().getELContext()); 117 return Measure.valueOf(object); 118 } catch (ELException e) { 119 throw new FacesException(e); 120 } 121 } 122 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this); 123 } 124 125 public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) { 126 this.marginLeft = marginLeft; 127 } 128 129 /** 130 <strong>ValueBindingExpression</strong> pointing to a object to save the 131 component's state. 132 133 @deprecated*/ 134 @Deprecated 135 public java.lang.Object getState() { 136 if (state != null) { 137 return state; 138 } 139 ValueExpression ve = getValueExpression("state"); 140 if (ve != null) { 141 try { 142 return (java.lang.Object) ve.getValue(getFacesContext().getELContext()); 143 } catch (ELException e) { 144 throw new FacesException(e); 145 } 146 } 147 return null; 148 } 149 150 @Deprecated 151 public void setState(java.lang.Object state) { 152 Deprecation.LOG.error("The attribute 'state' of 'UIPage' is deprecated. " 153 + "Please refer the documentation for further information."); 154 this.state = state; 155 } 156 157 public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() { 158 if (minimumHeight != null) { 159 return minimumHeight; 160 } 161 ValueExpression ve = getValueExpression("minimumHeight"); 162 if (ve != null) { 163 try { 164 Object object = ve.getValue(getFacesContext().getELContext()); 165 return Measure.valueOf(object); 166 } catch (ELException e) { 167 throw new FacesException(e); 168 } 169 } 170 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this); 171 } 172 173 public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) { 174 this.minimumHeight = minimumHeight; 175 } 176 177 /** 178 Contains the id of the component which should have the focus after 179 loading the page. 180 Set to empty string for disabling setting of focus. 181 Default (null) enables the "auto focus" feature. 182 183 */ 184 public java.lang.String getFocusId() { 185 if (focusId != null) { 186 return focusId; 187 } 188 ValueExpression ve = getValueExpression("focusId"); 189 if (ve != null) { 190 try { 191 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 192 } catch (ELException e) { 193 throw new FacesException(e); 194 } 195 } 196 return null; 197 } 198 199 public void setFocusId(java.lang.String focusId) { 200 this.focusId = focusId; 201 } 202 203 /** 204 This attribute is for internal use only. 205 206 */ 207 public org.apache.myfaces.tobago.layout.Measure getBorderLeft() { 208 if (borderLeft != null) { 209 return borderLeft; 210 } 211 ValueExpression ve = getValueExpression("borderLeft"); 212 if (ve != null) { 213 try { 214 Object object = ve.getValue(getFacesContext().getELContext()); 215 return Measure.valueOf(object); 216 } catch (ELException e) { 217 throw new FacesException(e); 218 } 219 } 220 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 221 getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this); 222 } 223 224 public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) { 225 this.borderLeft = borderLeft; 226 } 227 228 /** 229 This value will usually be set by the layout manager. 230 231 @deprecated*/ 232 @Deprecated 233 public org.apache.myfaces.tobago.layout.Measure getHeight() { 234 if (height != null) { 235 return height; 236 } 237 ValueExpression ve = getValueExpression("height"); 238 if (ve != null) { 239 try { 240 Object object = ve.getValue(getFacesContext().getELContext()); 241 return Measure.valueOf(object); 242 } catch (ELException e) { 243 throw new FacesException(e); 244 } 245 } 246 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getHeight(getFacesContext(), this); 247 } 248 249 @Deprecated 250 public void setHeight(org.apache.myfaces.tobago.layout.Measure height) { 251 this.height = height; 252 } 253 254 public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() { 255 if (minimumWidth != null) { 256 return minimumWidth; 257 } 258 ValueExpression ve = getValueExpression("minimumWidth"); 259 if (ve != null) { 260 try { 261 Object object = ve.getValue(getFacesContext().getELContext()); 262 return Measure.valueOf(object); 263 } catch (ELException e) { 264 throw new FacesException(e); 265 } 266 } 267 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this); 268 } 269 270 public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) { 271 this.minimumWidth = minimumWidth; 272 } 273 274 public java.lang.Integer getRowSpan() { 275 if (rowSpan != null) { 276 return rowSpan; 277 } 278 ValueExpression ve = getValueExpression("rowSpan"); 279 if (ve != null) { 280 try { 281 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 282 if (number != null) { 283 return number.intValue(); 284 } 285 } catch (ELException e) { 286 throw new FacesException(e); 287 } 288 } 289 return 1; 290 } 291 292 public void setRowSpan(java.lang.Integer rowSpan) { 293 this.rowSpan = rowSpan; 294 } 295 296 /** 297 This value will usually be set by the layout manager. 298 299 */ 300 public org.apache.myfaces.tobago.layout.Measure getLeft() { 301 if (left != null) { 302 return left; 303 } 304 ValueExpression ve = getValueExpression("left"); 305 if (ve != null) { 306 try { 307 Object object = ve.getValue(getFacesContext().getELContext()); 308 return Measure.valueOf(object); 309 } catch (ELException e) { 310 throw new FacesException(e); 311 } 312 } 313 return null; 314 } 315 316 public void setLeft(org.apache.myfaces.tobago.layout.Measure left) { 317 this.left = left; 318 } 319 320 public java.lang.Integer getColumnSpan() { 321 if (columnSpan != null) { 322 return columnSpan; 323 } 324 ValueExpression ve = getValueExpression("columnSpan"); 325 if (ve != null) { 326 try { 327 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 328 if (number != null) { 329 return number.intValue(); 330 } 331 } catch (ELException e) { 332 throw new FacesException(e); 333 } 334 } 335 return 1; 336 } 337 338 public void setColumnSpan(java.lang.Integer columnSpan) { 339 this.columnSpan = columnSpan; 340 } 341 342 /** 343 This attribute is for internal use only. 344 345 */ 346 public org.apache.myfaces.tobago.layout.Measure getBorderRight() { 347 if (borderRight != null) { 348 return borderRight; 349 } 350 ValueExpression ve = getValueExpression("borderRight"); 351 if (ve != null) { 352 try { 353 Object object = ve.getValue(getFacesContext().getELContext()); 354 return Measure.valueOf(object); 355 } catch (ELException e) { 356 throw new FacesException(e); 357 } 358 } 359 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 360 getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this); 361 } 362 363 public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) { 364 this.borderRight = borderRight; 365 } 366 367 /** 368 This attribute is for internal use only. 369 370 */ 371 public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() { 372 if (paddingBottom != null) { 373 return paddingBottom; 374 } 375 ValueExpression ve = getValueExpression("paddingBottom"); 376 if (ve != null) { 377 try { 378 Object object = ve.getValue(getFacesContext().getELContext()); 379 return Measure.valueOf(object); 380 } catch (ELException e) { 381 throw new FacesException(e); 382 } 383 } 384 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 385 getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this); 386 } 387 388 public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) { 389 this.paddingBottom = paddingBottom; 390 } 391 392 public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() { 393 if (maximumHeight != null) { 394 return maximumHeight; 395 } 396 ValueExpression ve = getValueExpression("maximumHeight"); 397 if (ve != null) { 398 try { 399 Object object = ve.getValue(getFacesContext().getELContext()); 400 return Measure.valueOf(object); 401 } catch (ELException e) { 402 throw new FacesException(e); 403 } 404 } 405 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this); 406 } 407 408 public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) { 409 this.maximumHeight = maximumHeight; 410 } 411 412 /** 413 This value will usually be set by the layout manager. 414 415 */ 416 public org.apache.myfaces.tobago.layout.Measure getTop() { 417 if (top != null) { 418 return top; 419 } 420 ValueExpression ve = getValueExpression("top"); 421 if (ve != null) { 422 try { 423 Object object = ve.getValue(getFacesContext().getELContext()); 424 return Measure.valueOf(object); 425 } catch (ELException e) { 426 throw new FacesException(e); 427 } 428 } 429 return null; 430 } 431 432 public void setTop(org.apache.myfaces.tobago.layout.Measure top) { 433 this.top = top; 434 } 435 436 /** 437 This value will usually be set by the layout manager. It holds the current width computed by the layout manager. 438 439 */ 440 public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() { 441 if (currentWidth != null) { 442 return currentWidth; 443 } 444 ValueExpression ve = getValueExpression("currentWidth"); 445 if (ve != null) { 446 try { 447 Object object = ve.getValue(getFacesContext().getELContext()); 448 return Measure.valueOf(object); 449 } catch (ELException e) { 450 throw new FacesException(e); 451 } 452 } 453 return getWidth(); 454 } 455 456 public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) { 457 this.currentWidth = currentWidth; 458 } 459 460 /** 461 This attribute is for internal use only. 462 463 */ 464 public org.apache.myfaces.tobago.layout.Measure getPaddingTop() { 465 if (paddingTop != null) { 466 return paddingTop; 467 } 468 ValueExpression ve = getValueExpression("paddingTop"); 469 if (ve != null) { 470 try { 471 Object object = ve.getValue(getFacesContext().getELContext()); 472 return Measure.valueOf(object); 473 } catch (ELException e) { 474 throw new FacesException(e); 475 } 476 } 477 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 478 getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this); 479 } 480 481 public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) { 482 this.paddingTop = paddingTop; 483 } 484 485 public org.apache.myfaces.tobago.layout.Measure getMarginTop() { 486 if (marginTop != null) { 487 return marginTop; 488 } 489 ValueExpression ve = getValueExpression("marginTop"); 490 if (ve != null) { 491 try { 492 Object object = ve.getValue(getFacesContext().getELContext()); 493 return Measure.valueOf(object); 494 } catch (ELException e) { 495 throw new FacesException(e); 496 } 497 } 498 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this); 499 } 500 501 public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) { 502 this.marginTop = marginTop; 503 } 504 505 public org.apache.myfaces.tobago.layout.Measure getMarginRight() { 506 if (marginRight != null) { 507 return marginRight; 508 } 509 ValueExpression ve = getValueExpression("marginRight"); 510 if (ve != null) { 511 try { 512 Object object = ve.getValue(getFacesContext().getELContext()); 513 return Measure.valueOf(object); 514 } catch (ELException e) { 515 throw new FacesException(e); 516 } 517 } 518 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this); 519 } 520 521 public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) { 522 this.marginRight = marginRight; 523 } 524 525 /** 526 This value will usually be set by the layout manager. 527 528 @deprecated*/ 529 @Deprecated 530 public org.apache.myfaces.tobago.layout.Measure getWidth() { 531 if (width != null) { 532 return width; 533 } 534 ValueExpression ve = getValueExpression("width"); 535 if (ve != null) { 536 try { 537 Object object = ve.getValue(getFacesContext().getELContext()); 538 return Measure.valueOf(object); 539 } catch (ELException e) { 540 throw new FacesException(e); 541 } 542 } 543 return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getWidth(getFacesContext(), this); 544 } 545 546 @Deprecated 547 public void setWidth(org.apache.myfaces.tobago.layout.Measure width) { 548 this.width = width; 549 } 550 551 /** 552 This value will usually be set by the layout manager. It holds the current height computed by the layout manager. 553 554 */ 555 public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() { 556 if (currentHeight != null) { 557 return currentHeight; 558 } 559 ValueExpression ve = getValueExpression("currentHeight"); 560 if (ve != null) { 561 try { 562 Object object = ve.getValue(getFacesContext().getELContext()); 563 return Measure.valueOf(object); 564 } catch (ELException e) { 565 throw new FacesException(e); 566 } 567 } 568 return getHeight(); 569 } 570 571 public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) { 572 this.currentHeight = currentHeight; 573 } 574 575 public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() { 576 if (preferredHeight != null) { 577 return preferredHeight; 578 } 579 ValueExpression ve = getValueExpression("preferredHeight"); 580 if (ve != null) { 581 try { 582 Object object = ve.getValue(getFacesContext().getELContext()); 583 return Measure.valueOf(object); 584 } catch (ELException e) { 585 throw new FacesException(e); 586 } 587 } 588 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this); 589 } 590 591 public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) { 592 this.preferredHeight = preferredHeight; 593 } 594 595 /** 596 This attribute is for internal use only. 597 598 */ 599 public org.apache.myfaces.tobago.layout.Display getDisplay() { 600 if (display != null) { 601 return display; 602 } 603 ValueExpression ve = getValueExpression("display"); 604 if (ve != null) { 605 try { 606 return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext()); 607 } catch (ELException e) { 608 throw new FacesException(e); 609 } 610 } 611 return null; 612 } 613 614 public void setDisplay(org.apache.myfaces.tobago.layout.Display display) { 615 this.display = display; 616 } 617 618 /** 619 Text value to display as label. 620 If text contains an underscore the next character is used as accesskey. 621 622 */ 623 public java.lang.String getLabel() { 624 if (label != null) { 625 return label; 626 } 627 ValueExpression ve = getValueExpression("label"); 628 if (ve != null) { 629 try { 630 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 631 } catch (ELException e) { 632 throw new FacesException(e); 633 } 634 } 635 return null; 636 } 637 638 public void setLabel(java.lang.String label) { 639 this.label = label; 640 } 641 642 /** 643 This attribute is for internal use only. 644 645 */ 646 public org.apache.myfaces.tobago.layout.Measure getBorderBottom() { 647 if (borderBottom != null) { 648 return borderBottom; 649 } 650 ValueExpression ve = getValueExpression("borderBottom"); 651 if (ve != null) { 652 try { 653 Object object = ve.getValue(getFacesContext().getELContext()); 654 return Measure.valueOf(object); 655 } catch (ELException e) { 656 throw new FacesException(e); 657 } 658 } 659 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 660 getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this); 661 } 662 663 public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) { 664 this.borderBottom = borderBottom; 665 } 666 667 public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() { 668 if (maximumWidth != null) { 669 return maximumWidth; 670 } 671 ValueExpression ve = getValueExpression("maximumWidth"); 672 if (ve != null) { 673 try { 674 Object object = ve.getValue(getFacesContext().getELContext()); 675 return Measure.valueOf(object); 676 } catch (ELException e) { 677 throw new FacesException(e); 678 } 679 } 680 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this); 681 } 682 683 public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) { 684 this.maximumWidth = maximumWidth; 685 } 686 687 /** 688 This attribute is for internal use only. 689 690 */ 691 public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() { 692 if (paddingLeft != null) { 693 return paddingLeft; 694 } 695 ValueExpression ve = getValueExpression("paddingLeft"); 696 if (ve != null) { 697 try { 698 Object object = ve.getValue(getFacesContext().getELContext()); 699 return Measure.valueOf(object); 700 } catch (ELException e) { 701 throw new FacesException(e); 702 } 703 } 704 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 705 getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this); 706 } 707 708 public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) { 709 this.paddingLeft = paddingLeft; 710 } 711 712 /** 713 This attribute is for internal use only. 714 715 */ 716 public org.apache.myfaces.tobago.layout.Measure getPaddingRight() { 717 if (paddingRight != null) { 718 return paddingRight; 719 } 720 ValueExpression ve = getValueExpression("paddingRight"); 721 if (ve != null) { 722 try { 723 Object object = ve.getValue(getFacesContext().getELContext()); 724 return Measure.valueOf(object); 725 } catch (ELException e) { 726 throw new FacesException(e); 727 } 728 } 729 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 730 getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this); 731 } 732 733 public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) { 734 this.paddingRight = paddingRight; 735 } 736 737 public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() { 738 if (preferredWidth != null) { 739 return preferredWidth; 740 } 741 ValueExpression ve = getValueExpression("preferredWidth"); 742 if (ve != null) { 743 try { 744 Object object = ve.getValue(getFacesContext().getELContext()); 745 return Measure.valueOf(object); 746 } catch (ELException e) { 747 throw new FacesException(e); 748 } 749 } 750 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this); 751 } 752 753 public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) { 754 this.preferredWidth = preferredWidth; 755 } 756 757 public org.apache.myfaces.tobago.layout.Measure getMarginBottom() { 758 if (marginBottom != null) { 759 return marginBottom; 760 } 761 ValueExpression ve = getValueExpression("marginBottom"); 762 if (ve != null) { 763 try { 764 Object object = ve.getValue(getFacesContext().getELContext()); 765 return Measure.valueOf(object); 766 } catch (ELException e) { 767 throw new FacesException(e); 768 } 769 } 770 return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this); 771 } 772 773 public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) { 774 this.marginBottom = marginBottom; 775 } 776 777 /** 778 This attribute is for internal use only. 779 780 */ 781 public org.apache.myfaces.tobago.layout.Measure getBorderTop() { 782 if (borderTop != null) { 783 return borderTop; 784 } 785 ValueExpression ve = getValueExpression("borderTop"); 786 if (ve != null) { 787 try { 788 Object object = ve.getValue(getFacesContext().getELContext()); 789 return Measure.valueOf(object); 790 } catch (ELException e) { 791 throw new FacesException(e); 792 } 793 } 794 return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) 795 getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this); 796 } 797 798 public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) { 799 this.borderTop = borderTop; 800 } 801 802 /** 803 This attribute is for internal use only. 804 805 */ 806 public java.lang.Integer getVerticalIndex() { 807 if (verticalIndex != null) { 808 return verticalIndex; 809 } 810 ValueExpression ve = getValueExpression("verticalIndex"); 811 if (ve != null) { 812 try { 813 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 814 if (number != null) { 815 return number.intValue(); 816 } 817 } catch (ELException e) { 818 throw new FacesException(e); 819 } 820 } 821 return null; 822 } 823 824 public void setVerticalIndex(java.lang.Integer verticalIndex) { 825 this.verticalIndex = verticalIndex; 826 } 827 828 public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() { 829 if (currentMarkup != null) { 830 return currentMarkup; 831 } 832 ValueExpression ve = getValueExpression("currentMarkup"); 833 if (ve != null) { 834 try { 835 Object object = ve.getValue(getFacesContext().getELContext()); 836 return Markup.valueOf(object); 837 } catch (ELException e) { 838 throw new FacesException(e); 839 } 840 } 841 return null; 842 } 843 844 public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) { 845 this.currentMarkup = currentMarkup; 846 } 847 848 /** 849 Absolute URL to an image or image name to lookup in tobago resource path 850 representing the application. In HTML it is used as a favicon. 851 852 */ 853 public java.lang.String getApplicationIcon() { 854 if (applicationIcon != null) { 855 return applicationIcon; 856 } 857 ValueExpression ve = getValueExpression("applicationIcon"); 858 if (ve != null) { 859 try { 860 return (java.lang.String) ve.getValue(getFacesContext().getELContext()); 861 } catch (ELException e) { 862 throw new FacesException(e); 863 } 864 } 865 return null; 866 } 867 868 public void setApplicationIcon(java.lang.String applicationIcon) { 869 this.applicationIcon = applicationIcon; 870 } 871 872 /** 873 This attribute is for internal use only. 874 875 */ 876 public java.lang.Integer getHorizontalIndex() { 877 if (horizontalIndex != null) { 878 return horizontalIndex; 879 } 880 ValueExpression ve = getValueExpression("horizontalIndex"); 881 if (ve != null) { 882 try { 883 Number number = (Number) ve.getValue(getFacesContext().getELContext()); 884 if (number != null) { 885 return number.intValue(); 886 } 887 } catch (ELException e) { 888 throw new FacesException(e); 889 } 890 } 891 return null; 892 } 893 894 public void setHorizontalIndex(java.lang.Integer horizontalIndex) { 895 this.horizontalIndex = horizontalIndex; 896 } 897 898 public void restoreState(FacesContext context, Object componentState) { 899 Object[] values = (Object[]) componentState; 900 super.restoreState(context, values[0]); 901 markup = (org.apache.myfaces.tobago.context.Markup) values[1]; 902 marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2]; 903 state = (java.lang.Object) values[3]; 904 minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[4]; 905 focusId = (java.lang.String) values[5]; 906 borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[6]; 907 height = (org.apache.myfaces.tobago.layout.Measure) values[7]; 908 minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[8]; 909 rowSpan = (java.lang.Integer) values[9]; 910 left = (org.apache.myfaces.tobago.layout.Measure) values[10]; 911 columnSpan = (java.lang.Integer) values[11]; 912 borderRight = (org.apache.myfaces.tobago.layout.Measure) values[12]; 913 paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[13]; 914 maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[14]; 915 top = (org.apache.myfaces.tobago.layout.Measure) values[15]; 916 currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[16]; 917 paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[17]; 918 marginTop = (org.apache.myfaces.tobago.layout.Measure) values[18]; 919 marginRight = (org.apache.myfaces.tobago.layout.Measure) values[19]; 920 width = (org.apache.myfaces.tobago.layout.Measure) values[20]; 921 currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[21]; 922 preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[22]; 923 display = (org.apache.myfaces.tobago.layout.Display) values[23]; 924 label = (java.lang.String) values[24]; 925 borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[25]; 926 maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[26]; 927 paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[27]; 928 paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[28]; 929 preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[29]; 930 marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[30]; 931 borderTop = (org.apache.myfaces.tobago.layout.Measure) values[31]; 932 verticalIndex = (java.lang.Integer) values[32]; 933 currentMarkup = (org.apache.myfaces.tobago.context.Markup) values[33]; 934 applicationIcon = (java.lang.String) values[34]; 935 horizontalIndex = (java.lang.Integer) values[35]; 936 } 937 938 public Object saveState(FacesContext context) { 939 Object[] values = new Object[36]; 940 values[0] = super.saveState(context); 941 values[1] = markup; 942 values[2] = marginLeft; 943 values[3] = state; 944 values[4] = minimumHeight; 945 values[5] = focusId; 946 values[6] = borderLeft; 947 values[7] = height; 948 values[8] = minimumWidth; 949 values[9] = rowSpan; 950 values[10] = left; 951 values[11] = columnSpan; 952 values[12] = borderRight; 953 values[13] = paddingBottom; 954 values[14] = maximumHeight; 955 values[15] = top; 956 values[16] = currentWidth; 957 values[17] = paddingTop; 958 values[18] = marginTop; 959 values[19] = marginRight; 960 values[20] = width; 961 values[21] = currentHeight; 962 values[22] = preferredHeight; 963 values[23] = display; 964 values[24] = label; 965 values[25] = borderBottom; 966 values[26] = maximumWidth; 967 values[27] = paddingLeft; 968 values[28] = paddingRight; 969 values[29] = preferredWidth; 970 values[30] = marginBottom; 971 values[31] = borderTop; 972 values[32] = verticalIndex; 973 values[33] = currentMarkup; 974 values[34] = applicationIcon; 975 values[35] = horizontalIndex; 976 return values; 977 } 978 979 980 }