public class NotebookController
extends java.lang.Object
Constructor and Description |
---|
NotebookController(NotebookModel model,
NotebookConfiguration config)
The constructor which sets the model.
|
Modifier and Type | Method and Description |
---|---|
void |
addComputationCell(int index)
Creates a new ComputationCell model and adds it to the observable list at
index.
|
void |
addTextCell(int index)
Creates a new TextCell model and adds it to the observable list.
|
void |
appendCellButtonHandler()
Handler for the add cell button.
|
void |
autoButtonHandler()
Handler for the auto button.
|
void |
cellListeners() |
void |
computeButtonHandler()
Handler for the compute button.
|
void |
export(NotebookConfiguration config)
Exports the notebook to the workspace.
|
javafx.scene.layout.VBox |
getCellsLayout() |
NotebookConfiguration |
getConfig() |
NotebookModel |
getModel()
Returns the model of the current notebook.
|
javafx.scene.layout.VBox |
getNotebookLayout() |
javafx.scene.Scene |
getScene()
Returns the scene of the notebook visualizer.
|
javafx.scene.layout.HBox |
getToolbarLayout() |
void |
hideAddCellModal()
Make the add cell modal disappear.
|
void |
initialize()
Gets executed after the constructor.
|
void |
loadCells(java.util.List<CellModel> cells)
Loads a list of cells into the notebook.
|
void |
manualButtonHandler()
Handler for the manual button.
|
void |
printXML()
Prints an XML of the notebook generated by JAXB
|
void |
removeCell(CellModel cell)
Removes the input
cell from the notebook model. |
void |
setComputationMode(ComputationMode mode)
Sets the computation mode of the notebook to
mode . |
void |
toggleAddCellModal(int index)
Toggle the visibility of the add cell modal
|
public NotebookController(NotebookModel model, NotebookConfiguration config)
model
- the model that is to be paired with this controllerpublic NotebookConfiguration getConfig()
public javafx.scene.layout.VBox getNotebookLayout()
public javafx.scene.layout.VBox getCellsLayout()
public javafx.scene.layout.HBox getToolbarLayout()
public void initialize()
public void cellListeners()
public void autoButtonHandler()
public void manualButtonHandler()
public void computeButtonHandler()
public void appendCellButtonHandler()
public void setComputationMode(ComputationMode mode)
mode
.ComputationMode
- mode the computation mode to set the notebook to.public void export(NotebookConfiguration config)
public void addComputationCell(int index)
public void addTextCell(int index)
public void loadCells(java.util.List<CellModel> cells)
cells
- The list of cells to load into the notebook.public void removeCell(CellModel cell)
cell
from the notebook model. Removal from the
UI should happen through an actionListener.cell
- the cell to remove from the notebook.public NotebookModel getModel()
NotebookModel
for the current notebook.public javafx.scene.Scene getScene()
public void hideAddCellModal()
public void toggleAddCellModal(int index)
public void printXML()