Skip to content

Instantly share code, notes, and snippets.

View miho's full-sized avatar

Michael Hoffer miho

View GitHub Profile
@miho
miho / Main.java
Created March 3, 2014 10:45
CodeArea Test (related to Issue 15)
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package eu.mihosoft.issues;
import codearea.control.CodeArea;
import javafx.application.Application;
import static javafx.application.Application.launch;
@miho
miho / Main.java
Created March 23, 2014 17:00
Stream DSL like API
package eu.mihosoft.tutorials.streams;
import java.util.Arrays;
import java.util.List;
import static eu.mihosoft.tutorials.streams.Item.*;
import java.util.Objects;
import java.util.function.Predicate;
public class Main {
@miho
miho / Main.java
Created July 2, 2014 09:12
VWorkflows MouseEvent Sample
package eu.mihosoft.vworkflows.mousevents;
import eu.mihosoft.vrl.workflow.FlowFactory;
import eu.mihosoft.vrl.workflow.VFlow;
import eu.mihosoft.vrl.workflow.VNode;
import eu.mihosoft.vrl.workflow.fx.FXFlowNodeSkin;
import eu.mihosoft.vrl.workflow.fx.FXSkinFactory;
import eu.mihosoft.vrl.workflow.fx.ScalableContentPane;
import javafx.application.Application;
import javafx.scene.Scene;
import eu.mihosoft.vrl.v3d.Cube as Cube
#print dyio
csg = Cube(20).toCSG()
print "Result = ",csg
@miho
miho / WebViewAndItsScrollBars.java
Created July 7, 2015 09:05
ScrollBar bug in JavaFX 8 WebView?
import java.util.Set;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollBar;
import javafx.scene.layout.VBox;
@miho
miho / gist:c53634279d6380e2b682
Last active September 7, 2015 14:34 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

// SKETCHES, DON'T USE THIS CODE!
package eu.mihosoft.tutorial.sketches;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
@miho
miho / build.gradle
Last active September 16, 2015 13:07
Run-Task
task(run, dependsOn: 'classes', type: JavaExec) {
main = mainClass
classpath = sourceSets.main.runtimeClasspath
args = ['3']
}
@miho
miho / CodeEditor.java
Created July 21, 2012 13:19 — forked from jewelsea/CodeEditor.java
CodeMirror based code editor for JavaFX
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebView;
/**
* A syntax highlighting code editor for JavaFX created by wrapping a
* CodeMirror code editor in a WebView.
*
* See http://codemirror.net for more information on using the codemirror editor.
*/
public class CodeEditor extends StackPane {
@miho
miho / CenteredNodeInScrollPaneExample.java
Created July 21, 2012 13:40 — forked from jewelsea/CenteredNodeInScrollPaneExample.java
Example of scrollpane viewports, transforms and layout bounds in JavaFX
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Bounds;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;