| 1718 | | } else if (childID >= 0 && childID < items.length) { |
|---|
| 1719 | | location = items[childID].getBounds(); |
|---|
| 1720 | | } else if (showChevron && childID is items.length + CHEVRON_CHILD_ID) { |
|---|
| 1721 | | location = chevronRect; |
|---|
| 1722 | | } else if (showMin && childID is items.length + MINIMIZE_CHILD_ID) { |
|---|
| 1723 | | location = minRect; |
|---|
| 1724 | | } else if (showMax && childID is items.length + MAXIMIZE_CHILD_ID) { |
|---|
| 1725 | | location = maxRect; |
|---|
| 1726 | | } |
|---|
| 1727 | | if (location !is null) { |
|---|
| 1728 | | Point pt = toDisplay(location.x, location.y); |
|---|
| | 1721 | pt = getParent().toDisplay(location.x, location.y); |
|---|
| | 1722 | } else { |
|---|
| | 1723 | if (childID >= 0 && childID < items.length && items[childID].isShowing()) { |
|---|
| | 1724 | location = items[childID].getBounds(); |
|---|
| | 1725 | } else if (showChevron && childID is items.length + CHEVRON_CHILD_ID) { |
|---|
| | 1726 | location = chevronRect; |
|---|
| | 1727 | } else if (showMin && childID is items.length + MINIMIZE_CHILD_ID) { |
|---|
| | 1728 | location = minRect; |
|---|
| | 1729 | } else if (showMax && childID is items.length + MAXIMIZE_CHILD_ID) { |
|---|
| | 1730 | location = maxRect; |
|---|
| | 1731 | } |
|---|
| | 1732 | if (location !is null) { |
|---|
| | 1733 | pt = toDisplay(location.x, location.y); |
|---|
| | 1734 | } |
|---|
| | 1735 | } |
|---|
| | 1736 | if (location !is null && pt !is null) { |
|---|
| 3271 | | control = items[oldIndex].control; |
|---|
| 3272 | | if (control !is null && !control.isDisposed()) { |
|---|
| 3273 | | control.setVisible(false); |
|---|
| | 3275 | oldControl = items[oldIndex].control; |
|---|
| | 3276 | } |
|---|
| | 3277 | |
|---|
| | 3278 | if (newControl !is oldControl) { |
|---|
| | 3279 | if (newControl !is null && !newControl.isDisposed()) { |
|---|
| | 3280 | newControl.setBounds(getClientArea()); |
|---|
| | 3281 | newControl.setVisible(true); |
|---|
| | 3282 | } |
|---|
| | 3283 | if (oldControl !is null && !oldControl.isDisposed()) { |
|---|
| | 3284 | oldControl.setVisible(false); |
|---|