Skip to content

Instantly share code, notes, and snippets.

View AndresFRodriguezR's full-sized avatar

Andrés F. Rodríguez R. AndresFRodriguezR

  • Perú
View GitHub Profile
@AndresFRodriguezR
AndresFRodriguezR / JavaFXUtils
Created August 24, 2016 16:38 — forked from 837/JavaFXUtils
JavaFXUtil Class, stuff you might need in a JavaFX8 GUI
package javaFxUtils;
import java.io.PrintWriter;
import java.io.StringWriter;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
@AndresFRodriguezR
AndresFRodriguezR / TickTock.java
Created September 16, 2016 09:27 — forked from jewelsea/TickTock.java
JavaFX metronome with start/stop and tempo controls.
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ChangeListener;
@AndresFRodriguezR
AndresFRodriguezR / ClippedShadow.java
Created October 8, 2016 21:50 — forked from jewelsea/ClippedShadow.java
Demonstrates adding a halo effect (a drop shadow) around a translucent window.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.*;
import javafx.stage.*;
import org.scenicview.ScenicView;
// Java 8 code
public class ClippedShadow extends Application {
@AndresFRodriguezR
AndresFRodriguezR / JavaFXTrayIconSample.java
Created October 8, 2016 21:53 — forked from jewelsea/JavaFXTrayIconSample.java
Demonstrate using the System Tray (AWT) to control a JavaFX application.
import javafx.application.*;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.stage.*;
import javax.imageio.ImageIO;
import java.io.IOException;
@AndresFRodriguezR
AndresFRodriguezR / SimpleDocking.java
Created October 8, 2016 22:01 — forked from jewelsea/SimpleDocking.java
Simplistic docking setup for JavaFX
import javafx.application.Application;
import javafx.geometry.Orientation;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.*;
public class SimpleDocking extends Application {
public void start(final Stage stage) throws Exception {
final SplitPane rootPane = new SplitPane();
@AndresFRodriguezR
AndresFRodriguezR / Frosty.java
Created October 8, 2016 22:02 — forked from jewelsea/Frosty.java
iOS 7 style sliding glass pane prototype for JavaFX
import javafx.animation.*;
import javafx.application.Application;
import javafx.beans.property.*;
import javafx.geometry.Rectangle2D;
import javafx.scene.*;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.effect.*;
import javafx.scene.image.*;
import javafx.scene.input.ScrollEvent;
@AndresFRodriguezR
AndresFRodriguezR / DoughnutChart.java
Created October 8, 2016 22:03 — forked from jewelsea/DoughnutChart.java
Creating a Doughnut chart in JavaFX
import javafx.collections.ObservableList;
import javafx.geometry.Bounds;
import javafx.scene.Node;
import javafx.scene.chart.PieChart;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
public class DoughnutChart extends PieChart {
private final Circle innerCircle;
@AndresFRodriguezR
AndresFRodriguezR / PepsiChallenge.java
Created October 8, 2016 22:03 — forked from jewelsea/PepsiChallenge.java
JavaFX BlendMode.DIFFERENCE sample.
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.effect.BlendMode;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
@AndresFRodriguezR
AndresFRodriguezR / CharacterMovement.java
Created October 8, 2016 22:04 — forked from jewelsea/CharacterMovement.java
JavaFX sample to move a character around a field based on key controls.
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.*;
import javafx.scene.image.*;
import javafx.scene.input.KeyEvent;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
/**
@AndresFRodriguezR
AndresFRodriguezR / ShadowedRoundedImage.java
Created October 8, 2016 22:11 — forked from jewelsea/ShadowedRoundedImage.java
Creates a JavaFX ImageView which contains an image displayed in as a rounded rectangle with a drop shadow effect.
import javafx.application.Application;
import javafx.fxml.*;
import javafx.scene.*;
import javafx.scene.effect.DropShadow;
import javafx.scene.image.*;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;