You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly I want to say I REALLY like the idea of creating Lanterna and once I get really familiar with it I have a feeling I will use it for all kind of projects.
That said I am right now trying to create a kind of data browser using Lanterna where I want the user to be able to "scroll" through data read and processed from database tables. I would like to keep a fairly large buffer in memory (that I add rows to when it starts to get exhausted in one direction or the other) with a visible viewport on screen showing a part of buffer at the time.
Using the TextBox as a basis for this would be "almost" perfekt (would just need to override the scroll bar behaviour if I want it to reflect the viewports position in the database rather than within the buffer and change up/down arrows to add ) EXCEPT for that addLine only can insert a line at the end (and not at the beginning) making it impossible to "scroll" upwards as well as downwards :-(
I could have added a new method that allowed inserting also at the start but sadly the "lines" structure is private rather than "subclassing friendly" protected. I suppose some other changes may also be needed if allowing inserts at the start but maybe that could also be fixed by overriding?
If lines was not private I could even replace the standard "list implementation" with a custom one that incorporates transparently loading from the database as needed and this way not even have to modify the scrolls bars (as the size could be reported as the total rows in the database) etc...
P.S. Your name and profile picture tells me Sweden / Stockholm - if so maybe we run into each other in some IT event as that is my home town :-) Have you ever presented on Lanterna at some event or considering to do it? I would really love to know a bit more about your philosophy of the library...
The text was updated successfully, but these errors were encountered:
Firstly I want to say I REALLY like the idea of creating Lanterna and once I get really familiar with it I have a feeling I will use it for all kind of projects.
That said I am right now trying to create a kind of data browser using Lanterna where I want the user to be able to "scroll" through data read and processed from database tables. I would like to keep a fairly large buffer in memory (that I add rows to when it starts to get exhausted in one direction or the other) with a visible viewport on screen showing a part of buffer at the time.
Using the TextBox as a basis for this would be "almost" perfekt (would just need to override the scroll bar behaviour if I want it to reflect the viewports position in the database rather than within the buffer and change up/down arrows to add ) EXCEPT for that addLine only can insert a line at the end (and not at the beginning) making it impossible to "scroll" upwards as well as downwards :-(
I could have added a new method that allowed inserting also at the start but sadly the "lines" structure is private rather than "subclassing friendly" protected. I suppose some other changes may also be needed if allowing inserts at the start but maybe that could also be fixed by overriding?
If lines was not private I could even replace the standard "list implementation" with a custom one that incorporates transparently loading from the database as needed and this way not even have to modify the scrolls bars (as the size could be reported as the total rows in the database) etc...
P.S. Your name and profile picture tells me Sweden / Stockholm - if so maybe we run into each other in some IT event as that is my home town :-) Have you ever presented on Lanterna at some event or considering to do it? I would really love to know a bit more about your philosophy of the library...
The text was updated successfully, but these errors were encountered: