Skip to content

Instantly share code, notes, and snippets.

@ricemery
ricemery / AkkaEventBusExample.java
Created November 29, 2012 18:00
Java example on using Akka EventBus
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import akka.event.japi.LookupEventBus;
/**
* Java example showing the usage of a Akka {@link akka.event.japi.LookupEventBus}.
* The case below shows publishing events to two different "channels". A channel is just
* a string value carried along with the Event.
@jewelsea
jewelsea / ImageScaler.java
Created April 18, 2013 20:17
Demonstrates different methods of scaling images in JavaFX and the effects of scaling with each.
import javafx.application.*;
import javafx.geometry.HPos;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.image.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class ImageScaler extends Application {
@james-d
james-d / PlutoExplorer.java
Last active May 2, 2024 16:33
Zoomable and Pannable JavaFX ImageView Example
import javafx.application.Application;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.geometry.Insets;
import javafx.geometry.Point2D;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;