use of de.unijena.cheminf.mortar.gui.views.SettingsView in project MORTAR by FelixBaensch.
the class SettingsViewController method showSettingsView.
//
// <editor-fold desc="private methods" defaultstate="collapsed">
/**
* Initialises and opens settingsView
*/
private void showSettingsView() {
if (this.settingsView == null)
this.settingsView = new SettingsView();
this.settingsViewStage = new Stage();
Scene tmpScene = new Scene(this.settingsView, GuiDefinitions.GUI_MAIN_VIEW_WIDTH_VALUE, GuiDefinitions.GUI_MAIN_VIEW_HEIGHT_VALUE);
this.settingsViewStage.setScene(tmpScene);
this.settingsViewStage.initModality(Modality.WINDOW_MODAL);
this.settingsViewStage.initOwner(this.mainStage);
this.settingsViewStage.setTitle(Message.get("FragmentationSettingsView.title"));
this.settingsViewStage.setMinHeight(GuiDefinitions.GUI_MAIN_VIEW_HEIGHT_VALUE);
this.settingsViewStage.setMinWidth(GuiDefinitions.GUI_MAIN_VIEW_WIDTH_VALUE);
Platform.runLater(() -> {
this.addListeners();
this.settingsView.addTab(this.settingsViewStage, Message.get("GlobalSettingsView.title"), this.settingsContainer.settingsProperties(), this.settingsContainer.getSettingNameToTooltipTextMap(), this.recentProperties);
});
this.settingsViewStage.showAndWait();
}
use of de.unijena.cheminf.mortar.gui.views.SettingsView in project MORTAR by FelixBaensch.
the class FragmentationSettingsViewController method openFragmentationSettingsView.
//
/**
* Initialises and opens a settings view for fragmentationSettings
*/
private void openFragmentationSettingsView() {
if (this.settingsView == null)
this.settingsView = new SettingsView();
this.fragmentationSettingsViewStage = new Stage();
Scene tmpScene = new Scene(this.settingsView, GuiDefinitions.GUI_MAIN_VIEW_WIDTH_VALUE, GuiDefinitions.GUI_MAIN_VIEW_HEIGHT_VALUE);
this.fragmentationSettingsViewStage.setScene(tmpScene);
this.fragmentationSettingsViewStage.initModality(Modality.WINDOW_MODAL);
this.fragmentationSettingsViewStage.initOwner(this.mainStage);
this.fragmentationSettingsViewStage.show();
this.fragmentationSettingsViewStage.setTitle(Message.get("FragmentationSettingsView.title"));
this.fragmentationSettingsViewStage.setMinHeight(GuiDefinitions.GUI_MAIN_VIEW_HEIGHT_VALUE);
this.fragmentationSettingsViewStage.setMinWidth(GuiDefinitions.GUI_MAIN_VIEW_WIDTH_VALUE);
//
this.addListener();
for (IMoleculeFragmenter tmpFragmenter : this.fragmenters) {
HashMap<String, Object> tmpRecentProperties = new HashMap<>(tmpFragmenter.settingsProperties().size());
this.recentProperties.put(tmpFragmenter.getFragmentationAlgorithmName(), tmpRecentProperties);
Tab tmpTab = this.settingsView.addTab(this.fragmentationSettingsViewStage, tmpFragmenter.getFragmentationAlgorithmName(), tmpFragmenter.settingsProperties(), tmpFragmenter.getSettingNameToTooltipTextMap(), tmpRecentProperties);
if (tmpFragmenter.getFragmentationAlgorithmName().equals(this.selectedFragmenterName)) {
this.settingsView.getSelectionModel().select(tmpTab);
}
}
}
Aggregations