简体   繁体   English

Gwt-当用户触摸多个控件或链接时显示一个弹出面板

[英]Gwt - Showing a pop up panel when user's touch more than one widget or link

I am creating a panel showing many different kind of widgets such as button. 我正在创建一个面板,显示许多不同类型的小部件,例如按钮。 The panel allows to zoom in and zoom out. 该面板允许放大和缩小。 It is required to show whole panel in the beginning. 必须在开始时显示整个面板。 However, some users may touch more than one button when the panel is too small. 但是,当面板太小时,某些用户可能会触摸多个按钮。

I want to handler the situation like chrome in Android. 我想处理类似chrome在Android中的情​​况。 When the user touches more than one link, a pop up panel will be showing. 当用户触摸多个链接时,将显示一个弹出面板。 What library or APIs may I use? 我可以使用哪些库或API? Thanks! 谢谢!

You could place your Buttons in a FocusPanel implementing a ClickHandler to open your desired popup- thus when your user clicked between two buttons the click is registered and you can handle it. 您可以将Buttons放置在实现ClickHandler的FocusPanel中,以打开所需的弹出窗口-因此,当用户在两个按钮之间单击时,单击将被注册,并且可以对其进行处理。

Note, you will have to place a FlowPanel in that FocusPanel to place more than one button inside. 请注意,您必须在该FocusPanel中放置一个FlowPanel,才能在其中放置多个按钮。

If you want to react on hover instead of on click, use HoverHandler instead. 如果要对悬停而不是单击做出反应,请改用HoverHandler。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM