public Set<View> getViews() { Set<View> views = new HashSet<>(); getViews(this, views); return views; }
public Set<View> getViews() { Set<View> views = new HashSet<View>(); getViews(this, views); return views; }
public Set<View> getViews() { Set<View> views = new HashSet<View>(); getViews(this, views); return views; }
private static void getViews(Component c, Set<View> result) { if (c instanceof View) { result.add((View) c); } if (c instanceof Container) { Component[] components = ((Container) c).getComponents(); for (Component comp : components) { getViews(comp, result); } } }
private static void getViews(Component c, Set<View> result) { if (c instanceof View) { result.add((View) c); } if (c instanceof Container) { Component[] components = ((Container) c).getComponents(); for (Component comp : components) { getViews(comp, result); } } }
private static void getViews(Component c, Set<View> result) { if (c instanceof View) { result.add((View) c); } if (c instanceof Container) { Component[] components = ((Container) c).getComponents(); for (Component comp : components) { getViews(comp, result); } } }
public boolean containsView(String id) { for (View view : getViews()) { if (id.equals(view.getId())) { return true; } } return false; }
public void dispose() { // Dispose of the views logger.debug("Disposing of views"); for (View view : getViews()) { view.dispose(); } }
public void dispose() { // Dispose of the views logger.debug("Disposing of views"); for (View view : getViews()) { view.dispose(); } }
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 void dispose() { // Dispose of the views logger.debug("Disposing of views"); for (View view : getViews()) { view.dispose(); } }
public void bringViewToFront(String id) { for (View view : getViews()) { if (view.getId() != null && view.getId().equals(id)) { Util.bringToFront(view); // Carry on until all views with the specified // view id are in front } } }
public void bringViewToFront(String id) { for (View view : getViews()) { if (view.getId() != null && view.getId().equals(id)) { Util.bringToFront(view); // Carry on until all views with the specified // view id are in front } } }
public void bringViewToFront(String id) { for (View view : getViews()) { if (view.getId() != null && view.getId().equals(id)) { Util.bringToFront(view); // Carry on until all views with the specified // view id are in front } } }
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 && vc instanceof SelectionDriver){ final AbstractOWLSelectionViewComponent owlEntityViewComponent = (AbstractOWLSelectionViewComponent)vc; if (owlEntityViewComponent.canShowEntity(owlEntity)){ lastEntityDisplayCandidate = Optional.of(view); 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)){ lastEntityDisplayCandidate = Optional.of(view); return true; } } } } } return false; }
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; }
public void reset() { for (View view : viewsPane.getViews()) { if (view.getViewComponent() != null) { if (view.getViewComponent() instanceof Resettable) { ((Resettable) view.getViewComponent()).reset(); } } } getWorkspace().getViewManager().unregisterViews(this); remove(viewsPane); viewsPane.dispose(); ViewsPaneMemento memento = new ViewsPaneMemento(this); memento.setForceReset(true); viewsPane = new ViewsPane(getWorkspace(), memento); add(viewsPane, BorderLayout.CENTER); getWorkspace().getViewManager().registerViews(this); }
public void reset() { for (View view : viewsPane.getViews()) { if (view.getViewComponent() != null) { if (view.getViewComponent() instanceof Resettable) { ((Resettable) view.getViewComponent()).reset(); } } } getWorkspace().getViewManager().unregisterViews(this); remove(viewsPane); viewsPane.dispose(); ViewsPaneMemento memento = new ViewsPaneMemento(this); memento.setForceReset(true); viewsPane = new ViewsPane(getWorkspace(), memento); add(viewsPane, BorderLayout.CENTER); getWorkspace().getViewManager().registerViews(this); }
public void reset() { for (View view : viewsPane.getViews()) { if (view.getViewComponent() != null) { if (view.getViewComponent() instanceof Resettable) { ((Resettable) view.getViewComponent()).reset(); } } } getWorkspace().getViewManager().unregisterViews(this); remove(viewsPane); viewsPane.dispose(); ViewsPaneMemento memento = new ViewsPaneMemento(this); memento.setForceReset(true); viewsPane = new ViewsPane(getWorkspace(), memento); add(viewsPane, BorderLayout.CENTER); getWorkspace().getViewManager().registerViews(this); }