https://issues.apache.org/bugzilla/show_bug.cgi?id=54251

            Bug ID: 54251
           Summary: Add tristate checkbox implementation
           Product: JMeter
           Version: unspecified
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

A tri-state checkbox would have three states:
- unselected
- selected
- indeterminate (i.e. neither)

The indeterminate state would be useful for handling defaults - e.g. if the
sampler checkbox is indeterminate, use the setting from the configuration.

There don't seem to be any existing implementations with a suitable license.

The following implementation is neat and simple:

[1] http://stackoverflow.com/questions/1263323/tristate-checkboxes-in-java

However, testing shows that it does not support ItemListener properly, as the
processing causes an additional item change. It also relies on its
ActionListener being processed first.

However, it does provide a useful hint - using a icon for the indeterminate
state.

Another implementation is at

[2] http://www.javaspecialists.eu/archive/Issue145.html

This works well, however the indeterminate state is not very obvious on the
display, particularly in the Motif LAF.

Another TriState implementation is here:

[3] http://www.coderanch.com/t/342563/GUI/java/TriState-CheckBox

It does not support ActionListener, however it does have a useful Icon
implementation which can be used to improve implementation [2].

Code and test case will be added shortly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to