覆盖几个 JProgressBar?

发布于 2024-11-15 07:56:48 字数 503 浏览 5 评论 0原文

我想要一个 JProgressBar实际上是几个分层在一起的JProgressBar。这样的实现存在吗?在我破解Flithy Rich Clients并尝试将其组合在一起之前,我想知道这一点。

这是我的问题:我有一堆对象在几个状​​态之间线性转换(在我的例子中是 4 个,但这是任意的)。我想在一个(复合)进度条上显示每个对象相对而言有多少已达到每种状态。状态转换从开始到结束都是纯线性的,因此状态 N + 1 的对象永远不会多于处于状态 N 的对象。

我正在想象一个有四种颜色的进度条,所有四个条从左到右增加,最终以覆盖整个进度条的第四个状态的颜色结束。

I'd like to have a JProgressBar that is actually several JProgressBars layered together. Does such an implementation exist? I'd like to know before I crack out Flithy Rich Clients and try to put one together.

Here is my problem: I have a bunch of objects that transition linearly through several states (4 in my case, but that is arbitrary). And I'd like to show, on one (composite) progress bar how many of each of the objects, relatively, has made it to each state. The state transitions are purely linear from start to end, so there are never more objects state N + 1 than have been in state N.

I'm picturing a progress bar with four colors and all four bars increase from left to right, eventually ending with the color for the 4th state covering the entire progress bar.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

狼性发作 2024-11-22 07:56:48

没有一个特定的组件完全符合您所描述的功能。但是,您可以为每个状态创建一个进度条实例,再加上一个显示总进度的复合条。这将是您使用标准组件所能得到的最接近的结果。

There is not a specific component that does exactly what you describe. However you could create on instance of a progress bar for each state, plus one composite bar that shows total progress. This would be as close as you could get with the standard components.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文