protected void addVerticalStrut(final int size) { add(new JPanel() { /** * */ private static final long serialVersionUID = -1660234580003844634L; public Dimension getPreferredSize() { return new Dimension(size, size); } }); }
@Override public void applyChanges() { for (PreferencesPanel panel : new ArrayList<>(map.values())) { try { panel.applyChanges(); } catch (Throwable e) { logger.warn("An error occurred whilst trying to save the preferences for the explanation preferences panel '{}': {}", panel.getLabel(), e); } } } }
public PreferencesPanel newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { PreferencesPanel panel = super.newInstance(); panel.setup(getLabel(), editorKit); return panel; }
try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); final String label = plugin.getLabel(); final JScrollPane sp = new JScrollPane(panel);
public void add(Component comp, Object constraints) { super.add(comp, constraints); if (comp instanceof PreferencesPanel) { if (constraints instanceof String) { ((PreferencesPanel) comp).setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder( (String) constraints), BorderFactory.createEmptyBorder(5, 5, 5, 5))); } } }
public ModelManager getModelManager() { return getEditorKit().getModelManager(); }
public void applyPreferences() { for (PreferencesPanel panel : new ArrayList<PreferencesPanel>(map.values())) { try { panel.applyChanges(); } catch (Throwable e) { ProtegeApplication.getErrorLog().logError(e); } } }
public void dispose() { for (PreferencesPanel panel : new ArrayList<PreferencesPanel>(map.values())) { try { panel.dispose(); } catch (Throwable e) { ProtegeApplication.getErrorLog().logError(e); } } map.clear(); }
public PreferencesPanel newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { PreferencesPanel preferencesPanel = super.newInstance(); preferencesPanel.setup(getLabel(), editorKit); return preferencesPanel; } }
try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); final String label = plugin.getLabel(); final JScrollPane scroller = new JScrollPane(panel);
public void add(Component comp, Object constraints) { super.add(comp, constraints); if (comp instanceof PreferencesPanel) { if (constraints instanceof String) { ((PreferencesPanel) comp).setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder( (String) constraints), BorderFactory.createEmptyBorder(5, 5, 5, 5))); } } }
public ModelManager getModelManager() { return getEditorKit().getModelManager(); }
public void applyPreferences() { for (PreferencesPanel panel : new ArrayList<PreferencesPanel>(map.values())) { try { panel.applyChanges(); } catch (Throwable e) { ProtegeApplication.getErrorLog().logError(e); } } }
public void dispose() { for (PreferencesPanel panel : new ArrayList<PreferencesPanel>(map.values())) { try { panel.dispose(); } catch (Throwable e) { ProtegeApplication.getErrorLog().logError(e); } } map.clear(); }
public PreferencesPanel newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { PreferencesPanel preferencesPanel = super.newInstance(); preferencesPanel.setup(getLabel(), editorKit); return preferencesPanel; } }
try { PreferencesPanel panel = plugin.newInstance(); panel.initialise(); final String label = plugin.getLabel(); final JScrollPane scroller = new JScrollPane(panel);