/** * If the selected workspace tab is a views tab, then * this method requests that the view specified by the * view id is brought to the front. * @param viewId The id of the view to be shown. */ public void bringViewToFront(String viewId) { ViewComponentPlugin plugin = pluginMap.get(viewId); if (plugin == null) { return; } // 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) { ((WorkspaceViewsTab) tab).bringViewToFront(viewId); } } }
private void updateEnabledStatus() { setEnabled(((TabbedWorkspace) getWorkspace()).getSelectedTab() instanceof Resettable); }
private void updateEnabledStatus() { setEnabled(((TabbedWorkspace) getWorkspace()).getSelectedTab() instanceof Resettable); }
private void updateEnabledStatus() { setEnabled(((TabbedWorkspace) getWorkspace()).getSelectedTab() instanceof Resettable); }
public void actionPerformed(ActionEvent event) { TabbedWorkspace workspace = (TabbedWorkspace) getWorkspace(); Set<String> extensions = new HashSet<>(); extensions.add("xml"); String fileName = workspace.getSelectedTab().getLabel().replace(' ', '_') + ".layout.xml"; File f = UIUtil.saveFile((Window) SwingUtilities.getAncestorOfClass(Window.class, workspace), "Save layout to", "XML Layout", extensions, fileName); if (f == null) { return; } try { f.getParentFile().mkdirs(); FileWriter writer = new FileWriter(f); ((WorkspaceViewsTab) workspace.getSelectedTab()).getViewsPane().saveViews(writer); writer.close(); JOptionPane.showMessageDialog(workspace, "Layout saved to: " + f); } catch (IOException e) { logger.error("An error occurred when saving a tab layout to {}.", f, e); JOptionPane.showMessageDialog(workspace, "There was a problem saving the layout", "Error", JOptionPane.ERROR_MESSAGE); } }
/** * If the selected workspace tab is a views tab, then * this method requests that the view specified by the * view id is brought to the front. * @param viewId The id of the view to be shown. */ public void bringViewToFront(String viewId) { ViewComponentPlugin plugin = pluginMap.get(viewId); if (plugin == null) { return; } // 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) { ((WorkspaceViewsTab) tab).bringViewToFront(viewId); } } }
/** * If the selected workspace tab is a views tab, then * this method requests that the view specified by the * view id is brought to the front. * @param viewId The id of the view to be shown. */ public void bringViewToFront(String viewId) { ViewComponentPlugin plugin = pluginMap.get(viewId); if (plugin == null) { return; } // 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) { ((WorkspaceViewsTab) tab).bringViewToFront(viewId); } } }
public void actionPerformed(ActionEvent event) { TabbedWorkspace workspace = (TabbedWorkspace) getWorkspace(); try { Set<String> extensions = new HashSet<String>(); extensions.add("xml"); String fileName = workspace.getSelectedTab().getLabel().replace(' ', '_') + ".layout.xml"; File f = UIUtil.saveFile((Window) SwingUtilities.getAncestorOfClass(Window.class, workspace), "Save layout to", "XML Layout", extensions, fileName); if (f == null) { return; } f.getParentFile().mkdirs(); FileWriter writer = new FileWriter(f); ((WorkspaceViewsTab) workspace.getSelectedTab()).getViewsPane().saveViews(writer); writer.close(); JOptionPane.showMessageDialog(workspace, "Layout saved to: " + f); } catch (IOException e) { LOGGER.error(e); JOptionPane.showMessageDialog(workspace, "There was a problem saving the layout", "Error", JOptionPane.ERROR_MESSAGE); } }
public void actionPerformed(ActionEvent event) { TabbedWorkspace workspace = (TabbedWorkspace) getWorkspace(); try { Set<String> extensions = new HashSet<String>(); extensions.add("xml"); String fileName = workspace.getSelectedTab().getLabel().replace(' ', '_') + ".layout.xml"; File f = UIUtil.saveFile((Window) SwingUtilities.getAncestorOfClass(Window.class, workspace), "Save layout to", "XML Layout", extensions, fileName); if (f == null) { return; } f.getParentFile().mkdirs(); FileWriter writer = new FileWriter(f); ((WorkspaceViewsTab) workspace.getSelectedTab()).getViewsPane().saveViews(writer); writer.close(); JOptionPane.showMessageDialog(workspace, "Layout saved to: " + f); } catch (IOException e) { LOGGER.error(e); JOptionPane.showMessageDialog(workspace, "There was a problem saving the layout", "Error", JOptionPane.ERROR_MESSAGE); } }
public void actionPerformed(ActionEvent e) { WorkspaceTab tab = ((TabbedWorkspace) getWorkspace()).getSelectedTab(); ((Resettable) tab).reset(); tab.validate(); }
public void actionPerformed(ActionEvent e) { WorkspaceTab tab = ((TabbedWorkspace) getWorkspace()).getSelectedTab(); ((Resettable) tab).reset(); tab.validate(); }
public void actionPerformed(ActionEvent e) { WorkspaceTab tab = ((TabbedWorkspace) getWorkspace()).getSelectedTab(); ((Resettable) tab).reset(); tab.validate(); }
/** * 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; } }