Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
垂直 gwt メニューバーを作成していますが、ブラウザ ウィンドウの境界を検出する方法があるかどうか疑問に思っています。サブメニューがブラウザウィンドウの境界よりも広くならない場合は(当然のことながら)右側にサブメニューを開きたいです。それ以外の場合は左側に開きたいです。この機能を実現するために、ブラウザ ウィンドウの境界をプログラムで知る方法はありますか。
とを使用Window.getClientWidth()しWindow.getClientHeight()て、ウィンドウの境界を取得できます。
Window.getClientWidth()
Window.getClientHeight()