Java Code Examples for javax.swing.JSplitPane#setEnabled()
The following examples show how to use
javax.swing.JSplitPane#setEnabled() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeatureOverviewWindow.java From mzmine2 with GNU General Public License v2.0 | 5 votes |
private JSplitPane addSpectraMS1() { JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); SpectraVisualizerWindow spectraWindowMS1 = new SpectraVisualizerWindow(rawFiles[0]); spectraWindowMS1.loadRawData(rawFiles[0].getScan(feature.getRepresentativeScanNumber())); pane.add(spectraWindowMS1.getSpectrumPlot()); pane.add(spectraWindowMS1.getToolBar()); pane.setResizeWeight(1); pane.setEnabled(false); pane.setDividerSize(0); return pane; }
Example 2
Source File: FeatureOverviewWindow.java From mzmine2 with GNU General Public License v2.0 | 5 votes |
private JSplitPane addSpectraMS2() { JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); SpectraVisualizerWindow spectraWindowMS2 = new SpectraVisualizerWindow(rawFiles[0]); spectraWindowMS2.loadRawData(rawFiles[0].getScan(feature.getMostIntenseFragmentScanNumber())); pane.add(spectraWindowMS2.getSpectrumPlot()); pane.add(spectraWindowMS2.getToolBar()); pane.setResizeWeight(1); pane.setEnabled(false); pane.setDividerSize(0); return pane; }
Example 3
Source File: DatFileViewer.java From settlers-remake with MIT License | 5 votes |
private DatFileViewer() { glCanvas = new Surface(); JPanel infoField = new JPanel(); infoField.setLayout(new BoxLayout(infoField, BoxLayout.PAGE_AXIS)); lblDatType = new JLabel(); lblNumUiSeqs = new JLabel(); lblNumSettlerSeqs = new JLabel(); lblNumLandscapeSeqs = new JLabel(); infoField.add(lblDatType); infoField.add(lblNumSettlerSeqs); infoField.add(lblNumLandscapeSeqs); infoField.add(lblNumUiSeqs); listItems = new DefaultListModel<>(); listView = new JList<>(listItems); listView.getSelectionModel().addListSelectionListener(this); JSplitPane splitPane2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT); splitPane2.setTopComponent(new JScrollPane(listView)); splitPane2.setBottomComponent(infoField); splitPane2.setResizeWeight(0.5); splitPane2.setEnabled(false); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); splitPane.setLeftComponent(splitPane2); splitPane.setRightComponent(glCanvas); splitPane.setResizeWeight(0.10); this.setTitle("DatFileViewer"); this.setJMenuBar(createMenu()); this.getContentPane().add(splitPane); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); this.setSize(new Dimension(800, 600)); this.setVisible(true); }
Example 4
Source File: MultiSpectraVisualizerWindow.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
private JPanel addSpectra(int scan) { JPanel panel = new JPanel(new BorderLayout()); // Split pane for eic plot (top) and spectrum (bottom) JSplitPane bottomPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // Create EIC plot // labels for TIC visualizer Map<Feature, String> labelsMap = new HashMap<Feature, String>(0); Feature peak = row.getPeak(activeRaw); // scan selection ScanSelection scanSelection = new ScanSelection(activeRaw.getDataRTRange(1), 1); // mz range Range<Double> mzRange = null; mzRange = peak.getRawDataPointsMZRange(); // optimize output by extending the range double upper = mzRange.upperEndpoint(); double lower = mzRange.lowerEndpoint(); double fiveppm = (upper * 5E-6); mzRange = Range.closed(lower - fiveppm, upper + fiveppm); // labels labelsMap.put(peak, peak.toString()); // get EIC window TICVisualizerWindow window = new TICVisualizerWindow(new RawDataFile[] {activeRaw}, // raw TICPlotType.BASEPEAK, // plot type scanSelection, // scan selection mzRange, // mz range null, // new Feature[] {peak}, // selected features labelsMap); // labels // get EIC Plot TICPlot ticPlot = window.getTICPlot(); // ticPlot.setPreferredSize(new Dimension(600, 200)); ticPlot.getChart().getLegend().setVisible(false); // add a retention time Marker to the EIC ValueMarker marker = new ValueMarker(activeRaw.getScan(scan).getRetentionTime()); marker.setPaint(Color.RED); marker.setStroke(new BasicStroke(3.0f)); XYPlot plot = (XYPlot) ticPlot.getChart().getPlot(); plot.addDomainMarker(marker); // bottomPane.add(ticPlot); bottomPane.setResizeWeight(0.5); bottomPane.setEnabled(true); bottomPane.setDividerSize(5); bottomPane.setDividerLocation(200); JSplitPane spectrumPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); // get MS/MS spectra window SpectraVisualizerWindow spectraWindow = new SpectraVisualizerWindow(activeRaw); spectraWindow.loadRawData(activeRaw.getScan(scan)); // get MS/MS spectra plot SpectraPlot spectrumPlot = spectraWindow.getSpectrumPlot(); spectrumPlot.getChart().getLegend().setVisible(false); // spectrumPlot.setPreferredSize(new Dimension(600, 400)); // spectrumPane.add(spectrumPlot); // spectrumPane.add(spectraWindow.getToolBar()); spectrumPane.setResizeWeight(1); spectrumPane.setEnabled(false); spectrumPane.setDividerSize(0); bottomPane.add(spectrumPane); panel.add(bottomPane); panel.setBorder(BorderFactory.createLineBorder(Color.black)); return panel; }
Example 5
Source File: MultiSpectraVisualizerWindow.java From mzmine2 with GNU General Public License v2.0 | 4 votes |
private JPanel addSpectra(int scan) { JPanel panel = new JPanel(new BorderLayout()); // Split pane for eic plot (top) and spectrum (bottom) JSplitPane bottomPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // Create EIC plot // labels for TIC visualizer Map<Feature, String> labelsMap = new HashMap<Feature, String>(0); Feature peak = row.getPeak(activeRaw); // scan selection ScanSelection scanSelection = new ScanSelection(activeRaw.getDataRTRange(1), 1); // mz range Range<Double> mzRange = null; mzRange = peak.getRawDataPointsMZRange(); // optimize output by extending the range double upper = mzRange.upperEndpoint(); double lower = mzRange.lowerEndpoint(); double fiveppm = (upper * 5E-6); mzRange = Range.closed(lower - fiveppm, upper + fiveppm); // labels labelsMap.put(peak, peak.toString()); // get EIC window TICVisualizerWindow window = new TICVisualizerWindow(new RawDataFile[] {activeRaw}, // raw TICPlotType.BASEPEAK, // plot type scanSelection, // scan selection mzRange, // mz range new Feature[] {peak}, // selected features labelsMap); // labels // get EIC Plot TICPlot ticPlot = window.getTICPlot(); ticPlot.setPreferredSize(new Dimension(600, 200)); ticPlot.getChart().getLegend().setVisible(false); // add a retention time Marker to the EIC ValueMarker marker = new ValueMarker(activeRaw.getScan(scan).getRetentionTime()); marker.setPaint(Color.RED); marker.setStroke(new BasicStroke(3.0f)); XYPlot plot = (XYPlot) ticPlot.getChart().getPlot(); plot.addDomainMarker(marker); bottomPane.add(ticPlot); bottomPane.setResizeWeight(0.5); bottomPane.setEnabled(true); bottomPane.setDividerSize(5); bottomPane.setDividerLocation(200); JSplitPane spectrumPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); // get MS/MS spectra window SpectraVisualizerWindow spectraWindow = new SpectraVisualizerWindow(activeRaw); spectraWindow.loadRawData(activeRaw.getScan(scan)); // get MS/MS spectra plot SpectraPlot spectrumPlot = spectraWindow.getSpectrumPlot(); spectrumPlot.getChart().getLegend().setVisible(false); spectrumPlot.setPreferredSize(new Dimension(600, 400)); spectrumPane.add(spectrumPlot); spectrumPane.add(spectraWindow.getToolBar()); spectrumPane.setResizeWeight(1); spectrumPane.setEnabled(false); spectrumPane.setDividerSize(0); bottomPane.add(spectrumPane); panel.add(bottomPane); panel.setBorder(BorderFactory.createLineBorder(Color.black)); return panel; }