public PaginationV2Builder backButtonNode(Node backButtonNode) { if (backButtonNode instanceof Polygon && withPolygonShading) { ((Polygon)backButtonNode).setFill(Color.DARKGREEN); backButtonNode.setOpacity(0.5); } this.backButtonNode = new SimpleObjectProperty<>(this, "backButtonNode", backButtonNode); return this; }
public PaginationV2Builder nextButtonNode(Node nextButtonNode) { if (nextButtonNode instanceof Polygon && withPolygonShading) { ((Polygon)nextButtonNode).setFill(Color.DARKGREEN); nextButtonNode.setOpacity(0.5); } this.nextButtonNode = new SimpleObjectProperty<>(this, "nextButtonNode", nextButtonNode); return this; }
/** * Create the polygon using the polygon loader. * @param polygonName name of the polygon * @return Polygon definition */ private Polygon createPolygonShape(String polygonName) { List<Polygons.PolygonsForScene.Polygon> startupPolygons = polygonLoader.getPolygon("/polygonDefinition.xml", "startup"); Polygon untransformed = polygonLoader.toJavaFXPolygon(polygonLoader.find(startupPolygons, polygonName)); if (withPolygonShading) { untransformed.setFill(Color.DARKGREEN); untransformed.setOpacity(0.5); } else { untransformed.setFill(Color.TRANSPARENT); } return untransformed; }
/** * Create the polygon using the polygon loader. * @param polygonName name of the polygon * @return Polygon definition */ private Polygon createPolygonShape(String polygonName) { List<Polygons.PolygonsForScene.Polygon> startupPolygons = polygonLoader.getPolygon("/polygonDefinition.xml", "credits"); Polygon untransformed = polygonLoader.toJavaFXPolygon(polygonLoader.find(startupPolygons, polygonName)); if (withPolygonShading) { untransformed.setFill(Color.DARKGREEN); untransformed.setOpacity(0.5); } else { untransformed.setFill(Color.TRANSPARENT); } return untransformed; }
/** * Create the polygon using the polygon loader. * @param polygonName name of the polygon * @return Polygon definition */ private Polygon createPolygonShape(String polygonName) { List<Polygons.PolygonsForScene.Polygon> startupPolygons = polygonLoader.getPolygon("/polygonDefinition.xml", "history"); Polygon untransformed = polygonLoader.toJavaFXPolygon(polygonLoader.find(startupPolygons, polygonName)); untransformed.setFill(Color.TRANSPARENT); return untransformed; } /**
/** * Initialize the polygons * @param polygons List of polygons that are to be reset. */ public void resetPolygons(List<Polygon> polygons) { ImageView imageView = getImageView(); for (int i = 0; i < polygons.size(); i++) { Polygon polygon = polygons.get(i); if (imageView != null) { polygon.setLayoutX(imageView.getLayoutX()); polygon.setLayoutY(imageView.getLayoutY()); } if (withPolygonShading) { polygon.setFill(colors[i%colors.length]); polygon.setOpacity(0.5); } else { polygon.setFill(Color.TRANSPARENT); } getChildren().add(polygon); } }