Skip to content

Instantly share code, notes, and snippets.

View jeffreyguenther's full-sized avatar

Jeffrey Guenther jeffreyguenther

View GitHub Profile
@jeffreyguenther
jeffreyguenther / DragContext
Created September 23, 2013 17:22
Draggable Issue
package javafxtest;
/**
* Info needed to properly drag a node
* A copy of http://docs.oracle.com/javafx/2/events/DraggablePanelsExample.java.htm
* @author jeffreyguenther
*/
public class DragContext {
private double mouseAnchorX;
@jeffreyguenther
jeffreyguenther / DragTest.java
Last active December 27, 2015 10:09
Example of a problem with nesting objects in a groups and using bindings.
package javafxapplication1;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import edu.uci.ics.jung.algorithms.layout.CircleLayout;
import edu.uci.ics.jung.algorithms.layout.Layout;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.util.TestGraphs;
import java.awt.Dimension;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;
@jeffreyguenther
jeffreyguenther / Sales.coffee
Last active August 29, 2015 14:04
Class and Instance Methods and Variables example
class @Sales # attach the class to the global namespace so it can be accessed.
price: 5
@units: 100
@greatjob: (name) ->
"Great job #{name}. You sold #{@units} for #{Tester::price}"
###
@greatjob is a class method. This means it is only accessible as in
Tester.greatjob("Jeff") or `instance`.constructor.greatjob("jeff")

Keybase proof

I hereby claim:

  • I am jeffreyguenther on github.
  • I am jeffreyguenther (https://keybase.io/jeffreyguenther) on keybase.
  • I have a public key ASCtU8DC231DjB-g4ZzL4Gv-4YGlkv3TSI1Wby7APekO4Ao

To claim this, I am signing this object: