← 返回首页
Support widget groups to resolve #310 by karlduderstadt · Pull Request #428 · scijava/scijava-common · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Support widget groups to resolve #310#428

Open
karlduderstadt wants to merge 5 commits into
scijava:masterfrom
karlduderstadt:support_widget_groups
Open

Support widget groups to resolve #310#428
karlduderstadt wants to merge 5 commits into
scijava:masterfrom
karlduderstadt:support_widget_groups

Conversation

Copy link
Copy Markdown

karlduderstadt commented Aug 3, 2021
edited
Loading

This adds support for widget groups by adding ItemVisibility.GROUP and Parameter annotations group and expanded as well as all related implementations to interfaces and default classes.

Intended use is for the value of String Parameters with visibility GROUP to be used to create group labels. All Parameters with a matching group annotation to that value will be added to the widget group. The expanded annotation controls whether the parameters group are showing or not.

@Parameter(visibility = ItemVisibility.GROUP) private String basic = "basic"; @Parameter(group = "basic", label = "Number of ducks") private int duckCount = 1; @Parameter(visibility = ItemVisibility.GROUP, expanded = false) private String advanced = "advanced"; @Parameter(group = "advanced", label = "Advanced duck typing") private boolean advancedDuckTyping = true; @Parameter(group = "advanced", label = "Starvation threshold") private int starvationThreshold = 6;

and in scripts

#@ String (visibility = GROUP, value = "basic") basic #@ Integer (label = "Number of ducks", group = "basic") duckCount #@ String (visibility = GROUP, value = "advanced", expanded = false) advanced #@ Boolean (label = "Advanced duck typing", value = true, group = "advanced") advancedDuckTyping #@ Integer (label = "Starvation threshold", value = 6, group = "advanced") starvationThreshold

This PR supports a complete implementation of group labels that is realized in a corresponding PR in scijava-ui-swing - scijava/scijava-ui-swing#60 and resolves issue #310

ctrueden force-pushed the master branch 3 times, most recently from 53b6733 to 3dc99c9 Compare November 7, 2023 18:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Footer

© 2026 GitHub, Inc.