working on Java-Implementation

This commit is contained in:
Stephan Richter
2020-09-07 00:28:04 +02:00
parent a9e0f2b3a7
commit 3583a62667
26 changed files with 72417 additions and 147 deletions

View File

@@ -1,16 +1,20 @@
package de.srsoftware.web4rail.tiles;
import de.srsoftware.tools.Tag;
public class DiagNE extends Tile{
public String html() {
Tag svg = new Tag("svg")
.id("tile-"+x+"-"+y)
.clazz(classes)
.size(100,100)
.attr("viewbox", "0 0 100 100")
.style("left: "+(30*x)+"px; top: "+(30*y)+"px");
@Override
public boolean hasConnector(Direction direction) {
switch (direction) {
case NORTH:
case EAST:
return true;
default:
return false;
}
}
new Tag("polygon")
.attr("points","35,0 65,0 100,35 100,65")
.addTo(svg);
return svg.toString();
}
}