(Style style)
| 489 | /// |
| 490 | /// - `style`: new values of styles from the current theme |
| 491 | public void merge(Style style) { |
| 492 | long tmp = modifiedFlag; |
| 493 | |
| 494 | if ((modifiedFlag & FG_COLOR_MODIFIED) == 0) { |
| 495 | setFgColor(style.getFgColor()); |
| 496 | } |
| 497 | if ((modifiedFlag & FG_ALPHA_MODIFIED) == 0) { |
| 498 | setFgAlpha(style.getFgAlpha()); |
| 499 | } |
| 500 | if ((modifiedFlag & BG_COLOR_MODIFIED) == 0) { |
| 501 | setBgColor(style.getBgColor()); |
| 502 | } |
| 503 | if ((modifiedFlag & BG_IMAGE_MODIFIED) == 0) { |
| 504 | setBgImage(style.getBgImage()); |
| 505 | } |
| 506 | if ((modifiedFlag & BACKGROUND_TYPE_MODIFIED) == 0) { |
| 507 | setBackgroundType(style.getBackgroundType()); |
| 508 | } |
| 509 | if ((modifiedFlag & BACKGROUND_ALIGNMENT_MODIFIED) == 0) { |
| 510 | setBackgroundAlignment(style.getBackgroundAlignment()); |
| 511 | } |
| 512 | if ((modifiedFlag & BACKGROUND_GRADIENT_MODIFIED) == 0) { |
| 513 | setBackgroundGradientStartColor(style.getBackgroundGradientStartColor()); |
| 514 | setBackgroundGradientEndColor(style.getBackgroundGradientEndColor()); |
| 515 | setBackgroundGradientRelativeX(style.getBackgroundGradientRelativeX()); |
| 516 | setBackgroundGradientRelativeY(style.getBackgroundGradientRelativeY()); |
| 517 | setBackgroundGradientRelativeSize(style.getBackgroundGradientRelativeSize()); |
| 518 | } |
| 519 | if ((modifiedFlag & FONT_MODIFIED) == 0) { |
| 520 | setFont(style.getFont()); |
| 521 | } |
| 522 | |
| 523 | if ((modifiedFlag & TRANSPARENCY_MODIFIED) == 0) { |
| 524 | setBgTransparency(style.getBgTransparency()); |
| 525 | } |
| 526 | |
| 527 | if ((modifiedFlag & OPACITY_MODIFIED) == 0) { |
| 528 | setOpacity(style.getOpacity()); |
| 529 | } |
| 530 | |
| 531 | if ((modifiedFlag & PADDING_MODIFIED) == 0) { |
| 532 | setPadding(style.padding[Component.TOP], |
| 533 | style.padding[Component.BOTTOM], |
| 534 | style.padding[Component.LEFT], |
| 535 | style.padding[Component.RIGHT]); |
| 536 | setPaddingUnit(paddingUnit); |
| 537 | } |
| 538 | |
| 539 | if ((modifiedFlag & MARGIN_MODIFIED) == 0) { |
| 540 | setMargin(style.margin[Component.TOP], |
| 541 | style.margin[Component.BOTTOM], |
| 542 | style.margin[Component.LEFT], |
| 543 | style.margin[Component.RIGHT]); |
| 544 | setMarginUnit(style.marginUnit); |
| 545 | } |
| 546 | |
| 547 | if ((modifiedFlag & BORDER_MODIFIED) == 0) { |
| 548 | setBorder(style.getBorder()); |
nothing calls this directly
no test coverage detected