Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Gudehus hastebrot

  • Freiheit.com
  • Hannover, Germany
  • 13:28 (UTC +01:00)
View GitHub Profile
View Sample_01_CustomAppTest.java
package org.loadui.testfx.framework.junit;
import java.util.concurrent.TimeUnit;
import javafx.application.Application;
import javafx.stage.Stage;
import org.loadui.testfx.framework.app.impl.AppSetupImpl;
import org.loadui.testfx.framework.app.impl.DefaultAppLauncher;
import org.loadui.testfx.framework.robot.FxRobot;
import org.loadui.testfx.utils.StageFuture;
View Main.java
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import java.io.IOException;
/**
* Main application class.
View InternalWindow.groovy
import javafx.beans.property.ObjectProperty
import javafx.beans.property.SimpleObjectProperty
import javafx.beans.value.ChangeListener
import javafx.scene.Node
import javafx.scene.control.Control
import javafx.scene.control.Skin
import javafx.scene.layout.StackPane
import com.sun.javafx.scene.control.behavior.BehaviorBase
import com.sun.javafx.scene.control.behavior.KeyBinding
View grid-key-value-layout.fxml.xml
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<StackPane alignment="TOP_LEFT" xmlns="http://javafx.com/javafx/8"
xmlns:fx="http://javafx.com/fxml/1">
<children>
View eager.py
from pyparsing import *
def match(text, matcher):
result = matcher.parseString(text)
return result
if __name__ == "__main__":
element = Word(alphas)
View RenderPerformanceApp.java
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javafx.application.Application;
import javafx.geometry.Point2D;
import javafx.geometry.Pos;
import javafx.scene.CacheHint;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.layout.StackPane;
View AbsolutePosition.js
$(function() {
var atPosition = function($element, position) {
var top = $element[0] == window ? 0 : $element.position().top;
var height = $element.height();
if (position == "top") { return top; }
if (position == "bottom") { return top + height; }
throw "unknown position";
};
var alignAbsolutePosition = function($element, top, height) {
@hastebrot
hastebrot / jfxlab-testfx.json
Created Aug 21, 2014
TestFX (in "JavaFX Ecosystem and Community")
View jfxlab-testfx.json
{
"Name": "TestFX",
"Description": "Simple and Clean Testing for JavaFX",
"URL": "https://www.testfx.org/",
"License": "European Union Public Licence (EUPL v.1.1)",
"Logo": "TODO",
"Type": "Test Framework",
"Tags": "",
"VCS": "",
"Issue Tracker": "",
View boxModel.js
var $element = $("<div>");
var widthOfElement = $element.width();
var widthWithPadding = $element.innerWidth();
var widthWithBorder = $element.outerWidth();
var widthWithMargin = $element.outerWidth(true);
var widthOfPadding = widthWithPadding - widthOfElement;
var widthOfBorder = widthWithBorder - widthWithPadding;
var widthOfMargin = widthWithMargin - widthWithBorder;
@hastebrot
hastebrot / README.md
Last active Aug 29, 2015
testfx-demo-project
View README.md
  • Maven: ~/.m2/repository
  • Gradle: ~/.gradle/caches/modules-2/files-2.1