public class StartWindow extends java.lang.Object implements IView, ILogObserver
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
json |
private LogKeeper |
logKeeper |
private javafx.scene.layout.BorderPane |
uiMain |
private PreferencesPopup |
uiPreferencesPopup |
private ISelectable |
uiSelectedNode |
private StartWindowContent |
uiStartWindowContent |
private StartWindowLog |
uiStartWindowLog |
private StartWindowTopBar |
uiStartWindowTopBar |
Constructor and Description |
---|
StartWindow()
Constructs the window.
|
Modifier and Type | Method and Description |
---|---|
private void |
bindActions()
Bind actions to UI-elements.
|
private void |
bindVisualEditActions(VisualEditFragment visualEditFragment)
Bind actions to VisualEditFragment item.
|
private void |
bindVisualEditItemActions(OperationFragment operationFragment)
Bind actions to OperationFragment view.
|
private java.lang.String |
compileToJson()
Compile to JSON-data.
|
private void |
createFolder()
Create application folder if not exists.
|
private void |
evaluateAction(SelectionActionType actionType)
Evaluate program action.
|
private void |
fillToolbox(java.lang.String path)
Fill toolbox with items from config directory.
|
private void |
fromJson(java.lang.String json)
Visualize program from JSON-data.
|
javafx.scene.Parent |
getView()
Get View.
|
private void |
initialize()
Initialize view.
|
private void |
openJson()
Open JSON-data.
|
private void |
removeVisualEditFragment(VisualEditFragment visualEditFragment)
Remove a Visual Edit Fragment
|
private void |
saveJson()
Save JSON-data.
|
void |
update()
Update log message.
|
private void |
updateSelectedNode(ISelectable node)
Set node to selected.
|
private void |
uploadJson()
Upload JSON code.
|
private java.lang.String json
private final LogKeeper logKeeper
private final javafx.scene.layout.BorderPane uiMain
private PreferencesPopup uiPreferencesPopup
private ISelectable uiSelectedNode
private final StartWindowContent uiStartWindowContent
private final StartWindowLog uiStartWindowLog
private final StartWindowTopBar uiStartWindowTopBar
private void bindActions()
private void bindVisualEditActions(VisualEditFragment visualEditFragment)
visualEditFragment
- VisualEditFragment instance to bind actions to.private void bindVisualEditItemActions(OperationFragment operationFragment)
operationFragment
- OperationFragment.private java.lang.String compileToJson()
private void createFolder()
private void evaluateAction(SelectionActionType actionType)
actionType
- SelectionActionType enum specifies source of notification.private void fillToolbox(java.lang.String path)
path
- Path to config.private void fromJson(java.lang.String json)
json
- JSON-data.public javafx.scene.Parent getView()
private void initialize()
private void openJson()
private void removeVisualEditFragment(VisualEditFragment visualEditFragment)
visualEditFragment
- VisualEditFragmentprivate void saveJson()
public void update()
update
in interface ILogObserver
private void updateSelectedNode(ISelectable node)
node
- ISelectable node.private void uploadJson() throws java.lang.Exception
java.lang.Exception
- If input is incorrect will throw exception.