多值JSlider组件?
我需要一个多值 JSlider (或类似的组件)用于分析应用程序。常规 JSlider 缺少的两项功能是拥有多个旋钮的能力以及动态添加或删除旋钮的能力。这样做的原因是它们将用于将特定因子的 0..100% 范围划分为两个或多个子范围,这些子范围将输入到分箱算法中。
经过一番不成功的谷歌搜索后,看来我必须开发一个自定义组件(我不太擅长,我已经用 Java 编码了 10 年,但在 Swing 方面的经验为零)。是否可以(轻松地:-)扩展 JSlider 组件?或者是否有更好的替代方案,也许不是基于 Swing 而是基于 Web?为此,我可以灵活地选择 GUI 方法。当前的分析应用程序是命令行的,因此 Swing GUI 是最直接的,但如果需要的话,没有什么能真正阻止我将其转换为 Web 应用程序。
谢谢你!
I need a multi-value JSlider (or a similar component) for an analysis application. The two features missing from the regular JSlider are the ability to have more than one knob and also the ability to add or remove knobs on the fly. The reason for this is that they will be used to partition the 0..100% range for a particular factor into two or more subranges which are fed into a binning algorithm.
After some unsuccessful googling, it seems I'll have to develop a custom component (which I'm not very good at, I've been coding in Java for 10 years, but have zero experience in Swing). Is it possible to extend (easily :-) the JSlider component? Or are there better alternatives, perhaps not Swing-based but web-based? I have some flexibility in selecting the GUI approach for this. The current analysis application is command-line so a Swing GUI would be most straighforward, but nothing really prevents me for turning it into a web app if need be.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 SwingX 中的 JXMultiThumbSlider。
Take a look at JXMultiThumbSlider in SwingX.