public String getViewName() { return plugin.getLabel(); }
public String getViewName() { return plugin.getLabel(); }
public String getViewName() { return plugin.getLabel(); }
private void showHelpIfPresent() { plugin.getHelpLink().ifPresent(l -> { try { Desktop.getDesktop().browse(l); } catch (IOException e1) { logger.warn("An error occurred whilst navigating to the help for the {} view. URL: {}", plugin.getLabel(), l); } }); }
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)); } }
Action action = new AbstractAction(plugin.getLabel()) {
Action action = new AbstractAction(plugin.getLabel()) {
Action action = new AbstractAction(plugin.getLabel()) {
/** * Shows the view that is identified by the specified id. * @param viewId The id of the view to be shown. * @return The <code>View</code> that was shown. If the * <code>View</code> could not be shown then the return * value is <code>null</code>. */ public View showView(String viewId) { ViewComponentPlugin plugin = pluginMap.get(viewId); if (plugin == null) { return null; } // We need to get hold of the views tab Workspace ws = plugin.getWorkspace(); if (ws instanceof TabbedWorkspace) { WorkspaceTab tab = ((TabbedWorkspace) ws).getSelectedTab(); // if (tab instanceof WorkspaceViewsTab) { View view = new View(plugin, plugin.getWorkspace()); DynamicConfigPanel pan = new DynamicConfigPanel(tab); pan.setCurrentComponent(view, plugin.getLabel()); pan.activate(); // ((WorkspaceViewsTab) tab).getViewsPane().addView(view, plugin.getLabel()); // } } return null; } }
/** * Shows the view that is identified by the specified id. * @param viewId The id of the view to be shown. * @return The <code>View</code> that was shown. If the * <code>View</code> could not be shown then the return * value is <code>null</code>. */ public View showView(String viewId) { ViewComponentPlugin plugin = pluginMap.get(viewId); if (plugin == null) { return null; } // We need to get hold of the views tab Workspace ws = plugin.getWorkspace(); if (ws instanceof TabbedWorkspace) { WorkspaceTab tab = ((TabbedWorkspace) ws).getSelectedTab(); // if (tab instanceof WorkspaceViewsTab) { View view = new View(plugin, plugin.getWorkspace()); DynamicConfigPanel pan = new DynamicConfigPanel(tab); pan.setCurrentComponent(view, plugin.getLabel()); pan.activate(); // ((WorkspaceViewsTab) tab).getViewsPane().addView(view, plugin.getLabel()); // } } return null; } }
/** * Shows the view that is identified by the specified id. * @param viewId The id of the view to be shown. * @return The <code>View</code> that was shown. If the * <code>View</code> could not be shown then the return * value is <code>null</code>. */ public View showView(String viewId) { ViewComponentPlugin plugin = pluginMap.get(viewId); if (plugin == null) { return null; } // We need to get hold of the views tab Workspace ws = plugin.getWorkspace(); if (ws instanceof TabbedWorkspace) { WorkspaceTab tab = ((TabbedWorkspace) ws).getSelectedTab(); // if (tab instanceof WorkspaceViewsTab) { View view = new View(plugin, plugin.getWorkspace()); DynamicConfigPanel pan = new DynamicConfigPanel(tab); pan.setCurrentComponent(view, plugin.getLabel()); pan.activate(); // ((WorkspaceViewsTab) tab).getViewsPane().addView(view, plugin.getLabel()); // } } return null; } }
public void splitHorizontallyWith(ViewComponentPlugin plugin) { if (getNodePanel() != null) { ComponentNode newNode = new ComponentNode(); newNode.add(createView(plugin), plugin.getLabel()); componentNode.getParent().insertNodeAfter(newNode, componentNode, SplitterNode.HORIZONTAL_SPLITTER); getNodePanel().rebuild(); } else if (getParent() instanceof ViewContainer) { ((ViewContainer) getParent()).splitHorizontally(createView(plugin)); } }
public void splitVerticallyWith(ViewComponentPlugin plugin) { if (getNodePanel() != null) { ComponentNode newNode = new ComponentNode(); newNode.add(createView(plugin), plugin.getLabel()); componentNode.getParent().insertNodeAfter(newNode, componentNode, SplitterNode.VERTICAL_SPLITTER); getNodePanel().rebuild(); } else if (getParent() instanceof ViewContainer) { ((ViewContainer) getParent()).splitVertically(createView(plugin)); } }
public void splitHorizontallyWith(ViewComponentPlugin plugin) { if (getNodePanel() != null) { ComponentNode newNode = new ComponentNode(); newNode.add(createView(plugin), plugin.getLabel()); componentNode.getParent().insertNodeAfter(newNode, componentNode, SplitterNode.HORIZONTAL_SPLITTER); getNodePanel().rebuild(); } else if (getParent() instanceof ViewContainer) { ((ViewContainer) getParent()).splitHorizontally(createView(plugin)); } }
public void splitVerticallyWith(ViewComponentPlugin plugin) { if (getNodePanel() != null) { ComponentNode newNode = new ComponentNode(); newNode.add(createView(plugin), plugin.getLabel()); componentNode.getParent().insertNodeAfter(newNode, componentNode, SplitterNode.VERTICAL_SPLITTER); getNodePanel().rebuild(); } else if (getParent() instanceof ViewContainer) { ((ViewContainer) getParent()).splitVertically(createView(plugin)); } }
public void splitHorizontallyWith(ViewComponentPlugin plugin) { if (getNodePanel() != null) { ComponentNode newNode = new ComponentNode(); newNode.add(createView(plugin), plugin.getLabel()); componentNode.getParent().insertNodeAfter(newNode, componentNode, SplitterNode.HORIZONTAL_SPLITTER); getNodePanel().rebuild(); } else if (getParent() instanceof ViewContainer) { ((ViewContainer) getParent()).splitHorizontally(createView(plugin)); } }
public void splitVerticallyWith(ViewComponentPlugin plugin) { if (getNodePanel() != null) { ComponentNode newNode = new ComponentNode(); newNode.add(createView(plugin), plugin.getLabel()); componentNode.getParent().insertNodeAfter(newNode, componentNode, SplitterNode.VERTICAL_SPLITTER); getNodePanel().rebuild(); } else if (getParent() instanceof ViewContainer) { ((ViewContainer) getParent()).splitVertically(createView(plugin)); } }