[ImageJ-devel] feature request: disable Button from plugin callback

Curtis Rueden ctrueden at wisc.edu
Fri Aug 28 12:09:21 CDT 2015


Hi Adrian,

Yes, I suggest commenting on issue 42. In that issue, I wrote that graying
out makes less sense than setting visible/invisible, though I am not sure
that's really true in every case. Worth having a discussion there.

And note that technically in code, there is little difference between
calling widget.setVisible(false) and widget.setEnabled(false). The former
makes the widget disappear, and the latter grays it out. (I can't remember
whether the containing ancestor panes automatically redo their layout when
setVisible on a child component is called, though.)

Regards,
Curtis

On Fri, Aug 28, 2015 at 11:59 AM, Adrian Daerr <
adrian.daerr at univ-paris-diderot.fr> wrote:

> Hello all,
>
> It would be nice if a org.scijava.widget.Button could
> be disabled (e.g. grayed out) and enabled in the UI parameter
> harvesting dialog (from within some @Parameter callback) if the
> current parameters do not allow its action.
>
> This seems different from the problems associated with dynamically
> changing parameter number and/or properties [1], as no reconfiguration
> of the UI is required beyond a redraw. The widget should still be
> displayed, only its status toggled (one could e.g. add the enabling
> condition to the description/tooltip to give the user a hint).
>
> Does this sound reasonable or should such a feature be included in tracker
> issue 42 [1]?
>
> cheers,
> Adrian
>
> [1] https://github.com/scijava/scijava-common/issues/42
> "Allow plugin parameters to be hidden"
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150828/2bc76aee/attachment.html>


More information about the ImageJ-devel mailing list