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.
SWT でアプリケーションのタブ インターフェイスを作成しようとしています。メニューボタンをクリックしたときにタブが開いているかどうかを確認するようにメニューボタンを設定したいと思います。開いている場合はタブに切り替えたいし、開いていない場合は開きたい。タブを作成するメニュー項目を既に作成しましたが、タブが存在するかどうかを確認する方法がわかりません。
public static Boolean CtabExists(CTabFolder folder, CTabItem tab) { if (tab != null) { int intIndex = -1; intIndex = folder.indexOf(tab); if (intIndex == -1) { return false; } else { return true; } } else { return false; } }