Monday, March 5, 2012

SteelSeries 3.9.20 (cough...3.9.23)

I know i know...long time no update...sorry for that... :)


In the meantime i released some versions of the SteelSeries library but most of the changes have been related to issues so i did not blog about it.
Now in the 3.9.23 release i have something that might be interesting for one or the other of you.
I gave some love to the DisplaySingle component (LCD) because we needed some features in our software at Quintiq.
First of all i've changed the digital font to a more light version and this is how it looks like...




As you could see the font is not as bold as before and also not italic. 


In addition i've added a bargraph to the lcd that shows the current value in relation to the min and max value of the component.
That means if you set the min value to 0 and the max value to 100 and have a current value of 50 the bargraph will be half filled.


Here you get an impression:




If you add sections to the DisplaySingle component the bargraph will use the colors of the sections to visualize the current value. This might be usefull to visualize the quality of the current value.
In this case one could choose between a plain color or a radial gradient as painter for the bargraph leds by using the method setPlainBargraphSegments(true/false). 


You could see the difference on the next screenshot...




Without sections the bargraph leds will have the same color as the lcd text (top), with plainBargraphSegments set to true and with sections applied to the DisplaySingle component the bargraph leds will be filled with the color of the currently active section (middle). If you set the plainBargraphElements to false the bargraph leds will be filled with a radial gradient using the color of the currently active section.


And that's all what is new in the current SteelSeries release.


One more thing...


As you might know i started porting the SteelSeries library to JavaFX 2.x and i would like to tell you that there won't be a seperate SteelSeriesFX library in the future because i've decided to make the gauges part of the JFXtras project. I won't go into detail now but believe me when i say that this project will rock (again)...so stay tuned...


...and keep coding... :)




SteelSeries 3.9.23:


Binary release    : steelseries-3.9.23.jar


Maven central    : link



13 comments:

  1. Thanks for great work!

    There seem to be typo in AbstractRadial.java setMinimumSize()/setMaximumSize() :

    int width = DIM.width < 50 ? 50 : DIM.width;
    int height = DIM.height < 50 ? 50 : DIM.height;
    final int SIZE = WIDTH <= HEIGHT ? WIDTH : HEIGHT;

    Wrong casing for width/WIDTH height/HEIGHT derives wrong size.

    ReplyDelete
    Replies
    1. Thx for the hint...fixed it and will release 3.9.21 right now... :)

      Delete
    2. Thanks for the quick turnaround on this one!

      It looks like Led component stopped working in latest versions (used to be OK in 3.9.16.) The problem is in paintComponent():

      protected void paintComponent(Graphics g) {
      if (!initialized) {
      return;
      }
      ....

      'initialized' flag is always 'false' :)

      Delete
    3. PointerType11, PointerType12 and LED problems are fixed...next release is on it's way...thx for reporting...

      Delete
    4. Thank you Gerrit!

      Delete
  2. Hey! Nice library! Very useful! I have noticed a couple of issues. First, for a DisplayRectangular, if I set a FrameDesign, and then make it not visible with setFrameVisible(false), I still see the leftovers of the frame being drawn as gray areas on the top and left side of the control (makes it easier to see this putting it on a panel with a colored background). This doesn't seem to happen with a linear or radial gauge.

    Second, some pointer types (TYPE10, TYPE11, TYPE12, TYPE13, and TYPE14) are all throwing a NullPointerException when I attempt to set a custom pointer color with:
    ((AbstractRadial)radialGauge).setPointerColor(ColorDef.CUSTOM);
    ((AbstractRadial)radialGauge).setCustomPointerColor(myCustomColor);

    The exception is in MultipleGradientPaint, line 219
    It is being triggered by multiple lines in PointerImageFactory (depending on the pointer type): at lines 430, 447, 464, 481, and 495. I can give you the full stack trace, if you need it.

    ReplyDelete
    Replies
    1. Thanx for the hint...already fixed... :)

      Cheers,

      Gerrit

      Delete
    2. Hey Gerrit,

      Thanks for the quick fix. Unfortunately, pointer types TYPE11 and TYPE12 are still throwing an NPE for me:
      (MultipleGradientPaint.java:219)
      (LinearGradientPaint.java:262)
      (LinearGradientPaint.java:221)
      (LinearGradientPaint.java:188)
      (PointerImageFactory.java:456)
      -- OR --
      (PointerImageFactory.java:477)

      Everything else looks good!

      Delete
  3. Hello Gerrit,
    I just realized some users complain about regressions. How about setting up some unit tests for this. And for problems like this I started a project a some month ago to allow unit testing of "visual components", renderers, reporting code, ...

    If you like a have a look at it at http://code.google.com/p/comparandum/
    Documentation is sparse at the moment. But if you have questions on how to use it I could help out.

    Have fun,
    - Rossi

    ReplyDelete
  4. Hello,
    First of all: good work for the library!
    But in the DisplaySingle component there seems to be a wrong position of the lcd value if we use a unit: the last digit of the lcd value is painted over the text of the unit.
    The initialization of the DisplaySingle is done like this:

    DisplaySingle comp = new DisplaySingle();
    comp.setLcdUnitString("V");
    comp.setLcdValue(160);
    comp.setDigitalFont(true);
    The problem appears only if we use a digital font and if the lcd value start by 1.

    ReplyDelete
    Replies
    1. You're absolutely right, i fixed it and you can find it in the latest snapshot (SteelSeries-3.9.27-SNAPSHOT) which is available as jar on this page.
      Thx for the hint and cheers,
      Gerrit

      Delete
    2. thanks for the quick fix !
      And another question : is it possible that the "DisplaySingle" class is not declared "final" in the next version ? Is there a reason for this ?

      Delete
  5. hi han solo,

    i really appreciate your work.

    I've started working around with Steel Series library. I wonder if there it's possibile to have a gauge with a "dynamic pointer". Let's say, for example, that I want to drive a servo via GUI: using the mouse, I'd like to interact with the gauge pointer and move it. A mouse listener (or something like that) associated to the moving sends data via serial to the servo. Something like that.

    Do u think it's possible?

    Best regards

    Alessando

    ReplyDelete