Class DefaultCodeEditorController

All Implemented Interfaces:
Initializable

public class DefaultCodeEditorController extends DefaultInfoController
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:
  • Constructor Details

  • Method Details

    • init

      public void init(URL location, ResourceBundle resources, double toolBarShift)
      Description copied from class: BaseController
      Delegated initialization. See Initializable.initialize(URL, ResourceBundle).
      Overrides:
      init in class DefaultInfoController
      Parameters:
      location - The location used to resolve relative paths for the root object, or null if the location is not known.
      resources - The resources used to localize the root object, or null if 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

      public void setButtons(List<Button> buttons)
      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; null entries are skipped, an empty list or null removes all additional buttons
    • setHelpText

      public void setHelpText(String helpText)
      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 or null to clear the label
    • getHelpLabel

      public HTMLLabel getHelpLabel()
      Get the help/note label of the footer, e.g. for a transient note that fades out.
      Returns:
      help/note label