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