Class DefaultCodeEditorController
java.lang.Object
ch.autumo.ui.fx.controller.BaseController
ch.autumo.ui.fx.controller.DefaultInfoController
ch.autumo.ui.fx.controller.DefaultCodeEditorController
- All Implemented Interfaces:
Initializable
Default Code Editor Controller.
The pane chrome (header, body, footer) is defined by the FXML, exactly as for every other pane; this controller only embeds the code editor built by the view into the body and offers the setters for the additional footer buttons and the help/note text. Both are set before the stage is shown, never in a constructor.
- See Also:
-
Field Summary
Fields inherited from class BaseController
app, model, stage, view -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCodeEditorController(BaseApp app, Stage stage, DefaultPaneModel model, DefaultCodeEditorView view) Code editor controller. -
Method Summary
Modifier and TypeMethodDescriptionGet the help/note label of the footer, e.g.voidinit(URL location, ResourceBundle resources, double toolBarShift) Delegated initialization.voidsetButtons(List<Button> buttons) Set the additional footer buttons, e.g.voidsetHelpText(String helpText) Set the help/note text in the left footer slot (the same label the default info pane uses for its footer information).Methods inherited from class DefaultInfoController
close, customize, getBody, getFooter, getFooterButton, getFooterButtons, getFooterCenter, getFooterLabel, removeAllFooterButtonsMethods inherited from class BaseController
confirmDiscardChanges, disableMacOSMenuDetach, escKeyPressed, getApp, getMenuBar, getMenuItemClearAllRecent, getMenuLanguage, getMenuRecent, getModel, getStage, getToolBar, getView, icon, initialize, initializeLanguageMenu, initializeRecentMenu, innerOpen, isLanguageSelected, keyPressed, languageChanged, rebuildRecentList, selectLanguageItem, switchLanguage, toolButton, toolSeparatorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Initializable
initialize
-
Constructor Details
-
DefaultCodeEditorController
public DefaultCodeEditorController(BaseApp app, Stage stage, DefaultPaneModel model, DefaultCodeEditorView view) Code editor controller.- Parameters:
app- appstage- stagemodel- modelview- view
-
-
Method Details
-
init
Description copied from class:BaseControllerDelegated initialization. SeeInitializable.initialize(URL, ResourceBundle).- Overrides:
initin classDefaultInfoController- Parameters:
location- The location used to resolve relative paths for the root object, ornullif the location is not known.resources- The resources used to localize the root object, ornullif the root object was not localized.toolBarShift- if the tool bar has been shifted, this value is bigger than zero and can be used to adjust the UI layout.
-
setButtons
Set the additional footer buttons, e.g. 'Copy', 'Clear' and 'Format JSON'. They are placed left of the standard footer button ('Alright'), which is part of the FXML as in every other pane. Every button gets the standard footer button style class (default-info-footer-button) and its geometry, so all footer buttons look alike.Set the buttons before the stage is shown.
- Parameters:
buttons- the buttons;nullentries are skipped, an empty list ornullremoves all additional buttons
-
setHelpText
Set the help/note text in the left footer slot (the same label the default info pane uses for its footer information).- Parameters:
helpText- the help text ornullto clear the label
-
getHelpLabel
Get the help/note label of the footer, e.g. for a transient note that fades out.- Returns:
- help/note label
-