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