String s1 = o1.getLabel(); String s2 = o2.getLabel(); return s1.compareTo(s2); }); for (PreferencesPanelPlugin plugin : plugins) { try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); final String label = plugin.getLabel(); final JScrollPane sp = new JScrollPane(panel); sp.setBorder(new EmptyBorder(0, 0, 0, 0)); logger.warn("An error occurred whilst trying to instantiate the preferences panel plugin '{}': {}", plugin.getLabel(), e);
@Override public void initialise() throws Exception { setLayout(new BorderLayout()); ExplanationPreferencesPanelPluginLoader loader = new ExplanationPreferencesPanelPluginLoader(getEditorKit()); Set<PreferencesPanelPlugin> plugins = new TreeSet<>((o1, o2) -> { String s1 = o1.getLabel(); String s2 = o2.getLabel(); return s1.compareTo(s2); }); plugins.addAll(loader.getPlugins()); for (PreferencesPanelPlugin plugin : plugins) { try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); String label = plugin.getLabel(); final JScrollPane sp = new JScrollPane(panel); sp.setBorder(new EmptyBorder(0, 0, 0, 0)); map.put(label, panel); componentMap.put(label, sp); tabbedPane.addTab(label, sp); } catch (Throwable e) { logger.warn("An error occurred whilst trying to instantiate the explanation preferences panel plugin '{}': {}", plugin.getLabel(), e); } } add(tabbedPane); updatePanelSelection(null); }
for (PreferencesPanelPlugin plugin : plugins) { try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); final String label = plugin.getLabel(); final JScrollPane scroller = new JScrollPane(panel); scroller.setBorder(new EmptyBorder(0, 0, 0, 0));
for (PreferencesPanelPlugin plugin : plugins) { try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); final String label = plugin.getLabel(); final JScrollPane scroller = new JScrollPane(panel); scroller.setBorder(new EmptyBorder(0, 0, 0, 0));