final public void dispose() { disposeOWLView(); super.dispose(); }
protected void addAction(DisposableAction action, String group, String groupIndex) { addAction(new ViewActionAdapter(action), group, groupIndex); }
public boolean requestFocusInWindow() { if (viewComponent == null) { return false; } return viewComponent.requestFocusInWindow(); }
private void createContent() { try { viewComponent = plugin.newInstance(); viewComponentHolder.add(viewComponent); viewComponent.setView(this); viewComponent.initialise(); } catch (Exception e) { logger.error("An error occurred whilst creating the view content for the '{}' view: {}", plugin.getLabel(), e); viewComponentHolder.add(ComponentFactory.createExceptionComponent( "An error occurred whilst creating the view", e, null)); } }
/** * Creates an instance of the plugin. It is expected that * this instance will be "setup", but the instance's * initialise method will not have been called in the instantiation * process. */ public ViewComponent newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { ExtensionInstantiator<ViewComponent> instantiator = new ExtensionInstantiator<>(extension); ViewComponent viewComponent = instantiator.instantiate(); viewComponent.setup(this); return viewComponent; } }
private void createContent() { try { viewComponent = plugin.newInstance(); viewComponentHolder.add(viewComponent); viewComponent.setView(this); viewComponent.initialise(); } catch (Exception e) { ProtegeApplication.getErrorLog().logError(e); viewComponentHolder.add(ComponentFactory.createExceptionComponent( "An error occurred whilst creating the view", e, null)); } }
/** * Creates an instance of the plugin. It is expected that * this instance will be "setup", but the instance's * initialise method will not have been called in the instantiation * process. */ public ViewComponent newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { ExtensionInstantiator<ViewComponent> instantiator = new ExtensionInstantiator<ViewComponent>(extension); ViewComponent viewComponent = instantiator.instantiate(); viewComponent.setup(this); return viewComponent; } }
final public void dispose() { disposeOWLView(); super.dispose(); }
private void createContent() { try { viewComponent = plugin.newInstance(); viewComponentHolder.add(viewComponent); viewComponent.setView(this); viewComponent.initialise(); } catch (Exception e) { ProtegeApplication.getErrorLog().logError(e); viewComponentHolder.add(ComponentFactory.createExceptionComponent( "An error occurred whilst creating the view", e, null)); } }
/** * Creates an instance of the plugin. It is expected that * this instance will be "setup", but the instance's * initialise method will not have been called in the instantiation * process. */ public ViewComponent newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { ExtensionInstantiator<ViewComponent> instantiator = new ExtensionInstantiator<ViewComponent>(extension); ViewComponent viewComponent = instantiator.instantiate(); viewComponent.setup(this); return viewComponent; } }
public boolean requestFocusInWindow() { if (viewComponent == null) { return false; } return viewComponent.requestFocusInWindow(); }
protected void addAction(DisposableAction action, String group, String groupIndex) { addAction(new ViewActionAdapter(action), group, groupIndex); }
public void dispose() { // Dispose of the view if the content was successfully initialised. if (initialisedContent) { // Dispose of the actions that were successfully added to the view for (ViewAction action : addedViewActions) { try { action.dispose(); } catch (Exception e) { logger.warn("BAD ViewAction: (" + action.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } addedViewActions.clear(); // Dispose of our view component if (viewComponent != null) { try { viewComponent.dispose(); } catch (Exception e) { logger.warn("BAD ViewComponent: (" + viewComponent.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } } }
public View showResultsView(ViewComponentPlugin plugin, boolean replace, int location) { try { ViewHolder viewHolder; if (location == BOTTOM_RESULTS_VIEW) { viewHolder = bottomResultsViewHolder; } else { viewHolder = leftResultsViewHolder; } if (replace) { View v = viewHolder.getView(plugin.getId()); if (v != null) { v.closeView(); } } View view = new View(plugin, this); ViewComponent viewComponent = plugin.newInstance(); viewComponent.setup(plugin); viewHolder.addView(view); return view; } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) { logger.error("An error occurred whilst instantiating the results view: {}", e); } return null; }
public boolean requestFocusInWindow() { if (viewComponent == null) { return false; } return viewComponent.requestFocusInWindow(); }
protected void addAction(DisposableAction action, String group, String groupIndex) { addAction(new ViewActionAdapter(action), group, groupIndex); }
public void windowClosing(WindowEvent e) { try { view.dispose(); view.getViewComponent().dispose(); } catch (Exception e1) { logger.warn("BAD VIEW: (" + view.getViewComponent().getClass().getSimpleName() + ") - exception on dispose: " + e1.getMessage()); } } });
viewComponent.setup(plugin); viewHolder.addView(view); return view;
public void windowClosing(WindowEvent e) { try { view.dispose(); view.getViewComponent().dispose(); } catch (Exception e1) { logger.warn("BAD VIEW: (" + view.getViewComponent().getClass().getSimpleName() + ") - exception on dispose: " + e1.getMessage()); } } });
viewComponent.setup(plugin); viewHolder.addView(view); return view;