Menu

#48 Taurus JDraw Synoptic change the background color of the SimpleScalarViewer classes

Jul14
resolved
None
bug
2015-03-30
2014-03-04
No

You can see on the screenshot that the Tango JDraw viewer and the Taurus one do not display the Swing component fr.esrf.tangoatk.widget.attribute.SimpleScalarViewer (which is the text) in the same way.

Do you have rules relative to JDraw? Must we do something closer to the original?

Anyway, is there any problem if we remove the background/text color update in case of fr.esrf.tangoatk.widget.attribute.SimpleScalarViewer item? I guess a normal text will still have the same behaviour than before.

If you agree, i think i can do a patch which will only fix the SimpleScalarViewer swing item rendering.

1 Attachments

Discussion

  • Valentin Valls

    Valentin Valls - 2014-03-05

    Sorry, i was wrong the difference is i think relative to the extension "validBackground" which is not supported. If i find a good way to support it i will provide a patch. Here is a copy-paste of the supported extensions from the java file.

        if (name.equals("unitVisible")) {
          return "Display the unit of the tango attribute when enabled.\n"+
                 "Possible values are: true, false.";
        } else if (name.equalsIgnoreCase("userFormat")) {
          return "Overrides the tango attribute format property when specified.\n"+
                 "Supports C format, ex:%5.2f .";
        } else if (name.equalsIgnoreCase("alarmEnabled")) {
          return "When enabled, the background color change with the\n"+
                 "Tango attribute quality factor.\n" +
                 "Default colors are: ( unless they have been changed with\n"+
                 "ATKConstant.setColor4Quality() )\n" +
                 " VALID   => Green\n" +
                 " INVALID => Grey\n" +
                 " ALARM   => Orange\n" +
                 " WARNING => Orange\n" +
                 " CHANGING => Blue\n" +
                 " UNKNOWN => Grey\n" +
                 "Possible values are: true, false.";
        } else if (name.equalsIgnoreCase("invalidText")) {
          return "Text displayed when the qulaity factor is INVALID\n" +
                 "or when the connection is lost.";
        } else if (name.equalsIgnoreCase("validBackground")) {
          return "Sets the background color (r,g,b) for the VALID quality factor for this viewer.\n" +
                 "Has effect only if alarmEnabled is true.";
        }
    
     
  • Valentin Valls

    Valentin Valls - 2014-03-07

    Here it is what i have on Taurus now. I send a patch.

     
  • Valentin Valls

    Valentin Valls - 2014-03-10

    Here is a sample jdw test file

     
  • Valentin Valls

    Valentin Valls - 2014-03-10

    Here is the result with JDraw, and with Taurus, with and without the patch

     
  • Valentin Valls

    Valentin Valls - 2014-03-10

    I would like to add a test with a non valid value from (to check the non use of the validBackground property) but i dont find anything with sys/tg_test/1

    We also see there is a little difference : JDraw display "No unit", and Taurus display nothing. We sould do like JDraw, but it is quite ugly.

     
  • Carlos Pascual

    Carlos Pascual - 2014-06-04
    • assigned_to: Carlos Pascual
    • Category: pool --> taurus-qt
     
  • Carlos Pascual

    Carlos Pascual - 2014-06-04

    patches applied to develop (thanks V. Valls)

     
  • Carlos Pascual

    Carlos Pascual - 2014-06-04
    • status: waiting --> resolved
     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/130/

    Can't be converted:

    • _category: taurus-qt
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.