Class TabbedFormBuilder
- All Implemented Interfaces:
TabbedForm
,FormBuilder
Tabpage based form builder class
With the use of the builder class, a form can be created, in which the individual form items will be placed in individual tabs. The tab labels will be on the top of the form, lined up. By default the first tab will be chosen, and its form items will be displayed. If the users chooses another tab, then the currently displayed form items will disappear, and the items form the newly selected tab will be displayed. The tab pages will be displayed in the full width of the form. The individual items will also have the width of the tab, and they will be under each other.
The tabs can be created through the form component, by using the Form.addTabPage(String, Icon, String)
method. The individual form items can be added through parameters.
The parameter can be specified through code, directly to the component, or through a DataDescriptor column, by specifying the MetaParamName.TAB_NAME
parameter.
- Author:
- JBStrap
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionComponent<?>
Builds a formfinal TabPage
createTabpage
(String name, Icon icon, String title) Creates a tabpage on the form, with the specified name, icon and title.getTabpage
(String name) Gets a tab page component, specified by its namevoid
setTabType
(TabType tabType) Sets the type of the tabs.
-
Constructor Details
-
TabbedFormBuilder
public TabbedFormBuilder()
-
-
Method Details
-
createTabpage
Creates a tabpage on the form, with the specified name, icon and title.- Specified by:
createTabpage
in interfaceTabbedForm
- Parameters:
name
- The name of the tab, must be unique within the formicon
- The tab icon. The usable icons can be found in theIcon
enum. Ifnull
, no icon will be used.title
- The tab title. Ifnull
, none will be used.- Returns:
- The created component
- Throws:
NullPointerException
- If the name isnull
-
buildForm
Description copied from interface:FormBuilder
Builds a form- Specified by:
buildForm
in interfaceFormBuilder
- Parameters:
formItems
- A list containing the form items- Returns:
- The built form
-
getTabpage
Gets a tab page component, specified by its name- Specified by:
getTabpage
in interfaceTabbedForm
- Parameters:
name
- The name of the tab page to be queried- Returns:
- The corresponding tab page, or
null
, if not found
-
setTabType
Sets the type of the tabs. By default theTabType.DEFAULT
type is used.- Specified by:
setTabType
in interfaceTabbedForm
- Parameters:
tabType
- The type to be used. Usable types can be found in theTabType
enum.
-