Class GeneratorTabs
- java.lang.Object
-
- javafx.scene.control.Tab
-
- com.palmer.billingstatementgenerator.views.tabs.GeneratorTabs
-
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
public class GeneratorTabs extends javafx.scene.control.TabATabsubclass used for all tabs in the billing statement generator. Supports two construction modes: loading content from an FXML file, or accepting a pre-builtGridTabControlleror arbitrary view node. Wires the tab's selected state to the controller'sBaseController.onShow()andBaseController.onHide()lifecycle methods.
-
-
Field Summary
Fields Modifier and Type Field Description protected javafx.scene.layout.GridPanegridThe root grid pane that holds the tab's content.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeneratorTabsfromController(java.lang.String title, BaseController controller, javafx.scene.Node view)Creates aGeneratorTabsfrom a pre-built view node and aBaseController.static GeneratorTabsfromController(java.lang.String title, GridTabController<?> controller)Creates aGeneratorTabsby building its content from aGridTabController.static GeneratorTabsfromFxml(java.lang.String title, java.lang.String fxmlPath)Creates aGeneratorTabsby loading its content from an FXML file.BaseControllergetController()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
-
-
-
-
Method Detail
-
fromFxml
public static GeneratorTabs fromFxml(java.lang.String title, java.lang.String fxmlPath)
Creates aGeneratorTabsby loading its content from an FXML file. The FXML's controller must extendBaseController.- Parameters:
title- the tab label textfxmlPath- the classpath resource path to the FXML file- Returns:
- a configured
GeneratorTabsinstance
-
fromController
public static GeneratorTabs fromController(java.lang.String title, GridTabController<?> controller)
Creates aGeneratorTabsby building its content from aGridTabController. CallsGridTabController.buildView()to construct the grid content.- Parameters:
title- the tab label textcontroller- the grid tab controller to build the view from- Returns:
- a configured
GeneratorTabsinstance
-
fromController
public static GeneratorTabs fromController(java.lang.String title, BaseController controller, javafx.scene.Node view)
Creates aGeneratorTabsfrom a pre-built view node and aBaseController. 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 textcontroller- the controller to associate with this tabview- the pre-built view node to display as tab content- Returns:
- a configured
GeneratorTabsinstance
-
getController
public BaseController getController()
Returns the controller associated with this tab.- Returns:
- the
BaseControllerfor this tab
-
-