-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: rough cut of ScrollPanel --- LANTERNA-491 #492
Conversation
This reverts commit 8c441cc.
…ying on jna being available
testing with this:
|
* | ||
* @author ginkoblongata | ||
*/ | ||
public class TerminalRect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think TerminalRectangle would be a better name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will change it.
public final int x; | ||
public final int y; | ||
public final int width; | ||
public final int height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems redundant to have both TerminalPosition and TerminalSize and also store x, y, width and height?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the intention is to make the usability of this component more fluid for the different ways in which it may be used.
|
||
@Override | ||
public int getVerticalScrollPosition() { | ||
return - scrollOffset.getRow(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the -
a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a typo, but redoing this part.
The ScrollableBox interface kinda became too cumbersome, so taking a draft 2 approach.
} | ||
|
||
@Override | ||
public void invalidate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think you need to override this, it should work anyway. The panel is marked as invalid in the Panel class, which forces a re-render of the whole thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, yep works without this method, using existing implementation.
scrollableBox.invalidate(); | ||
} | ||
|
||
public class ScrollPanelLayoutManager extends BorderLayout { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be public? It looks like you wouldn't need to call this outside of ScrollPanel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will make package protected.
* @return Itself | ||
*/ | ||
public synchronized TextBox setCaretPosition(int line, int column) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, please keep the original signature (you can forward the call into your new signature)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will clean this up once revisiting this PR.
Just dropping a note here, haven't forgot about this, hopefully some more activity in a couple weeks. |
@ginkoblongata would you be opening a new PR or update this one? |
I would like to keep this one open, and eventually have it accepted for merge. But I will make another 1 or 2 slices off I think with new PR. |
Hopefully this is more portable across linux distributions
Bumps [junit](https://github.com/junit-team/junit4) from 4.13 to 4.13.1. - [Release notes](https://github.com/junit-team/junit4/releases) - [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md) - [Commits](junit-team/junit4@r4.13...r4.13.1) Signed-off-by: dependabot[bot] <support@github.com>
…t-4.13.1 Bump junit from 4.13 to 4.13.1
Just dropping another note, I am still committed to this change. Other commitments are currently taking priority at this time still. |
Would be very interrested to see that feature. |
Stale |
Creating this PR early before completion in case there is any comments which can gather.