private void buildApplicationMenu() {
UXDropDownMenu appMenu = new UXDropDownMenu(menu);
appMenu.setCaption("Application");
UXMenuButton nItem = new UXMenuButton(appMenu);
nItem.setCaption("Open ...");
attachIcon("open.png", nItem);
nItem.setClickAction(new UXAbstractAction() {
@Override
public void doAction() {
TabPanelController.instance().openLocalFileReq(menu.getShell());
}
});
nItem = new UXMenuButton(appMenu);
nItem.setCaption("Open via SSH");
attachIcon("open.png", nItem);
nItem.setClickAction(new UXAbstractAction() {
@Override
public void doAction() {
TabPanelController.instance().openSSHFileReq(menu.getShell());
}
});
new UXMenuSeparator(appMenu);
close = new UXMenuButton(appMenu);
close.setCaption("Close");
close.setEnabled(false);
attachIcon("tab_remove.png", close);
close.setClickAction(new UXAbstractAction() {
@Override
public void doAction() {
TabPanelController.instance().closeCurrentTabReq();
}
});
closeOthers = new UXMenuButton(appMenu);
closeOthers.setCaption("Close other");
closeOthers.setEnabled(false);
attachIcon("tab_remove.png", closeOthers);
closeOthers.setClickAction(new UXAbstractAction() {
@Override
public void doAction() {
TabPanelController.instance().closeOthersTabReq();
}
});
closeAll = new UXMenuButton(appMenu);
closeAll.setCaption("Close all");
closeAll.setEnabled(false);
attachIcon("tab_remove.png", closeAll);
closeAll.setClickAction(new UXAbstractAction() {
@Override
public void doAction() {
TabPanelController.instance().closeAllTabsReq();
}
});
new UXMenuSeparator(appMenu);
nItem = new UXMenuButton(appMenu);
nItem.setCaption("Exit");
attachIcon("exit.png", nItem);
nItem.setClickAction(new UXAbstractAction() {
@Override
public void doAction() {
ZTail.getInstance().shutdown();
}
});