@Override
	public void apply(@Nonnull LineContainer container, int paragraph) {
		// To keep the ordering of the line graphic factory priority we need to add the stack pane now
		// since the rest of the work is done async below. We want this to have zero width so that it doesn't
		// shit the editor around when the content becomes active/inactive.
		StackPane stack = new StackPane();
		stack.setManaged(false);
		stack.setPrefWidth(0);
		stack.setMouseTransparent(true);
		container.addHorizontal(stack);

		// This delayed execution looks stupid because it is, however it is necessary.
		//
		// Any operation that requires knowledge of positioning and sizing cannot be
		// done on the same frame as the creation of the cell. Thus, we'll delay it by
		// one frame.
		FxThreadUtil.delayedRun(0, () -> {
			stack.setPrefSize(containerWidth, containerHeight);
			stack.setAlignment(Pos.CENTER_LEFT);
			SceneUtils.getParentOfTypeLater(container, VirtualizedScrollPaneWrapper.class).whenComplete((parentScroll, error) -> {
				ObservableValue<? extends Number> translateX;
				if (parentScroll != null) {
					translateX = Bindings.add(container.widthProperty().subtract(containerHeight), parentScroll.horizontalScrollProperty().negate());
				} else {
					// Should never happen since the 'VirtualizedScrollPaneWrapper' is mandated internally by 'Editor'.
					translateX = container.widthProperty().subtract(containerHeight);
				}
				stack.translateXProperty().bind(translateX);
			});

			apply(stack, paragraph);
		});
	}
@param priority
		Priority dictating the order of graphics displayed in {@link RootLineGraphicFactory}.
		See {@link LineGraphicFactory} for constants.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/linegraphics/AbstractTextBoundLineGraphicFactory.java