home.social

#jexer — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #jexer, aggregated by home.social.

fetched live
  1. CW: Programming, text GUIs, java

    More stuff done on #Jexer. Apparently the guy who did it was very strict with his classes, making them horribly unusable for extension purposes. Worse, the library is no longer under maintenance. Still, there can be workarounds.

    I managed to create custom classes (windows, buttons) that can have custom themes. I'm considering (not very probable, but it's a dangling idea in my mind) taking over the project and fixing all that stuff.

    I'm getting the hang of it. I managed to create a custom Yes/No dialog class with customizable keys and custom border, etc.

    Other dialogs are not affected. This is definitely an advancement.

  2. CW: Programming with Java and Dexer textmode GUI: Adding descriptions to the main menu items

    Stumbled on my first Jexer roadblock: Showing a menu item description in the status bar.

    It turns out that this functionality is NOT built-in, and I can't override classes like TMenu or TMenuItem (WTF?), they have final methods and private constructors. Who the hell came up with this idea??? :blobugh:

    So, in order to be able to display a menu item's description text in the statusbar, I had to add an onIdle() event handler to the application's desktop object.

    This handler finds the active menu in the menubar and gets the active menu item's id, then updates the status bar text with a string that I store manually using the menu item id as key.

    It's a horribly complicated workaround, but it works! 😀

    Best of all, since it's called in an onIdle() event, it only gets called after the last event is processed, which means it's efficient and doesn't consume any unnecessary cycles!

    #Java #Jexer #TurboVision #programming

  3. CW: Programming

    I'm progressing with my text-mode #Java GUI application.

    Decided to switch from #Lanterna to #Jexer because the Lanterna API is a blackhole of documentation; there is little to none.

    Jexer, OTOH, is based on #Borland #TurboVision which has plenty of documentation available - Several implementations of the TurboVision API are out there, and it's so damn easy to set up.

    In a couple of hours I'm already adding the Main Menu.

    Piece of cake. :blobcatcool: