Revision 9:9bcc7fa43095

View differences:

src/main/java/cz/agents/alite/visualizer2d/demo/Demo.java
13 13
import javax.swing.*;
14 14
import javax.vecmath.Point2d;
15 15
import java.awt.*;
16
import java.util.Arrays;
16
import java.util.stream.Stream;
17 17

  
18 18
/**
19 19
 * @author Ondrej Hrstka (ondrej.hrstka at agents.fel.cvut.cz)
......
26 26

  
27 27
        GroupLayer<Point2d> layers = GroupLayer.create();
28 28
        layers.addLayer(ColorLayer.create(Color.BLACK));
29
        layers.addLayer(ElementsLayer.create(() -> Arrays.asList(
29
        layers.addLayer(ElementsLayer.create(() -> Stream.of(
30 30
                        PointElement.get(3, Color.RED, new Point2d(AngleProvider.TRANS_X, AngleProvider.TRANS_Y)),
31 31
                        PointElement.get(3, Color.WHITE, angleProvider.getPoint()),
32 32
                        PointElement.get(3, Color.GREEN, new Point2d(AngleProvider.TRANS_X + 25, AngleProvider.TRANS_Y)))

Also available in: Unified diff