package app.controllers; import java.net.URL; import java.util.ResourceBundle; import org.fxmisc.richtext.CodeArea; import org.fxmisc.richtext.LineNumberFactory; import app.model.Model; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; public class EditorController implements Initializable { @FXML private CodeArea editor; private Model model; /** * Links the controller to the global model * @param model The model to be linked */ public void setModel(Model model) { this.model = model; } /** * Initializes and customizes the properties of the javafx objects. */ @Override public void initialize(URL url, ResourceBundle resourceBundle) { editor.setParagraphGraphicFactory(LineNumberFactory.get(editor)); } /** * Handles events from the editor, and reflects them in the model * @param event The object containing metadata of the event */ @FXML public void editorChanged(ActionEvent event) { // } }