try {
UIManager.setLookAndFeel(info.getClassName());
updateFrames();
VisualGraph.config.setProperty(CONF_STYLE, info.getName());
// report system, that style of user interface was changed
LookAndFeelChanger.this.param.userInterface.addEvent(new UIEventChangeUIStyle());
} catch (Exception ex) {
VisualGraph.log.printException(ex);
// throw new PluginException("Error while applying " + info.getName() + " skin",
// EnumCriticalityException.ERROR);
}
}
});
LnFMenuItem.add(skinMenu);
}
LnFMenuItem.addSeparator();
for (final String skin : SubstanceLookAndFeel.getAllSkins().keySet()) {
JMenuItem skinMenu = new JMenuItem(skin);
skinMenu.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.getAllSkins().get(skin).getClassName());
updateFrames();
VisualGraph.config.setProperty(CONF_STYLE, skin);
LookAndFeelChanger.this.param.userInterface.addEvent(new UIEventChangeUIStyle());
}
});
LnFMenuItem.add(skinMenu);
}