public void actionPerformed(ActionEvent e) { ExportBitmapOptionsDialog.this.dispose(); } }
private void updateOnHeightInches(double newHeightInches) { double dpi = ((Number) resolutionComboBox.getSelectedItem()).doubleValue(); updateOnHeightPixels((int) (newHeightInches * dpi)); }
this.originalHeight = imageHeight; setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); Container content = getContentPane(); content.add(buttonsPanel, c); updateOnZoom(1.0); setLocationRelativeTo(Cytoscape.getDesktop()); pack();
public void export(final CyNetworkView view, final FileOutputStream stream) { final InternalFrameComponent ifc = Cytoscape.getDesktop() .getNetworkViewManager().getInternalFrameComponent(view); final ExportBitmapOptionsDialog dialog = new ExportBitmapOptionsDialog(ifc.getWidth(), ifc.getHeight()); ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent e) { BitmapExporter exporter = new BitmapExporter(extension, dialog.getZoom()); dialog.dispose(); ExportTask.run("Exporting to " + extension, exporter, view, stream); } }; dialog.addActionListener(listener); dialog.setVisible(true); } }