Menu

BScrollPane, BList etc

Help
Stillfire
2006-09-30
2013-05-23
  • Stillfire

    Stillfire - 2006-09-30

    It seems that even with the Buoy 1.7 update there still appears to be some missing borders with scroll panes, lists and tables - at least for some certain look and feels. Is there a good work around for this problem?

    It seems like a BOutline could be used but to add a border but I can't find an easy way to determine what color this border should be since that's system dependent.

     
    • Peter Eastman

      Peter Eastman - 2006-10-01

      The problem is that, because BScrollPane isn't implemented using JScrollPane, it doesn't pick up the native look and feel automtically.  I tried to implement a workaround for this in 1.7, but ended up removing it because it was unreliable and caused problems.

      The real solution is to reimplement BScrollPane using JScrollPane.  That's a good candidate feature for 1.8.

      Peter

       
      • Stillfire

        Stillfire - 2006-10-01

        Yeah, we discussed the problem briefly earlier this year. I'll definitely be on the lookout for this improvement in 1.8.

         
    • srnm

      srnm - 2006-11-25

      I worked around the missing border with

      public static BOutline createBorderForScrollPane(BScrollPane scroller) {

      Border border = UIManager.getBorder("ScrollPane.border");
      return new BOutline(scroller, border);
      }

      (or something similar. They key is that all LAFs (metal, platform, jgoodies etc.) place the appropriate border in the UIManager...

      It would be great to see BScrollPane implemented via JScrollPane in 1.8...

      thanks for buoy!

       
    • Stillfire

      Stillfire - 2006-11-26

      Good one. Thanks for the heads up. I suppose this wouldn't be an XML compatible solution since the BOutline XML serializer is likely to serialize the border for the current settings and look and feel. So if we run the same program on a machine with different borders than the development machine, we'd get a different border. I haven't tested this yet though.

      I think I might create my own BOutline class, BStandardOutline or something, and just have it automatically run your code above to determine its border. Then I'll change the XML serializer not to write anything about the border and I should be able to use that in our standard UI XML.

      I have to say I really appreciate the XML functionality, Peter. We are currently using it with an eye towards having two sets of XML UI - one for Windows and one for the Mac. As we all know Java's 'platform independent' UI stuff is somewhat lacking, but this would be a rather clean work around.

       
    • Peter Eastman

      Peter Eastman - 2006-11-26

      Sounds like a good idea.  And once I get BScrollPane converted to use a JScrollPane, it will no longer be an issue.

      By the way, I know it's been a long time since the last Buoy update, but it hopefully won't be much longer.  Once I get Art of Illusion 2.4 out (just a few more weeks), a Buoy update will be my next project.

      Peter

       

Log in to post a comment.