RFR: JDK-8292669: IGV: Search not useable when in Overflow Toolbar [v4]
Tobias Holenstein
tholenstein at openjdk.org
Wed Aug 24 14:22:35 UTC 2022
> ## Overview
>
> The toolbar of the `EditorTopComponent` uses an overflow toolbar when it does not fit in the width of the TopComponent. When the window was not wide enough the `QuickSearch` used to land in the overflow toolbar. Unfortunately, `QuickSearch` stops working in the overflow toolbar.
>
> Now the `QuickSearch` never lands in the overflow toolbar anymore as shown bellow:
> <img width="922" alt="ToolbarOverflow" src="https://user-images.githubusercontent.com/71546117/186420098-5fcb2348-b955-40c5-b5ca-2bc38525ffcf.png">
>
> Since the Netbeans Platform only allows for one occurrence of `QuickSearch`, it is only shown in the `EditorTopComponent` that was selected last.
>
> ## Implementation
> We introduce a new `JPanel` named `topPanel` as a parent container.
> <img width="889" alt="topPanel" src="https://user-images.githubusercontent.com/71546117/186420990-9888e17d-6c45-4b7d-86a5-1fe2981f197d.png">
>
> `topPanel` contains another `JPanel` `toolbarPanel` and a `Toolbar` `quickSearchToolbar`:
> <img width="889" alt="Toolbars" src="https://user-images.githubusercontent.com/71546117/186421595-08a74998-b783-43f1-bd15-c41e7fdcbd23.png">
>
> `toolbarPanel` uses the `GridLayout` which gives the original `Toolbar` `toolBar` the maximal available width while still allowing it to overflow.
> On the right we have `quickSearchToolbar`, a `Toolbar` with a single element `quickSearchPresenter`. We give `quickSearchPresenter` a minimum size and use the `BoxLayout` in `quickSearchToolbar` that respects the minimum size of its children. Therefore the `quickSearchToolbar` never overflows.
> <img width="889" alt="Toolbars_inner" src="https://user-images.githubusercontent.com/71546117/186421729-2591e753-a111-4d09-9fc6-14839730b669.png">
Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
Update src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java
Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/9940/files
- new: https://git.openjdk.org/jdk/pull/9940/files/11f02ffe..0cac9614
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=9940&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=9940&range=02-03
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/9940.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9940/head:pull/9940
PR: https://git.openjdk.org/jdk/pull/9940
More information about the hotspot-compiler-dev
mailing list