/** * Tests to see whether the holder contains a view * with a particular id. * @param id The id of the view to test for. * @return <code>true</code> if the holder contains the view, * or <code>false</code> if the holder does not contain the * view. */ public boolean containsView(String id) { return getView(id) != null; }
/** * Tests to see whether the holder contains a view * with a particular id. * @param id The id of the view to test for. * @return <code>true</code> if the holder contains the view, * or <code>false</code> if the holder does not contain the * view. */ public boolean containsView(String id) { return getView(id) != null; }
/** * Gets hold of a <code>View</code> that is contained * within the holder, that has a specified id. * @param id The id of the <code>View</code> to be retrieved. * @return The <code>View</code>, or <code>null</code> * if the holder doesn't contain a <code>View</code> with * the specified id. */ public View getView(String id) { return getView(id, this); }
/** * Tests to see whether the holder contains a view * with a particular id. * @param id The id of the view to test for. * @return <code>true</code> if the holder contains the view, * or <code>false</code> if the holder does not contain the * view. */ public boolean containsView(String id) { return getView(id) != null; }
/** * Gets hold of a <code>View</code> that is contained * within the holder, that has a specified id. * @param id The id of the <code>View</code> to be retrieved. * @return The <code>View</code>, or <code>null</code> * if the holder doesn't contain a <code>View</code> with * the specified id. */ public View getView(String id) { return getView(id, this); }
/** * Gets hold of a <code>View</code> that is contained * within the holder, that has a specified id. * @param id The id of the <code>View</code> to be retrieved. * @return The <code>View</code>, or <code>null</code> * if the holder doesn't contain a <code>View</code> with * the specified id. */ public View getView(String id) { return getView(id, this); }
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; }
View v = viewHolder.getView(plugin.getId()); if (v != null) { v.closeView();
View v = viewHolder.getView(plugin.getId()); if (v != null) { v.closeView();