Class BaseTab<T extends javafx.scene.Parent>

java.lang.Object
net.minheur.potoflux.screen.tabs.BaseTab<T>
Type Parameters:
T - type of Pane added to the tab
Direct Known Subclasses:
BaseHTab, BaseVTab, TerminalTab

public abstract class BaseTab<T extends javafx.scene.Parent> extends Object
The base tab, overridden to create your own tabs.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected T
    The actual Pane, that will be added to the tabbed pane.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the tab.
    It will do the preset if enabled, and execute (or invokeLater) the setPanel() method, to add data to the PANEL.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    Handles if the preset should be executed.
    True by default.
    javafx.scene.control.Tab
     
    protected @Nullable javafx.scene.Node
    Sets the graphic displayed in the tab list
    abstract String
    The name of the tab in the list displayed
    protected String
    Used to set the title.
    protected abstract void
    You need to instantiate PANEL.
    protected javafx.scene.control.Label
    Creates the title, from the text given via getTitle().
    protected abstract void
    This is the actual method to set the panel.
    The overriding class will have to use this to add content to the PANEL.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PANEL

      protected T extends javafx.scene.Parent PANEL
      The actual Pane, that will be added to the tabbed pane.
  • Constructor Details

    • BaseTab

      public BaseTab()
      Constructor for the tab.
      It will do the preset if enabled, and execute (or invokeLater) the setPanel() method, to add data to the PANEL.
  • Method Details

    • getBuiltTab

      public javafx.scene.control.Tab getBuiltTab()
    • instantiate

      protected abstract void instantiate()
      You need to instantiate PANEL.
    • setPanel

      protected abstract void setPanel()
      This is the actual method to set the panel.
      The overriding class will have to use this to add content to the PANEL.
    • getTitle

      protected String getTitle()
      Used to set the title.
      Returns:
      the title of the tab.
    • getName

      public abstract String getName()
      The name of the tab in the list displayed
      Returns:
      the tab's name
    • getIcon

      @Nullable protected @Nullable javafx.scene.Node getIcon()
      Sets the graphic displayed in the tab list
      Returns:
      the tab's icon
    • doPreset

      protected boolean doPreset()
      Handles if the preset should be executed.
      True by default.
      Returns:
      if the preset should be executed
    • mkTitle

      protected javafx.scene.control.Label mkTitle()
      Creates the title, from the text given via getTitle().