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