Interface TabbedForm

All Superinterfaces:
Form, com.github.tadukoo.util.pojo.MappedPojo, com.github.tadukoo.util.pojo.OrderedMappedPojo
All Known Subinterfaces:
TabbedMainForm
All Known Implementing Classes:
AbstractTabbedForm, AbstractTabbedMainForm

public interface TabbedForm extends Form, com.github.tadukoo.util.pojo.OrderedMappedPojo
Tabbed Form represents a Form composed of multiple tabs (each tab being its own Form) for the user to be able to interact with.
Version:
Alpha v.0.3.3
Author:
Logan Ferree (Tadukoo)
  • Method Details

    • getTabMap

      Map<String,Form> getTabMap()
      Returns:
      The Map of Form tabs in this Tabbed Form
    • asComponent

      JTabbedPane asComponent()
      Specified by:
      asComponent in interface Form
      Returns:
      This Form as a Component
    • saveValues

      default void saveValues()
      This method can be called by subclasses to update the values present in the form from the Component values
      Specified by:
      saveValues in interface Form
    • tabPlacement

      default TabPlacement tabPlacement()
      Returns:
      The TabPlacement to use for this Tabbed Form
    • tabLayoutPolicy

      default TabLayoutPolicy tabLayoutPolicy()
      Returns:
      The TabLayoutPolicy to use for this Tabbed Form
    • configureSettings

      default void configureSettings()
      Configures settings for this Tabbed Form. This method should be called by the constructor in order to set at least the tabPlacement() and tabLayoutPolicy()
    • defaultTabLabelType

      default TabLabelType defaultTabLabelType()
      Returns:
      The default TabLabelType to use for added tabs that don't specify a label type or custom label
    • addTab

      default void addTab(String title, Form tab)
      Adds the given Form tab to this Tabbed Form, using the default tab label type from defaultTabLabelType() with the given title
      Parameters:
      title - The title for the tab, also used as the key
      tab - The Form tab to be added
    • addTab

      default void addTab(String title, Form tab, TabLabelType tabLabelType)
      Adds the given Form tab to this Tabbed Form, using the given TabLabelType with the given title
      Parameters:
      title - The title for the tab, also used as the key
      tab - The Form tab to be added
      tabLabelType - The TabLabelType to be used to create the tab's label
    • addTab

      default void addTab(String title, Form tab, Component customTabLabel)
      Adds the given Form tab to this Tabbed Form, using the given tab label component and the given title
      Parameters:
      title - The title for the tab, also used as the key
      tab - The Form tab to be added
      customTabLabel - The component to use for the tab's label
    • setDefaultTabs

      void setDefaultTabs() throws Throwable
      Used by subclasses to setup the tabs used in the Tabbed Form, mainly by calling the addTab methods
      Throws:
      Throwable - If anything goes wrong
    • getAllTabs

      default Collection<Form> getAllTabs()
      Returns:
      All the Form tabs contained in this Tabbed Form
    • getNumTabs

      default int getNumTabs()
      Returns:
      The number of Form tabs contained in this Tabbed Form