My Java GUI app has a scroll text window In addition to a standard scrollbar, I need vertical bar with colored line markers Is, as in eclipse. Hopefully you know what I'm talking about is not scrolling this time, the position of the marker is arranged proportionally according to the height of the whole text. When the user clicks on any marker, scroll the text box on the corresponding line.
I was not able to find such controls in SWT widget suites. Obviously SWT is somewhere in it, the ideal choice for me would be swing component because the app is swing-based.
Many thanks in advance
I do not think bundle with a component swing And I do not know of any library supply of such a component, you should be able to do it yourself.
Provide a panel next to Scrollpad and whenever the ScrollPan / TextPan can again be markers according to line (JLBels in the first stage, can draw your own later and add mouse handling ) - In this case layout manager should be empty.
The status can be made using the line / newslines * height (panel) , e.g. For line 20 of 100 and height of panel 200, the position of the marker will be 20/100 * 200 pixels = 40 pixels.
Comments
Post a Comment