Skip to content

Instantly share code, notes, and snippets.

View varren's full-sized avatar

Peter varren

  • Never had any, just for fun guy
  • Russia Saint-Petersburg
View GitHub Profile
/*
I dont really have this problem: here is results from your version
Start of drawLines(): 82086490370339
Done drawing thick lines!
Time taken (ns): 76994, Time taken(ms): 0
Done drawing vertical lines!
Time taken (ns): 54858, Time taken(ms): 0
Done drawing horizontal lines!
Time taken (ns): 57424, Time taken(ms): 0
package ru.varren;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Worker;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
private static void testMethods() {
// need to have 'org.reflections:reflections:0.9.10'
// can dowload from here gist.github.com/hepin1989/5026900
List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();
classLoadersList.add(ClasspathHelper.contextClassLoader());
classLoadersList.add(ClasspathHelper.staticClassLoader());
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())
.setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns="http://javafx.com/javafx/8.0.60-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.Main$ListItemController">
<children>
<Label text="This is ListItem.fxml from ListItemController"/>
<Label fx:id="lblName" text="Original Text from fxml"/>
</children>
package sample;
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.layout.*;
import javafx.scene.control.*;
import javafx.scene.Scene;