import javax.swing.border.EtchedBorder;
import net.pterodactylus.jsite.core.Node;
+import net.pterodactylus.jsite.i18n.I18n;
import net.pterodactylus.jsite.i18n.I18nable;
import net.pterodactylus.jsite.i18n.gui.I18nLabel;
this.offlineIcon = offlineIcon;
this.errorIcon = errorIcon;
initComponents();
+ node.addPropertyChangeListener(this);
}
//
setIcon(offlineIcon);
contextMenu = new JPopupMenu();
menuLabel = new I18nLabel("mainWindow.statusBar.nodeLabel", node.getName());
- JPanel menuPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
+ JPanel menuPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 6, 0));
menuPanel.add(menuLabel);
contextMenu.add(menuPanel);
contextMenu.addSeparator();
contextMenu.add(swingInterface.getNodeConnectAction(node));
contextMenu.add(swingInterface.getNodeDisconnectAction(node));
+ contextMenu.addSeparator();
+ contextMenu.add(swingInterface.getNodeEditAction(node));
+ contextMenu.add(swingInterface.getNodeDeleteAction(node));
addMouseListener(this);
}
if (propertyChangeEvent.getSource() != node) {
return;
}
- if (propertyChangeEvent.getPropagationId().equals(Node.PROPERTY_NAME)) {
+ if (propertyChangeEvent.getPropertyName().equals(Node.PROPERTY_NAME)) {
setText(node.getName());
- menuLabel.updateI18n();
+ /* TODO - find way to get around this hack */
+ menuLabel.setText(I18n.get("mainWindow.statusBar.nodeLabel.name", node.getName()));
}
}