use of javafx.event.ActionEvent in project bitsquare by bitsquare.
the class VolumeChart method seriesRemoved.
@Override
protected void seriesRemoved(XYChart.Series<Number, Number> series) {
for (XYChart.Data<Number, Number> d : series.getData()) {
final Node volumeBar = d.getNode();
if (shouldAnimate()) {
FadeTransition ft = new FadeTransition(Duration.millis(500), volumeBar);
ft.setToValue(0);
ft.setOnFinished((ActionEvent actionEvent) -> getPlotChildren().remove(volumeBar));
ft.play();
} else {
getPlotChildren().remove(volumeBar);
}
}
}
use of javafx.event.ActionEvent in project bitsquare by bitsquare.
the class CandleStickChart method seriesRemoved.
@Override
protected void seriesRemoved(XYChart.Series<Number, Number> series) {
// remove all candle nodes
for (XYChart.Data<Number, Number> d : series.getData()) {
final Node candle = d.getNode();
if (shouldAnimate()) {
FadeTransition ft = new FadeTransition(Duration.millis(500), candle);
ft.setToValue(0);
ft.setOnFinished((ActionEvent actionEvent) -> {
getPlotChildren().remove(candle);
});
ft.play();
} else {
getPlotChildren().remove(candle);
}
}
if (series.getNode() instanceof Path) {
Path seriesPath = (Path) series.getNode();
if (shouldAnimate()) {
FadeTransition ft = new FadeTransition(Duration.millis(500), seriesPath);
ft.setToValue(0);
ft.setOnFinished((ActionEvent actionEvent) -> {
getPlotChildren().remove(seriesPath);
seriesPath.getElements().clear();
});
ft.play();
} else {
getPlotChildren().remove(seriesPath);
seriesPath.getElements().clear();
}
}
}
use of javafx.event.ActionEvent in project Gargoyle by callakrsos.
the class LettersPane method createRandomTimeLine.
private Timeline createRandomTimeLine(Node node) {
// over 3 seconds move letter to random position and fade it out
final Timeline timeline = new Timeline();
timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
// we are done remove us from scene
getChildren().remove(node);
}
}, new KeyValue(node.translateXProperty(), getRandom(0.0f, getWidth() - node.getBoundsInLocal().getWidth()), INTERPOLATOR), new KeyValue(node.translateYProperty(), getRandom(0.0f, getHeight() - node.getBoundsInLocal().getHeight()), INTERPOLATOR), new KeyValue(node.opacityProperty(), 0f)));
return timeline;
}
use of javafx.event.ActionEvent in project Gargoyle by callakrsos.
the class LettersPane method createUpperTimeLine.
// private Timeline createCurveTimeLine(Node node) {
// // over 3 seconds move letter to random position and fade it out
// final Timeline timeline = new Timeline();
// timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
// @Override
// public void handle(ActionEvent event) {
// // we are done remove us from scene
// getChildren().remove(node);
// }
// }, new KeyValue(node.translateXProperty(), node.translateXProperty().get(), INTERPOLATOR),
// new KeyValue(node.translateYProperty(), 100f, INTERPOLATOR), new KeyValue(node.opacityProperty(), 0f)));
//
// new KeyFrame(Duration.millis(0.5), new KeyFrame(time, values))
//
//
//
// return timeline;
//
//
// }
private Timeline createUpperTimeLine(Node node) {
// over 3 seconds move letter to random position and fade it out
final Timeline timeline = new Timeline();
timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
// we are done remove us from scene
getChildren().remove(node);
}
}, new KeyValue(node.translateXProperty(), node.translateXProperty().get(), INTERPOLATOR), new KeyValue(node.translateYProperty(), 100f, INTERPOLATOR), new KeyValue(node.opacityProperty(), 0f)));
return timeline;
}
use of javafx.event.ActionEvent in project Gargoyle by callakrsos.
the class PagedCodeAreaHelper method codeAreaKeyClick.
/**
* 키클릭 이벤트 처리
*
* @작성자 : KYJ
* @작성일 : 2015. 12. 14.
* @param e
*/
public void codeAreaKeyClick(KeyEvent e) {
if (KeyCode.F == e.getCode() && e.isControlDown() && !e.isShiftDown() && !e.isAltDown()) {
if (!e.isConsumed()) {
findAndReplaceHelper.findReplaceEvent(new ActionEvent());
e.consume();
}
} else if (KeyCode.L == e.getCode() && e.isControlDown() && !e.isShiftDown() && !e.isAltDown()) {
if (!e.isConsumed()) {
moveToLineEvent(new ActionEvent());
e.consume();
}
} else if (KeyCode.U == e.getCode() && e.isControlDown() && e.isShiftDown() && !e.isAltDown()) {
if (!e.isConsumed()) {
toUppercaseEvent(new ActionEvent());
e.consume();
}
} else if (KeyCode.L == e.getCode() && e.isControlDown() && e.isShiftDown() && !e.isAltDown()) {
if (!e.isConsumed()) {
toLowercaseEvent(new ActionEvent());
e.consume();
}
} else {
codeArea.getUndoManager().mark();
}
}
Aggregations