Skip to content

Instantly share code, notes, and snippets.

@TheItachiUchiha
TheItachiUchiha / EditableTableViewWithTab
Created March 6, 2014 06:56
EditableTableView With Tab Functionality Only for same Row
import java.util.ArrayList;
import java.util.List;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@TheItachiUchiha
TheItachiUchiha / MouseDragRectangle
Last active August 29, 2015 13:57
MouseDragRectangle
import javafx.application.Application;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
@TheItachiUchiha
TheItachiUchiha / DateAxis.java
Created September 18, 2014 12:38
ToolTipOnLineChart
public final class DateAxis extends Axis<Date> {
/**
* These property are used for animation.
*/
private final LongProperty currentLowerBound = new SimpleLongProperty(this, "currentLowerBound");
private final LongProperty currentUpperBound = new SimpleLongProperty(this, "currentUpperBound");
private final ObjectProperty<StringConverter<Date>> tickLabelFormatter = new ObjectPropertyBase<StringConverter<Date>>() {
@TheItachiUchiha
TheItachiUchiha / HexTime
Last active August 29, 2015 14:06
A Simple window in JavaFX which colors itself using the HexTime generated from current time
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
@TheItachiUchiha
TheItachiUchiha / ActionKame
Created November 21, 2014 12:53
A TimeLine showing ActionKame
package animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Rectangle2D;
@TheItachiUchiha
TheItachiUchiha / CustomHBar
Last active August 29, 2015 14:14
CustomHBar
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.scene.control.Label;
import javafx.scene.effect.DropShadow;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
@TheItachiUchiha
TheItachiUchiha / ToggleSwitch
Last active March 31, 2023 07:15
A simple Toggle Switch using JavaFX
import javafx.beans.property.SimpleBooleanProperty;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
public class ToggleSwitch extends HBox {
private final Label label = new Label();
@TheItachiUchiha
TheItachiUchiha / ThumbnailGenerator
Created February 5, 2015 04:40
Generates Thumbnails
package com.ita.aop.util;
import java.awt.color.CMMException;
import java.awt.image.BufferedImage;
import java.awt.image.renderable.ParameterBlock;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;
@TheItachiUchiha
TheItachiUchiha / KeyStroke
Created February 18, 2015 12:37
KeyStroke
package delete;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
public class KeyStroke extends Application {
@TheItachiUchiha
TheItachiUchiha / Main.java
Created February 21, 2015 05:09
ListView Focus
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class Main extends Application {