Java Code Examples for javafx.scene.control.ToolBar#setOrientation()
The following examples show how to use
javafx.scene.control.ToolBar#setOrientation() .
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: ProductIonFilterVisualizerWindow.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
public ProductIonFilterVisualizerWindow(RawDataFile dataFile, ParameterSet parameters) { borderPane = new BorderPane(); scene = new Scene(borderPane); setScene(scene); this.dataFile = dataFile; // Retrieve parameter's values Range<Double> rtRange = parameters.getParameter(ProductIonFilterParameters.retentionTimeRange).getValue(); Range<Double> mzRange = parameters.getParameter(ProductIonFilterParameters.mzRange).getValue(); Object xAxisType = parameters.getParameter(ProductIonFilterParameters.xAxisType).getValue(); mzDifference = parameters.getParameter(ProductIonFilterParameters.mzDifference).getValue(); targetedMZ_List = parameters.getParameter(ProductIonFilterParameters.targetedMZ_List).getValue(); targetedNF_List = parameters.getParameter(ProductIonFilterParameters.targetedNF_List).getValue(); fileName = parameters.getParameter(ProductIonFilterParameters.fileName).getValue(); basePeakPercent = parameters.getParameter(ProductIonFilterParameters.basePeakPercent).getValue(); // Set window components dataset = new ProductIonFilterDataSet(dataFile, xAxisType, rtRange, mzRange, this, mzDifference, targetedMZ_List, targetedNF_List, basePeakPercent, fileName); productIonFilterPlot = new ProductIonFilterPlot(this); productIonFilterPlot.setAxisTypes(xAxisType); productIonFilterPlot.addProductionFilterDataSet(dataset); productIonFilterPlot.setMenuItems(); borderPane.setCenter(productIonFilterPlot); toolBar = new ToolBar(); toolBar.setOrientation(Orientation.VERTICAL); Button highlightPrecursorBtn = new Button(null, new ImageView(PRECURSOR_MASS_ICON)); highlightPrecursorBtn.setTooltip(new Tooltip("Highlight selected precursor mass range")); highlightPrecursorBtn.setOnAction(e -> { ProductIonFilterSetHighlightDialog dialog = new ProductIonFilterSetHighlightDialog(this, productIonFilterPlot, "HIGHLIGHT_PRECURSOR"); dialog.show(); }); toolBar.getItems().add(highlightPrecursorBtn); borderPane.setRight(toolBar); MZmineCore.getTaskController().addTask(dataset, TaskPriority.HIGH); updateTitle(); // Add the Windows menu WindowsMenu.addWindowsMenu(getScene()); // get the window settings parameter ParameterSet paramSet = MZmineCore.getConfiguration().getModuleParameters(ProductIonFilterVisualizerModule.class); WindowSettingsParameter settings = paramSet.getParameter(ProductIonFilterParameters.windowSettings); // update the window and listen for changes settings.applySettingsToWindow(this); }
Example 2
Source File: NeutralLossVisualizerWindow.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
/** * Constructor. * * @param dataFile file containing the data of one sample * @param parameters plot parameters set by the user */ public NeutralLossVisualizerWindow(RawDataFile dataFile, ParameterSet parameters) { this.dataFile = dataFile; // Retrieve parameter's values Range<Double> rtRange = parameters.getParameter(NeutralLossParameters.retentionTimeRange).getValue(); Range<Double> mzRange = parameters.getParameter(NeutralLossParameters.mzRange).getValue(); int numOfFragments = parameters.getParameter(NeutralLossParameters.numOfFragments).getValue(); Object xAxisType = parameters.getParameter(NeutralLossParameters.xAxisType).getValue(); // Set window components dataset = new NeutralLossDataSet(dataFile, xAxisType, rtRange, mzRange, numOfFragments, this); borderPane = new BorderPane(); scene = new Scene(borderPane); // Use main CSS scene.getStylesheets() .addAll(MZmineCore.getDesktop().getMainWindow().getScene().getStylesheets()); setScene(scene); setMinWidth(400.0); setMinHeight(300.0); neutralLossPlot = new NeutralLossPlot(); neutralLossPlot.setAxisTypes(xAxisType); neutralLossPlot.addNeutralLossDataSet(dataset); neutralLossPlot.setVisualizer(this); neutralLossPlot.setMenuItems(); borderPane.setCenter(neutralLossPlot); toolBar = new ToolBar(); toolBar.setOrientation(Orientation.VERTICAL); Button highlightPrecursorBtn = new Button(null, new ImageView(PRECURSOR_MASS_ICON)); highlightPrecursorBtn.setTooltip(new Tooltip("Highlight precursor m/z range...")); highlightPrecursorBtn.setOnAction(e -> { NeutralLossSetHighlightDialog dialog = new NeutralLossSetHighlightDialog(this, neutralLossPlot, "HIGHLIGHT_PRECURSOR"); dialog.show(); }); toolBar.getItems().add(highlightPrecursorBtn); borderPane.setRight(toolBar); WindowsMenu.addWindowsMenu(scene); MZmineCore.getTaskController().addTask(dataset, TaskPriority.HIGH); updateTitle(); // get the window settings parameter ParameterSet paramSet = MZmineCore.getConfiguration().getModuleParameters(NeutralLossVisualizerModule.class); WindowSettingsParameter settings = paramSet.getParameter(NeutralLossParameters.windowSettings); // update the window and listen for changes settings.applySettingsToWindow(this); }
Example 3
Source File: ScatterPlotWindow.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
public ScatterPlotWindow(PeakList peakList) { setTitle("Scatter plot of " + peakList); mainPane = new BorderPane(); mainScene = new Scene(mainPane); // Use main CSS mainScene.getStylesheets() .addAll(MZmineCore.getDesktop().getMainWindow().getScene().getStylesheets()); setScene(mainScene); // setDefaultCloseOperation(DISPOSE_ON_CLOSE); topPanel = new ScatterPlotTopPanel(); mainPane.setTop(topPanel); chart = new ScatterPlotChart(this, topPanel, peakList); // Border border = BorderFactory.createEtchedBorder(EtchedBorder.RAISED); // chart.setBorder(border); // chart.setBackground(Color.white); mainPane.setCenter(chart); toolbar = new ToolBar(); toolbar.setOrientation(Orientation.VERTICAL); axesButton = new Button(null, new ImageView(axesIcon)); axesButton.setTooltip(new Tooltip("Setup ranges for axes")); axesButton.setOnAction(e -> { AxesSetupDialog dialog = new AxesSetupDialog(this, chart.getPlot()); dialog.show(); }); toolbar.getItems().add(axesButton); mainPane.setRight(toolbar); // JComponent leftMargin = (JComponent) Box.createRigidArea(new Dimension(10, 10)); // leftMargin.setOpaque(false); // add(leftMargin, BorderLayout.WEST); bottomPanel = new ScatterPlotBottomPanel(this, chart, peakList); mainPane.setBottom(bottomPanel); // Add the Windows menu WindowsMenu.addWindowsMenu(mainScene); // get the window settings parameter ParameterSet paramSet = MZmineCore.getConfiguration().getModuleParameters(ScatterPlotVisualizerModule.class); WindowSettingsParameter settings = paramSet.getParameter(ScatterPlotParameters.windowSettings); // update the window and listen for changes // settings.applySettingsToWindow(this); // this.addComponentListener(settings); setMinWidth(500.0); setMinHeight(400.0); }
Example 4
Source File: RTMZAnalyzerWindow.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
public RTMZAnalyzerWindow(AbstractXYZDataset dataset, PeakList peakList, InterpolatingLookupPaintScale paintScale) { mainPane = new BorderPane(); mainScene = new Scene(mainPane); // Use main CSS mainScene.getStylesheets() .addAll(MZmineCore.getDesktop().getMainWindow().getScene().getStylesheets()); setScene(mainScene); setMinWidth(600.0); setMinHeight(500.0); toolbar = new ToolBar(); toolbar.setOrientation(Orientation.VERTICAL); Button axesButton = new Button(null, new ImageView(axesIcon)); axesButton.setTooltip(new Tooltip("Setup ranges for axes")); Button colorButton = new Button(null, new ImageView(colorbarIcon)); colorButton.setTooltip(new Tooltip("Setup color palette")); toolbar.getItems().addAll(axesButton, colorButton); mainPane.setRight(toolbar); plot = new RTMZPlot(this, dataset, paintScale); mainPane.setCenter(plot); axesButton.setOnAction(e -> { AxesSetupDialog dialog = new AxesSetupDialog(this, plot.getChart().getXYPlot()); dialog.showAndWait(); }); colorButton.setOnAction(e -> { Platform.runLater(new Runnable() { @Override public void run() { InterpolatingLookupPaintScaleSetupDialogFX colorDialog = new InterpolatingLookupPaintScaleSetupDialogFX(plot.getPaintScale()); colorDialog.showAndWait(); if (colorDialog.getExitCode() == ExitCode.OK) plot.setPaintScale(colorDialog.getPaintScale()); } }); }); String title = peakList.getName(); title = title.concat(" : "); title = title.concat(dataset.toString()); this.setTitle(title); // Add the Windows menu WindowsMenu.addWindowsMenu(mainScene); }
Example 5
Source File: ProjectionPlotWindow.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
public ProjectionPlotWindow(PeakList peakList, ProjectionPlotDataset dataset, ParameterSet parameters) { mainPane = new BorderPane(); mainScene = new Scene(mainPane); // Use main CSS mainScene.getStylesheets() .addAll(MZmineCore.getDesktop().getMainWindow().getScene().getStylesheets()); setScene(mainScene); toolbar = new ToolBar(); toolbar.setOrientation(Orientation.VERTICAL); Button axesButton = new Button(null, new ImageView(axesIcon)); axesButton.setTooltip(new Tooltip("Setup ranges for axes")); Button labelsButton = new Button(null, new ImageView(labelsIcon)); labelsButton.setTooltip(new Tooltip("Toggle sample names")); toolbar.getItems().addAll(axesButton, labelsButton); mainPane.setRight(toolbar); plot = new ProjectionPlotPanel(this, dataset, parameters); mainPane.setCenter(plot); axesButton.setOnAction(e -> { AxesSetupDialog dialog = new AxesSetupDialog(this, plot.getChart().getXYPlot()); dialog.showAndWait(); }); labelsButton.setOnAction(e -> plot.cycleItemLabelMode()); String title = peakList.getName(); title = title.concat(" : "); title = title.concat(dataset.toString()); if (parameters.getParameter(ProjectionPlotParameters.peakMeasurementType) .getValue() == PeakMeasurementType.HEIGHT) title = title.concat(" (using peak heights)"); else title = title.concat(" (using peak areas)"); this.setTitle(title); // Add the Windows menu WindowsMenu.addWindowsMenu(mainScene); ParameterSet paramSet = MZmineCore.getConfiguration().getModuleParameters(ScatterPlotVisualizerModule.class); WindowSettingsParameter settings = paramSet.getParameter(ScatterPlotParameters.windowSettings); }