public static PopupMenu setupPopupMenu() {
String label;
// this is the popup menu
PopupMenu menu = new PopupMenu();
MenuItem menuItem;
if(isIntegrated) return menu;
// YaCy Search
if (deutsch)
label = "YaCy Suche";
else if (french)
label = "YaCy Recherche";
else
label = "YaCy Search";
menuItem = new MenuItem(label);
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
openBrowser("");
}
});
menu.add(menuItem);
// Compare YaCy
if (deutsch)
label = "Vergleichs-Suche";
else if (french)
label = "Comparer YaCy";
else
label = "Compare YaCy";
menuItem = new MenuItem(label);
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
openBrowser("compare_yacy.html");
}
});
menu.add(menuItem);
// Peer Administration
if (deutsch)
label = "Peer Administration";
else if (french)
label = "Peer Administration";
else
label = "Peer Administration";
menuItem = new MenuItem(label);
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
openBrowser("Status.html");
}
});
menu.add(menuItem);
// Separator
menu.addSeparator();
// Quit
if(deutsch)
label = "YaCy Beenden";
else if(french)
label = "Arrêt YaCy";
else
label = "Shutdown YaCy";
menuItem = new MenuItem(label);
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
sb.terminate("shutdown from tray");
}
});
menu.add(menuItem);