Class GeneratorTabs

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget

    public class GeneratorTabs
    extends javafx.scene.control.Tab
    A Tab subclass used for all tabs in the billing statement generator. Supports two construction modes: loading content from an FXML file, or accepting a pre-built GridTabController or arbitrary view node. Wires the tab's selected state to the controller's BaseController.onShow() and BaseController.onHide() lifecycle methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javafx.scene.layout.GridPane grid
      The root grid pane that holds the tab's content.
      • Fields inherited from class javafx.scene.control.Tab

        CLOSED_EVENT, SELECTION_CHANGED_EVENT, TAB_CLOSE_REQUEST_EVENT
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static GeneratorTabs fromController​(java.lang.String title, BaseController controller, javafx.scene.Node view)
      Creates a GeneratorTabs from a pre-built view node and a BaseController.
      static GeneratorTabs fromController​(java.lang.String title, GridTabController<?> controller)
      Creates a GeneratorTabs by building its content from a GridTabController.
      static GeneratorTabs fromFxml​(java.lang.String title, java.lang.String fxmlPath)
      Creates a GeneratorTabs by loading its content from an FXML file.
      BaseController getController()
      Returns the controller associated with this tab.
      • Methods inherited from class javafx.scene.control.Tab

        buildEventDispatchChain, closableProperty, contentProperty, contextMenuProperty, disabledProperty, disableProperty, getClassCssMetaData, getContent, getContextMenu, getCssMetaData, getGraphic, getId, getOnClosed, getOnCloseRequest, getOnSelectionChanged, getProperties, getPseudoClassStates, getStyle, getStyleableParent, getStyleClass, getTabPane, getText, getTooltip, getTypeSelector, getUserData, graphicProperty, hasProperties, idProperty, isClosable, isDisable, isDisabled, isSelected, onClosedProperty, onCloseRequestProperty, onSelectionChangedProperty, selectedProperty, setClosable, setContent, setContextMenu, setDisable, setGraphic, setId, setOnClosed, setOnCloseRequest, setOnSelectionChanged, setStyle, setText, setTooltip, setUserData, styleProperty, tabPaneProperty, textProperty, tooltipProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javafx.css.Styleable

        getStyleableNode
    • Field Detail

      • grid

        protected javafx.scene.layout.GridPane grid
        The root grid pane that holds the tab's content.
    • Method Detail

      • fromFxml

        public static GeneratorTabs fromFxml​(java.lang.String title,
                                             java.lang.String fxmlPath)
        Creates a GeneratorTabs by loading its content from an FXML file. The FXML's controller must extend BaseController.
        Parameters:
        title - the tab label text
        fxmlPath - the classpath resource path to the FXML file
        Returns:
        a configured GeneratorTabs instance
      • fromController

        public static GeneratorTabs fromController​(java.lang.String title,
                                                   BaseController controller,
                                                   javafx.scene.Node view)
        Creates a GeneratorTabs from a pre-built view node and a BaseController. Used for tabs whose views are built entirely in code rather than via FXML or a grid controller (e.g. the Instructions and Summary tabs).
        Parameters:
        title - the tab label text
        controller - the controller to associate with this tab
        view - the pre-built view node to display as tab content
        Returns:
        a configured GeneratorTabs instance
      • getController

        public BaseController getController()
        Returns the controller associated with this tab.
        Returns:
        the BaseController for this tab