List of usage examples for java.util.function IntFunction IntFunction
IntFunction
From source file:org.mskcc.shenkers.control.alignment.VerticalOverlayNGTest.java
@Override public void start(Stage stage) throws Exception { Pane r1 = new Pane(); Text lbl = new Text("H"); List<Node> collect = "ABcDEFGHIJKL".chars().mapToObj(new IntFunction<StretchStringPane>() { @Override// w w w . j a va 2 s .co m public StretchStringPane apply(int value) { return new StretchStringPane("" + ((char) value)); } }).collect(Collectors.toList()); VerticalOverlay ao = new VerticalOverlay(); ao.setChildren(collect); ao.flip(); Scene scene = new Scene(ao.getContent(), 300, 300, Color.GRAY); stage.setTitle("JavaFX Scene Graph Demo"); stage.setScene(scene); stage.show(); }