Skip to content

Commit 84c30c0

Browse files
committed
SwingMessageWidget: allow labeled messages
Unlike other parameters, messages will only be labeled if a label was actually specified. That is: a label will not be synthesized from the parameter name when the label attribute is unset.
1 parent 9e1594d commit 84c30c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/scijava/ui/swing/widget/SwingMessageWidget.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public String getValue() {
6060

6161
@Override
6262
public boolean isLabeled() {
63-
return false;
63+
final String l = get().getItem().getLabel();
64+
return l == null || l.isEmpty();
6465
}
6566

6667
@Override

0 commit comments

Comments
 (0)