public Map<String, String> getProperties(JComponent component) { if (component instanceof View == false) { logger.debug("Component is not a View - ignoring"); return Collections.EMPTY_MAP; } View view = (View) component; Map<String, String> map = new HashMap<String, String>(); map.put("pluginId", view.getId()); return map; } }
public Map<String, String> getProperties(JComponent component) { if (!(component instanceof View)) { logger.debug("Component is not a View - ignoring"); return Collections.emptyMap(); } View view = (View) component; Map<String, String> map = new HashMap<>(); map.put("pluginId", view.getId()); return map; } }
public Map<String, String> getProperties(JComponent component) { if (component instanceof View == false) { logger.debug("Component is not a View - ignoring"); return Collections.EMPTY_MAP; } View view = (View) component; Map<String, String> map = new HashMap<String, String>(); map.put("pluginId", view.getId()); return map; } }
private View getView(String id, Component c) { Collection<View> views = UIUtil.getComponentsExtending(c, View.class); for (View view : views) { if (view.getId().equals(id)) { return view; } } return null; }
private View getView(String id, Component c) { Collection<View> views = UIUtil.getComponentsExtending(c, View.class); for (View view : views) { if (view.getId().equals(id)) { return view; } } return null; }
public boolean containsView(String id) { for (View view : getViews()) { if (id.equals(view.getId())) { return true; } } return false; }
public boolean containsView(String id) { for (View view : getViews()) { if (id.equals(view.getId())) { return true; } } return false; }
public boolean containsView(String id) { for (View view : getViews()) { if (id.equals(view.getId())) { return true; } } return false; }
private View getView(String id, Component c) { Collection<View> views = UIUtil.getComponentsExtending(c, View.class); for (View view : views) { if (view.getId().equals(id)) { return view; } } return null; }
/** * This method needs to be overriden to provide a * <code>PluginExtensionMatcher</code>, which is used to filter * the plugin extensions to a desired subset. */ protected PluginExtensionMatcher getExtensionMatcher() { PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher(); matcher.put(ViewActionPluginJPFImpl.VIEW_ID_PARAM, view.getId()); return matcher; }
/** * This method needs to be overriden to provide a * <code>PluginExtensionMatcher</code>, which is used to filter * the plugin extensions to a desired subset. */ protected PluginExtensionMatcher getExtensionMatcher() { PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher(); matcher.put(ViewActionPluginJPFImpl.VIEW_ID_PARAM, view.getId()); return matcher; }
/** * This method needs to be overriden to provide a * <code>PluginExtensionMatcher</code>, which is used to filter * the plugin extensions to a desired subset. */ protected PluginExtensionMatcher getExtensionMatcher() { PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher(); matcher.put(ViewActionPluginJPFImpl.VIEW_ID_PARAM, view.getId()); return matcher; }
private boolean canNavigate(String type){ ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId()); return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type)); }
private boolean canNavigate(String type){ ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId()); return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type)); }
private boolean canNavigate(String type){ ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId()); return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type)); }
private boolean canNavigate(String type){ ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId()); return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type)); }
private boolean canDisplay(OWLEntity owlEntity) { String entityCat = new NavFinder().getNav(owlEntity); // search the contained views to see if there is one that can show the entity for (View view : getViewsPane().getViews()){ ViewComponent vc = view.getViewComponent(); if (vc != null){ // if the view is on a tab that has been initialised ask it directly if (vc instanceof AbstractOWLSelectionViewComponent){ final AbstractOWLSelectionViewComponent owlEntityViewComponent = (AbstractOWLSelectionViewComponent)vc; if (owlEntityViewComponent.canShowEntity(owlEntity)){ return true; } } } else { // otherwise, ask its plugin ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(view.getId()); if (plugin != null) { for (String nav : plugin.getNavigates()){ if (entityCat.equals(nav)){ return true; } } } } } return false; }