Moveable Panels in GWT?
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 开发者_如何学Pythondifferent 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.
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.
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.
精彩评论