GWT 中的可移动面板?

发布于 2024-08-21 10:54:26 字数 159 浏览 10 评论 0原文

我需要 GWT 中的一些具有可移动功能的面板。这样,如果您有一系列必须在屏幕上显示的事件驱动面板,它们不会全部直接重叠。当您想要比较两个不同的面板或想要按照自己的顺序关闭面板时,这可能会导致问题。

我目前正在使用 PopupPanels 据我所知,它没有此功能。

I need some panels in GWT that have moveable functionality. This is so that if you have a series of event-driven panels that have to be displayed on screen, they aren't all directly on top of each other. This can cause problems when you want to compare two different panels or want to close panels in your own order.

I'm currently using PopupPanels which as far as I'm aware, don't have this functionality.

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

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

发布评论

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

评论(2

琉璃繁缕 2024-08-28 10:54:26

我认为你想要的是一个DialogBox。此类是一个可移动的 PopupPanel,并具有一个构造函数参数,可将其创建为非模态,这意味着如果设置为非模态鼠标/键盘事件该面板不会被忽略,而是传递给底层小部件。这允许一次打开多个DialogBox并能够单击它们或其下面的内容。

但是,这些面板可以在整个浏览器窗口内移动,并且无法限制浏览器窗口中的可移动区域。如果您需要此类功能,您可能需要查看 http://code.google.com/ p/gwt-dnd/ 库,它可以在特定区域内创建可移动面板。

I think what you want is a DialogBox. This class is a movable PopupPanel and has a constructor argument to create it as non modal, meaning if set to non modal mouse/keyboard events outside the panel are not ignored, but passed to the underlying widgets. This allows to open multiple DialogBox at once and being able to click on them or what's under it.

However, these panels can be moved inside the whole browser window and it's not possible to limit the movable area in the browser window. If you want such functionality you might want to look at the http://code.google.com/p/gwt-dnd/ library, which makes it possible to create movable panels inside a specific area.

萌能量女王 2024-08-28 10:54:26

您的对话框是否拒绝移动/拖动?确保您不要将其添加()到您的RootPanel中。只需创建一个新对话框并对其调用 show() 即可。

Does your DialogBox refuse to be moved/dragged around? Make sure you DO NOT add() it into your RootPanel. Just create a new dialog and call show() on it.

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