Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
SmirnovEgorRu committed Jan 7, 2020
1 parent fa381d8 commit 45240b7
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 16 deletions.
14 changes: 14 additions & 0 deletions code/interpolationsearch/View/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// apply from: rootDir.getAbsolutePath() + '/config/scripts/javafx.plugin'
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}

apply plugin: 'application'
mainClassName = 'ru.unn.agile.ComplexNumber.view.Main'

javafx {
version = "11.0.2"
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.base', 'javafx.fxml' ]
}

dependencies {
compile project(':interpolationsearch-viewmodel')
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package ru.unn.agile.interpolationsearch.view;

import javafx.beans.property.Property;
import javafx.css.PseudoClass;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import ru.unn.agile.interpolationsearch.viewmodel.ViewModel;

public class InterpolationSearch {
private final String pointInputTooltip = "Only numbers allowed";

@FXML
private ViewModel viewModel;
@FXML
Expand All @@ -26,18 +22,12 @@ public class InterpolationSearch {

@FXML
void initialize() {
initTextField(numberTextField, viewModel.numberProperty());
initTextField(searchValueTextField, viewModel.searchValueProperty());
numberTextField.textProperty().bindBidirectional(viewModel.numberProperty());
searchValueTextField.textProperty().bindBidirectional(viewModel.searchValueProperty());

insertNumberButton.setOnAction(e -> viewModel.addNumber());
listNumbers.itemsProperty().bindBidirectional(viewModel.numbersProperty());
searchButton.setOnAction(e -> viewModel.doSearch());
resultTextArea.textProperty().bindBidirectional(viewModel.resultProperty());
}

private void initTextField(final TextField textField,
final Property<String> property) {
textField.textProperty().bindBidirectional(property);
textField.tooltipProperty().setValue(new Tooltip(pointInputTooltip));
}
}
14 changes: 14 additions & 0 deletions code/interpolationsearch/ViewModel/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// apply from: rootDir.getAbsolutePath() + '/config/scripts/javafx.plugin'
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}

apply plugin: 'application'
mainClassName = 'ru.unn.agile.ComplexNumber.view.Main'

javafx {
version = "11.0.2"
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.base', 'javafx.fxml' ]
}

dependencies {
compile project(':interpolationsearch-model')
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ru.unn.agile.interpolationsearch.viewmodel;

import javafx.beans.binding.BooleanBinding;
import javafx.beans.property.*;
import javafx.collections.FXCollections;
import ru.unn.agile.interpolationsearch.model.InterpolationSearch;
Expand Down
4 changes: 1 addition & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ include "code/polynomial-calculator/View"
project(":code/polynomial-calculator/View").name = "polynomial-calculator-view"
include "code/polynomial-calculator/ViewModel"
project(":code/polynomial-calculator/ViewModel").name = "polynomial-calculator-viewmodel"
// Петров Кирил
include "code/interpolationsearch"
project(":code/interpolationsearch").name = "interpolationsearch"
// Повеликин Ростислав
include "code/red-black-tree"
project(":code/red-black-tree").name = "red-black-tree-Model"
Expand Down Expand Up @@ -262,6 +259,7 @@ project(":code/dijkstra-algorithm/ViewModel").name = "dijkstra-algorithm-ViewMod
// Смирнов Егор
include "code/priority-queue"
project(":code/priority-queue").name = "priority-queue"
// Interpolation Search
include "code/interpolationsearch/Model"
project(":code/interpolationsearch/Model").name = "interpolationsearch-model"
include "code/interpolationsearch/View"
Expand Down

0 comments on commit 45240b7

Please sign in to comment.