On 6 December 2012 08:07, Milamber <[email protected]> wrote: > > > > > Le 06/12/2012 02:31, sebb a ecrit : > >> On 6 December 2012 02:12, sebb<[email protected]> wrote: >>> >>> I've committed an initial Tristate checkbox implementation. >>> >>> Please try the test driver: >>> >>> test/src/org/apache/jmeter/gui/util/TristateCheckBoxTest.java >>> >>> and see how it looks on your system. > > > > > When I running as a Java application, the start message console: > Look&Feel Metal > javax.swing.plaf.metal.MetalCheckBoxUI@54bb7759 > Look&Feel Nimbus > javax.swing.plaf.synth.SynthCheckBoxUI@6a5eb489 > Look&Feel CDE/Motif > com.sun.java.swing.plaf.motif.MotifCheckBoxUI@1118fa47 > Look&Feel GTK+ > Error parsing gtk-icon-sizes string: '' > javax.swing.plaf.synth.SynthCheckBoxUI@63d87b85
That's deliberate - it's test output. > (My machine is a Linux Debian + XFCE + Sun Java 1.6u37) > > > Screenshot is here. > https://issues.apache.org/bugzilla/attachment.cgi?id=29713 > > 2 small incorrect size boxes on the third state (x) : Nimbus and GTK+ > (compare with the normal case) > Looks like your Nimbus is different from mine: https://issues.apache.org/bugzilla/attachment.cgi?id=29717 https://issues.apache.org/bugzilla/attachment.cgi?id=29718 (new version showing icon/original) > > >>> >>> WinXP/Java 6 looks OK to me, apart from Nimbus, where the >>> indeterminate icon looks a bit ugly. >>> >>> Before we start using this in earnest (in particular before doing lots >>> of doc screenshots!) it would be useful to get some feedback. >>> >>> Is the cross (X) the best indicator for the indeterminate state? >>> Or is that likely to be confused with "no" (where tick = "yes") ? > > > The cross means No to me. > > >>> >>> What other icon would be more suitable? >>> Perhaps a horizontal line? >>> Suggestions welcome! > > > If the default value is true (i.e. checked), the third state (indeterminate) > can be a checked in gray > If the default value is false (i.e. not checked), the third state can be a > square in gray. > (Yes 4 states ;-)) I think that would be hard to do, as the actual default would depend on the sampler and the config element. > Or else, the indeterminate state can be a grey round plain in the box. > Not sure what you mean by that. > >> P.S. Just noticed that the disabling the button does not produce the >> correct display when using Nimbus. >> It looks as though the TristateCheckBoxIcon#paintIcon() method is not >> called when the button is disabled. > > > > > Note: ant compile-core shows this warnings with JDK6: > > compile-core: > [javac] Compiling 351 source files to > /home/milamber/W-workspaces/Workspaces-JMeter/Jmeter/build/core > [javac] > /home/milamber/W-workspaces/Workspaces-JMeter/Jmeter/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java:45: > warning: sun.swing.plaf.synth.SynthUI is Sun proprietary API and may be > removed in a future release > [javac] import sun.swing.plaf.synth.SynthUI; > [javac] ^ > [javac] > /home/milamber/W-workspaces/Workspaces-JMeter/Jmeter/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java:316: > warning: sun.swing.plaf.synth.SynthUI is Sun proprietary API and may be > removed in a future release > [javac] if (tristateCheckBox.getUI() instanceof SynthUI) { > [javac] ^ > [javac] Note: > /home/milamber/W-workspaces/Workspaces-JMeter/Jmeter/src/core/org/apache/jmeter/save/CSVSaveService.java > uses or overrides a deprecated API. > [javac] Note: Recompile with -Xlint:deprecation for details. > [javac] 2 warnings > > > With JDK 7 (sun), compile doesn't works: > > compile-core: > [javac] Compiling 351 source files to > /home/milamber/temp/jmetertemp/build/core > [javac] warning: [options] bootstrap class path not set in conjunction > with -source 1.6 > [javac] > /home/milamber/temp/jmetertemp/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java:45: > error: cannot find symbol > [javac] import sun.swing.plaf.synth.SynthUI; > [javac] ^ > [javac] symbol: class SynthUI > [javac] location: package sun.swing.plaf.synth > [javac] > /home/milamber/temp/jmetertemp/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java:316: > error: cannot find symbol > [javac] if (tristateCheckBox.getUI() instanceof SynthUI) { > [javac] ^ > [javac] symbol: class SynthUI > [javac] location: class TristateCheckBoxIcon > [javac] Note: > /home/milamber/temp/jmetertemp/src/core/org/apache/jmeter/save/CSVSaveService.java > uses or overrides a deprecated API. > [javac] Note: Recompile with -Xlint:deprecation for details. > [javac] Note: > /home/milamber/temp/jmetertemp/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java > uses unchecked or unsafe operations. > [javac] Note: Recompile with -Xlint:unchecked for details. > [javac] 2 errors > [javac] 1 warning > > BUILD FAILED > /home/milamber/temp/jmetertemp/build.xml:546: Compile failed; see the > compiler error output for details. I've not yet found out how to determine the current LAF icon size, so used a quick hack. Obviously it does not work for your Nimbus LAF anyway, so we need a fix for that.
