Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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;