minor changes
This commit is contained in:
parent
5f90412f7c
commit
90e6d2e19b
|
@ -16,7 +16,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class SearchController {
|
public class SearchController {
|
||||||
|
|
||||||
public static final int PAGE_ITEMS_COUNT = 30;
|
public static final int PAGE_ITEMS_COUNT = 10;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField searchField;
|
private TextField searchField;
|
||||||
|
@ -41,8 +41,7 @@ public class SearchController {
|
||||||
// search panel
|
// search panel
|
||||||
searchButton.setText("Search");
|
searchButton.setText("Search");
|
||||||
searchButton.setOnAction(event -> loadData());
|
searchButton.setOnAction(event -> loadData());
|
||||||
|
searchButton.setStyle("-fx-background-color: #457ecd; -fx-text-fill: #ffffff;");
|
||||||
searchButton.setStyle("-fx-background-color: slateblue; -fx-text-fill: white;");
|
|
||||||
|
|
||||||
searchField.setOnKeyPressed(event -> {
|
searchField.setOnKeyPressed(event -> {
|
||||||
if (event.getCode().equals(KeyCode.ENTER)) {
|
if (event.getCode().equals(KeyCode.ENTER)) {
|
||||||
|
@ -59,7 +58,7 @@ public class SearchController {
|
||||||
|
|
||||||
private Node createPage(Integer pageIndex) {
|
private Node createPage(Integer pageIndex) {
|
||||||
|
|
||||||
VBox iconContainer = new VBox();
|
VBox dataContainer = new VBox();
|
||||||
|
|
||||||
TableView<Person> tableView = new TableView<>(masterData);
|
TableView<Person> tableView = new TableView<>(masterData);
|
||||||
TableColumn id = new TableColumn("ID");
|
TableColumn id = new TableColumn("ID");
|
||||||
|
@ -67,29 +66,28 @@ public class SearchController {
|
||||||
TableColumn employed = new TableColumn("EMPLOYED");
|
TableColumn employed = new TableColumn("EMPLOYED");
|
||||||
|
|
||||||
tableView.getColumns().addAll(id, name, employed);
|
tableView.getColumns().addAll(id, name, employed);
|
||||||
iconContainer.getChildren().add(tableView);
|
dataContainer.getChildren().add(tableView);
|
||||||
|
|
||||||
return iconContainer;
|
return dataContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadData() {
|
private void loadData() {
|
||||||
|
|
||||||
String searchText = searchField.getText();
|
String searchText = searchField.getText();
|
||||||
|
|
||||||
Task<List<Person>> task = new Task<List<Person>>() {
|
Task<ObservableList<Person>> task = new Task<ObservableList<Person>>() {
|
||||||
@Override
|
@Override
|
||||||
protected List<Person> call() throws Exception {
|
protected ObservableList<Person> call() throws Exception {
|
||||||
updateMessage("Loading data");
|
updateMessage("Loading data");
|
||||||
return masterData
|
return FXCollections.observableArrayList(masterData
|
||||||
.stream()
|
.stream()
|
||||||
.filter(value -> value.getName().toLowerCase().contains(searchText))
|
.filter(value -> value.getName().toLowerCase().contains(searchText))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
task.setOnSucceeded(event -> {
|
task.setOnSucceeded(event -> {
|
||||||
List<Person> data = task.getValue();
|
masterData = task.getValue();
|
||||||
data.forEach(p -> masterData.add(p));
|
|
||||||
pagination.setVisible(true);
|
pagination.setVisible(true);
|
||||||
pagination.setPageCount(masterData.size() / PAGE_ITEMS_COUNT);
|
pagination.setPageCount(masterData.size() / PAGE_ITEMS_COUNT);
|
||||||
});
|
});
|
||||||
|
|
256
pom.xml
256
pom.xml
|
@ -27,264 +27,8 @@
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-5</module>
|
|
||||||
<module>asm</module>
|
|
||||||
<module>atomix</module>
|
|
||||||
<module>apache-cayenne</module>
|
|
||||||
<module>aws</module>
|
|
||||||
<module>akka-streams</module>
|
|
||||||
<module>algorithms</module>
|
|
||||||
<module>annotations</module>
|
|
||||||
<module>apache-cxf</module>
|
|
||||||
<module>apache-fop</module>
|
|
||||||
<module>apache-poi</module>
|
|
||||||
<module>apache-tika</module>
|
|
||||||
<module>apache-thrift</module>
|
|
||||||
<module>apache-curator</module>
|
|
||||||
<module>apache-zookeeper</module>
|
|
||||||
<module>autovalue</module>
|
|
||||||
<module>axon</module>
|
|
||||||
<module>bootique</module>
|
|
||||||
|
|
||||||
<module>cdi</module>
|
|
||||||
<!-- <module>core-java-9</module> -->
|
|
||||||
<module>core-java</module>
|
<module>core-java</module>
|
||||||
<module>core-java-io</module>
|
|
||||||
<module>core-java-8</module>
|
|
||||||
<module>core-groovy</module>
|
|
||||||
<module>core-java-concurrency</module>
|
|
||||||
|
|
||||||
<module>couchbase</module>
|
|
||||||
|
|
||||||
<module>deltaspike</module>
|
|
||||||
<module>dozer</module>
|
|
||||||
|
|
||||||
<module>ethereumj</module>
|
|
||||||
|
|
||||||
<!--<module>ejb</module> -->
|
|
||||||
|
|
||||||
<module>feign</module>
|
|
||||||
|
|
||||||
<!-- <module>testing-modules/gatling</module> --> <!-- not meant to run as part of the standard build -->
|
|
||||||
|
|
||||||
<module>geotools</module>
|
|
||||||
<module>testing-modules/groovy-spock</module>
|
|
||||||
<module>google-cloud</module>
|
|
||||||
<module>gson</module>
|
|
||||||
<module>guava</module>
|
|
||||||
<module>guava-modules/guava-18</module>
|
|
||||||
<module>guava-modules/guava-19</module>
|
|
||||||
<module>guava-modules/guava-21</module>
|
|
||||||
<module>guice</module>
|
|
||||||
<module>disruptor</module>
|
|
||||||
|
|
||||||
<module>handling-spring-static-resources</module>
|
|
||||||
<module>hazelcast</module>
|
|
||||||
<module>hbase</module>
|
|
||||||
<!--<module>hibernate5</module> -->
|
|
||||||
<module>httpclient</module>
|
|
||||||
<module>hystrix</module>
|
|
||||||
|
|
||||||
<!-- <module>image-processing</module> --> <!-- TODO: to add back -->
|
|
||||||
<module>immutables</module>
|
|
||||||
<module>influxdb</module>
|
|
||||||
|
|
||||||
<module>jackson</module>
|
|
||||||
<!-- <module>persistence-modules/java-cassandra</module> -->
|
|
||||||
<module>vavr</module>
|
|
||||||
<module>java-lite</module>
|
|
||||||
<module>java-rmi</module>
|
|
||||||
<module>java-vavr-stream</module>
|
|
||||||
<module>javax-servlets</module>
|
|
||||||
<module>javaxval</module>
|
|
||||||
<module>jaxb</module>
|
|
||||||
<module>jgroups</module>
|
|
||||||
<module>jee-7</module>
|
|
||||||
<!-- <module>jhipster/jhipster-monolithic</module> -->
|
|
||||||
<module>jjwt</module>
|
|
||||||
<module>jpa-storedprocedure</module>
|
|
||||||
<module>jsf</module>
|
|
||||||
<module>json-path</module>
|
|
||||||
<module>json</module>
|
|
||||||
<module>jsoup</module>
|
|
||||||
<module>testing-modules/junit-5</module>
|
|
||||||
<module>jws</module>
|
|
||||||
|
|
||||||
<module>libraries</module>
|
|
||||||
<module>libraries-data</module>
|
|
||||||
<module>linkrest</module>
|
|
||||||
<module>logging-modules/log-mdc</module>
|
|
||||||
<module>logging-modules/log4j</module>
|
|
||||||
<module>logging-modules/log4j2</module>
|
|
||||||
<module>logging-modules/logback</module>
|
|
||||||
<module>lombok</module>
|
|
||||||
<!-- <module>kotlin</module> -->
|
|
||||||
<module>mapstruct</module>
|
|
||||||
<!-- <module>metrics</module> -->
|
|
||||||
<module>mesos-marathon</module>
|
|
||||||
<module>testing-modules/mockito</module>
|
|
||||||
<module>testing-modules/mockito-2</module>
|
|
||||||
<module>testing-modules/mocks</module>
|
|
||||||
<module>mustache</module>
|
|
||||||
<module>mvn-wrapper</module>
|
|
||||||
<module>noexception</module>
|
|
||||||
<module>orientdb</module>
|
|
||||||
<module>osgi</module>
|
|
||||||
<module>orika</module>
|
|
||||||
|
|
||||||
<module>patterns</module>
|
|
||||||
<module>pdf</module>
|
|
||||||
<module>protobuffer</module>
|
|
||||||
|
|
||||||
<module>persistence-modules/querydsl</module>
|
|
||||||
|
|
||||||
<!-- <module>raml</module> -->
|
|
||||||
<module>reactor-core</module>
|
|
||||||
<module>persistence-modules/redis</module>
|
|
||||||
<module>testing-modules/rest-assured</module>
|
|
||||||
<module>testing-modules/rest-testing</module>
|
|
||||||
<module>resteasy</module>
|
|
||||||
<module>rxjava</module>
|
|
||||||
<module>spring-swagger-codegen</module>
|
|
||||||
<module>testing-modules/selenium-junit-testng</module>
|
|
||||||
<module>persistence-modules/solr</module>
|
|
||||||
<module>spark-java</module>
|
|
||||||
<module>spring-5</module>
|
|
||||||
<module>spring-5-reactive</module>
|
|
||||||
<module>spring-5-mvc</module>
|
|
||||||
<!-- <module>spring-5-security</module> --> <!-- TODO: uncomment -->
|
|
||||||
<module>spring-activiti</module>
|
|
||||||
<module>spring-akka</module>
|
|
||||||
<module>spring-amqp</module>
|
|
||||||
<module>spring-all</module>
|
|
||||||
<module>spring-amqp-simple</module>
|
|
||||||
<module>spring-apache-camel</module>
|
|
||||||
<module>spring-batch</module>
|
|
||||||
<module>spring-bom</module>
|
|
||||||
<module>spring-boot</module>
|
|
||||||
<module>spring-boot-keycloak</module>
|
|
||||||
<module>spring-boot-bootstrap</module>
|
|
||||||
<module>spring-boot-admin</module>
|
|
||||||
<module>spring-boot-security</module>
|
|
||||||
<module>spring-cloud-data-flow</module>
|
|
||||||
<module>spring-cloud</module>
|
|
||||||
<module>spring-core</module>
|
|
||||||
<module>spring-cucumber</module>
|
|
||||||
<module>spring-ejb</module>
|
|
||||||
<module>spring-aop</module>
|
|
||||||
<module>persistence-modules/spring-data-cassandra</module>
|
|
||||||
<module>spring-data-couchbase-2</module>
|
|
||||||
<module>persistence-modules/spring-data-dynamodb</module>
|
|
||||||
<module>spring-data-elasticsearch</module>
|
|
||||||
<module>spring-data-mongodb</module>
|
|
||||||
<module>persistence-modules/spring-data-neo4j</module>
|
|
||||||
<module>persistence-modules/spring-data-redis</module>
|
|
||||||
<module>spring-data-rest</module>
|
|
||||||
<module>persistence-modules/spring-data-solr</module>
|
|
||||||
<module>spring-dispatcher-servlet</module>
|
|
||||||
<module>spring-exceptions</module>
|
|
||||||
<module>spring-freemarker</module>
|
|
||||||
<module>persistence-modules/spring-hibernate-3</module>
|
|
||||||
<module>spring-hibernate4</module>
|
|
||||||
<module>persistence-modules/spring-hibernate-5</module>
|
|
||||||
<module>persistence-modules/spring-data-eclipselink</module>
|
|
||||||
<module>spring-integration</module>
|
|
||||||
<module>spring-jenkins-pipeline</module>
|
|
||||||
<module>spring-jersey</module>
|
|
||||||
<!-- <module>jmeter</module> --> <!-- TODO: uncomment -->
|
|
||||||
<module>spring-jms</module>
|
|
||||||
<module>spring-jooq</module>
|
|
||||||
<module>persistence-modules/spring-jpa</module>
|
|
||||||
<module>spring-kafka</module>
|
|
||||||
<module>spring-katharsis</module>
|
|
||||||
<module>spring-ldap</module>
|
|
||||||
<module>spring-mockito</module>
|
|
||||||
<module>spring-mvc-email</module>
|
|
||||||
<module>spring-mvc-forms-jsp</module>
|
|
||||||
<module>spring-mvc-forms-thymeleaf</module>
|
|
||||||
<module>spring-mvc-java</module>
|
|
||||||
<module>spring-mvc-tiles</module>
|
|
||||||
<module>spring-mvc-velocity</module>
|
|
||||||
<module>spring-mvc-webflow</module>
|
|
||||||
<module>spring-mvc-xml</module>
|
|
||||||
<module>spring-mvc-simple</module>
|
|
||||||
<module>spring-mvc-kotlin</module>
|
|
||||||
<module>spring-security-openid</module>
|
|
||||||
<module>spring-protobuf</module>
|
|
||||||
<module>spring-quartz</module>
|
|
||||||
<module>spring-rest-angular</module>
|
|
||||||
<module>spring-rest-full</module>
|
|
||||||
<module>spring-rest-query-language</module>
|
|
||||||
<module>spring-rest</module>
|
|
||||||
<module>spring-rest-simple</module>
|
|
||||||
<module>spring-security-acl</module>
|
|
||||||
<module>spring-security-cache-control</module>
|
|
||||||
<module>spring-security-client/spring-security-jsp-authentication</module>
|
|
||||||
<module>spring-security-client/spring-security-jsp-authorize</module>
|
|
||||||
<module>spring-security-client/spring-security-jsp-config</module>
|
|
||||||
<module>spring-security-client/spring-security-mvc</module>
|
|
||||||
<module>spring-security-client/spring-security-thymeleaf-authentication</module>
|
|
||||||
<module>spring-security-client/spring-security-thymeleaf-authorize</module>
|
|
||||||
<module>spring-security-client/spring-security-thymeleaf-config</module>
|
|
||||||
<module>spring-security-core</module>
|
|
||||||
<module>spring-security-mvc-boot</module>
|
|
||||||
<module>spring-security-mvc-custom</module>
|
|
||||||
<module>spring-security-mvc-digest-auth</module>
|
|
||||||
<module>spring-security-mvc-ldap</module>
|
|
||||||
<module>spring-security-mvc-login</module>
|
|
||||||
<module>spring-security-mvc-persisted-remember-me</module>
|
|
||||||
<module>spring-security-mvc-session</module>
|
|
||||||
<module>spring-security-mvc-socket</module>
|
|
||||||
<module>spring-security-rest-basic-auth</module>
|
|
||||||
<module>spring-security-rest-custom</module>
|
|
||||||
<module>spring-security-rest</module>
|
|
||||||
<module>spring-security-sso</module>
|
|
||||||
<module>spring-security-x509</module>
|
|
||||||
<module>spring-session</module>
|
|
||||||
<module>spring-sleuth</module>
|
|
||||||
<module>spring-social-login</module>
|
|
||||||
<module>spring-spel</module>
|
|
||||||
<module>spring-state-machine</module>
|
|
||||||
<module>spring-thymeleaf</module>
|
|
||||||
<module>spring-userservice</module>
|
|
||||||
<module>spring-zuul</module>
|
|
||||||
<module>spring-reactor</module>
|
|
||||||
<module>spring-vertx</module>
|
|
||||||
<module>spring-jinq</module>
|
|
||||||
|
|
||||||
<module>spring-rest-embedded-tomcat</module>
|
|
||||||
|
|
||||||
|
|
||||||
<module>testing-modules/testing</module>
|
|
||||||
<module>testing-modules/testng</module>
|
|
||||||
|
|
||||||
<module>video-tutorials</module>
|
|
||||||
|
|
||||||
<module>xml</module>
|
|
||||||
<module>xmlunit-2</module>
|
|
||||||
<module>struts-2</module>
|
|
||||||
<module>apache-velocity</module>
|
|
||||||
<module>apache-solrj</module>
|
|
||||||
|
|
||||||
<module>rabbitmq</module>
|
|
||||||
<module>vertx</module>
|
|
||||||
<module>persistence-modules/spring-data-gemfire</module>
|
|
||||||
<module>mybatis</module>
|
|
||||||
<module>spring-drools</module>
|
|
||||||
<module>drools</module>
|
|
||||||
<module>persistence-modules/liquibase</module>
|
|
||||||
<module>spring-boot-property-exp</module>
|
|
||||||
<module>testing-modules/mockserver</module>
|
|
||||||
<module>undertow</module>
|
|
||||||
<module>vertx-and-rxjava</module>
|
|
||||||
<module>saas</module>
|
|
||||||
<module>deeplearning4j</module>
|
|
||||||
<module>lucene</module>
|
|
||||||
<module>vraptor</module>
|
|
||||||
<module>persistence-modules/java-cockroachdb</module>
|
|
||||||
<module>persistence-modules/java-jdbi</module>
|
|
||||||
<module>jersey</module>
|
|
||||||
<module>java-spi</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
Loading…
Reference in New Issue