Class TableFormField.TableFormFieldBuilder
java.lang.Object
com.github.tadukoo.view.form.field.FormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>
com.github.tadukoo.view.form.field.TableFormField.TableFormFieldBuilder
- Enclosing class:
- TableFormField
public static class TableFormField.TableFormFieldBuilder
extends FormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>
Builder to be used to create a
This builder also provides methods and parameters for
TableFormField. It has the following parameters:
| Name | Description | Default Value or Required |
|---|---|---|
| key | The name of the field (used as a key in Forms) |
Required |
| defaultValue | The starting value of the field | Defaults to null |
| labelType | The LabelType to use for the field |
Defaults to LabelType.NONE |
| labelForegroundPaint | The SizablePaint for the foreground of the Label |
Defaults to null (to use the Look & Feel's default Label foreground paint) |
| labelBackgroundPaint | The SizablePaint for the background of the Label |
Defaults to null (to use the Look & Feel's default Label background paint) |
| labelFont | The Font to use for the Label - specified as a FontFamily, style, and size |
Defaults to null (to use the Look & Feel's default Label font) |
| labelShape | The ShapeInfo to use for the Label |
Defaults to null (to use the Look & Feel's default Label shape) |
| labelBorder | The Border to use for the Label |
Defaults to null (to use the Look & Feel's default Label border) |
| rowPos | The row position of the field | Required |
| colPos | The column position of the field | Required |
| rowSpan | The row span of the field | Defaults to 1 |
| colSpan | The column span of the field | Defaults to 1 |
font resource loading:
| Field | Description | Default Value |
|---|---|---|
| logFontResourceLoaderWarnings | Whether to log warnings generated by the FontResourceLoader - can be ignored if you specify your own FontResourceLoader | false |
| logger | An EasyLogger that will be sent to the FontResourceLoader by default
- can be ignored if you specify your own FontResourceLoader |
null (since logging warnings is set to false by default) |
| graphEnv | The GraphicsEnvironment to load fonts to in the FontResourceLoader
- can be ignored if you specify your own FontResourceLoader |
GraphicsEnvironment.getLocalGraphicsEnvironment() |
| fontFolder | The path to the fonts folder to find font files in if needed in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader | "fonts/" |
| fontResourceLoader | The FontResourceLoader to use in loading fonts and/or ensuring they're in the system |
a new FontResourceLoader with the specified values for logFontResourceLoaderWarnings(boolean),
logger(com.github.tadukoo.util.logger.EasyLogger), graphEnv(java.awt.GraphicsEnvironment), and fontFolder(java.lang.String) |
- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
Fields inherited from class com.github.tadukoo.view.form.field.FormField.FormFieldBuilder
colPos, colSpan, defaultValue, fontFolder, fontResourceLoader, graphEnv, key, labelBackgroundPaint, labelBorder, labelFontFamily, labelFontSize, labelFontStyle, labelForegroundPaint, labelShape, labelType, logFontResourceLoaderWarnings, logger, rowPos, rowSpan -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNot allowed to create a TableFormFieldBuilder outside of TableFormField -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theFormFieldcolPos(int colPos) colSpan(int colSpan) defaultValue(List<com.github.tadukoo.util.pojo.OrderedMappedPojo> defaultValue) fontFolder(String fontFolder) fontResourceLoader(FontResourceLoader fontResourceLoader) graphEnv(GraphicsEnvironment graphEnv) labelBackgroundPaint(SizablePaint labelBackgroundPaint) labelBorder(Border labelBorder) labelFont(FontFamily labelFontFamily, int labelFontStyle, int labelFontSize) Specifies the font to use on the LabellabelForegroundPaint(SizablePaint labelForegroundPaint) labelShape(ShapeInfo labelShape) logFontResourceLoaderWarnings(boolean logFontResourceLoaderWarnings) logger(com.github.tadukoo.util.logger.EasyLogger logger) rowPos(int rowPos) rowSpan(int rowSpan)
-
Constructor Details
-
TableFormFieldBuilder
private TableFormFieldBuilder()Not allowed to create a TableFormFieldBuilder outside of TableFormField
-
-
Method Details
-
key
- Overrides:
keyin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
key- The name of the field (used as a key inForms)- Returns:
- this, to continue building
-
defaultValue
public TableFormField.TableFormFieldBuilder defaultValue(List<com.github.tadukoo.util.pojo.OrderedMappedPojo> defaultValue) - Overrides:
defaultValuein classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
defaultValue- The starting value of the field- Returns:
- this, to continue building
-
labelType
- Overrides:
labelTypein classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
labelType- TheLabelTypeto use for the field- Returns:
- this, to continue building
-
labelForegroundPaint
- Overrides:
labelForegroundPaintin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
labelForegroundPaint- TheSizablePaintfor the foreground of the Label- Returns:
- this, to continue building
-
labelBackgroundPaint
- Overrides:
labelBackgroundPaintin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
labelBackgroundPaint- TheSizablePaintfor the background of the Label- Returns:
- this, to continue building
-
labelFont
public TableFormField.TableFormFieldBuilder labelFont(FontFamily labelFontFamily, int labelFontStyle, int labelFontSize) Specifies the font to use on the Label- Overrides:
labelFontin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
labelFontFamily- TheFontFamilyfor the Label's fontlabelFontStyle- The font style for the LabellabelFontSize- The font size for the Label- Returns:
- this, to continue building
-
labelShape
- Overrides:
labelShapein classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
labelShape- TheShapeInfoto use for the Label- Returns:
- this, to continue building
-
labelBorder
- Overrides:
labelBorderin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
labelBorder- TheBorderto use for the Label- Returns:
- this, to continue building
-
rowPos
- Overrides:
rowPosin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
rowPos- The row position of the field- Returns:
- this, to continue building
-
colPos
- Overrides:
colPosin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
colPos- The column position of the field- Returns:
- this, to continue building
-
rowSpan
- Overrides:
rowSpanin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
rowSpan- The row span of the field- Returns:
- this, to continue building
-
colSpan
- Overrides:
colSpanin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
colSpan- The column span of the field- Returns:
- this, to continue building
-
logFontResourceLoaderWarnings
public TableFormField.TableFormFieldBuilder logFontResourceLoaderWarnings(boolean logFontResourceLoaderWarnings) - Overrides:
logFontResourceLoaderWarningsin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
logFontResourceLoaderWarnings- Whether to log warnings generated by the FontResourceLoader - can be ignored if you specify your own FontResourceLoader- Returns:
- this, to continue building
-
logger
public TableFormField.TableFormFieldBuilder logger(com.github.tadukoo.util.logger.EasyLogger logger) - Overrides:
loggerin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
logger- AnEasyLoggerthat will be sent to the FontResourceLoader by default - can be ignored if you specify your own FontResourceLoader- Returns:
- this, to continue building
-
graphEnv
- Overrides:
graphEnvin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
graphEnv- TheGraphicsEnvironmentto load fonts to in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader- Returns:
- this, to continue building
-
fontFolder
- Overrides:
fontFolderin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
fontFolder- The path to the fonts folder to find font files in if needed in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader- Returns:
- this, to continue building
-
fontResourceLoader
public TableFormField.TableFormFieldBuilder fontResourceLoader(FontResourceLoader fontResourceLoader) - Overrides:
fontResourceLoaderin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Parameters:
fontResourceLoader- TheFontResourceLoaderto use in loading fonts and/or ensuring they're in the system- Returns:
- this, to continue building
-
build
Builds theFormField- Specified by:
buildin classFormField.FormFieldBuilder<List<com.github.tadukoo.util.pojo.OrderedMappedPojo>>- Returns:
- A newly created
FormField
-