imagej / imagej-ui-swing

ImageJ UI for Java Swing.
BSD 2-Clause "Simplified" License
10 stars 20 forks source link

Streamline Image Calculator UI #26

Open ctrueden opened 9 years ago

ctrueden commented 9 years ago

In the imagej devel mailing list Gabriel Landini reported:

Wishlist item: I suggested this before but Wayne could not find a way of doing it, maybe it can be done now?: In the Image Calculator IJ2, the command opens a list of operators that is not that long and really does not need to have a scroll bar if all the operations were shown (therefore reducing the number of clicks one has to do).

Migrated-From: http://trac.imagej.net/ticket/1112

ctrueden commented 9 years ago

As of this writing, ImageJ2's Image Calculator is driven by a @Parameter CalculatorOp which is filled by the available CalculatorOp singleton plugins. This ultimately is rendered as an ObjectWidget—specifically, SwingObjectWidget for the Swing UI, which uses a JComboBox. To accomplish the above, we would just need to call the setMaximumRowCount(int) method of JComboBox to keep the scroll bar from appearing unnecessarily.