X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fmain%2FMain.java;h=917686c865f7b0ab9c2244fd691cf75c3ecac51a;hb=0dce6a56547c7b467cbc3626a5991d9cbcd87c23;hp=442b16d903122b3e3c18d4a37bd8b162ecdcf620;hpb=09496d741c563c92e16bad63552658d5c1a74348;p=jSite.git diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 442b16d..917686c 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -19,6 +19,7 @@ package de.todesbaum.jsite.main; +import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; @@ -39,6 +40,7 @@ import javax.swing.Icon; import javax.swing.JList; import javax.swing.JMenu; import javax.swing.JMenuBar; +import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButtonMenuItem; @@ -77,7 +79,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen private static final Logger logger = Logger.getLogger(Main.class.getName()); /** The version. */ - private static final Version VERSION = new Version(0, 9, 1); + private static final Version VERSION = new Version(0, 9, 2); /** The configuration. */ private Configuration configuration; @@ -617,6 +619,25 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + public void nodeSelected(Node node) { + for (Component menuItem : nodeMenu.getMenuComponents()) { + if (menuItem instanceof JMenuItem) { + if (node.equals(((JMenuItem) menuItem).getClientProperty("Node"))) { + ((JMenuItem) menuItem).setSelected(true); + } + } + } + freenetInterface.setNode(node); + selectedNode = node; + } + + // + // INTERFACE ActionListener + // + + /** + * {@inheritDoc} + */ public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source instanceof JRadioButtonMenuItem) {