- java.lang.Object
-
- com.jgoodies.forms.builder.AbstractBuilder
-
- com.jgoodies.forms.builder.AbstractFormBuilder
-
- com.jgoodies.forms.builder.PanelBuilder
-
- util.ui.EnhancedPanelBuilder
-
public class EnhancedPanelBuilder extends com.jgoodies.forms.builder.PanelBuilder
Panel builder with additional methods for typical TV-Browser UI (e.g. settings tab).
When using this class, you should normally useaddParagraph(String)
to add a section to your settings tab and afterwards useaddRow()
to add standard controls into the section. For lists and other large controls you may also useaddGrowingRow()
instead.
Don't create rows with height settings yourself!- Since:
- 3.0
- Author:
- bananeweizen
-
-
Constructor Summary
Constructors Constructor Description EnhancedPanelBuilder(com.jgoodies.forms.layout.FormLayout layout)
EnhancedPanelBuilder(com.jgoodies.forms.layout.FormLayout layout, javax.swing.JPanel parentPanel)
EnhancedPanelBuilder(java.lang.String encodedColumnSpecs)
Create a new panel builder with the given columns.EnhancedPanelBuilder(java.lang.String encodedColumnSpecs, javax.swing.JPanel parentPanel)
Create a new panel builder with the given columns, which sits on the given panel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.jgoodies.forms.builder.PanelBuilder
addGrowingRow()
Add a new growing layout row to the builders layout.com.jgoodies.forms.builder.PanelBuilder
addGrowingRow(boolean withGap)
Add a new growing layout row to the builders layout.javax.swing.JComponent
addParagraph(java.lang.String label)
create a new section in the layout, which is separated from the previous line by a PARAGRAPH_GAPcom.jgoodies.forms.builder.PanelBuilder
addRow()
Add a new standard layout row to the builders layout.com.jgoodies.forms.builder.PanelBuilder
addRow(boolean withGap)
Add a new standard layout row to the builders layout.com.jgoodies.forms.builder.PanelBuilder
addRow(java.lang.String rowHeightCode)
Add a new layout row with the given height to the builders layout.com.jgoodies.forms.builder.PanelBuilder
addRow(java.lang.String rowHeightCode, boolean withGap)
Add a new layout row with the given height to the builders layout.-
Methods inherited from class com.jgoodies.forms.builder.PanelBuilder
add, add, addLabel, addLabel, addLabel, addLabel, addROLabel, addROLabel, addROLabel, addROLabel, addSeparator, addSeparator, addSeparator, addSeparator, addTitle, addTitle, addTitle, background, border, border, build, getLabelForFeatureEnabledDefault, getOpaqueDefault, getPanel, isLabelForApplicable, labelForFeatureEnabled, opaque, setBorder, setDefaultDialogBorder, setLabelFor, setLabelForFeatureEnabledDefault, setOpaque, setOpaqueDefault
-
Methods inherited from class com.jgoodies.forms.builder.AbstractFormBuilder
add, add, appendColumn, appendColumn, appendGlueColumn, appendGlueRow, appendLabelComponentsGapColumn, appendParagraphGapRow, appendRelatedComponentsGapColumn, appendRelatedComponentsGapRow, appendRow, appendRow, appendUnrelatedComponentsGapColumn, appendUnrelatedComponentsGapRow, cellConstraints, createLeftAdjustedConstraints, getColumn, getColumnIncrementSign, getLeadingColumn, getRow, isLeftToRight, nextColumn, nextColumn, nextLine, nextLine, nextRow, nextRow, setAlignment, setBounds, setColumn, setColumnSpan, setExtent, setHAlignment, setLeftToRight, setOrigin, setRow, setRowSpan, setVAlignment
-
-
-
-
Constructor Detail
-
EnhancedPanelBuilder
public EnhancedPanelBuilder(com.jgoodies.forms.layout.FormLayout layout, javax.swing.JPanel parentPanel)
-
EnhancedPanelBuilder
public EnhancedPanelBuilder(com.jgoodies.forms.layout.FormLayout layout)
-
EnhancedPanelBuilder
public EnhancedPanelBuilder(java.lang.String encodedColumnSpecs)
Create a new panel builder with the given columns. You can add rows afterwards by usingaddParagraph(String)
,addRow()
andaddGrowingRow()
.- Parameters:
encodedColumnSpecs
- The encoded column spec.
-
EnhancedPanelBuilder
public EnhancedPanelBuilder(java.lang.String encodedColumnSpecs, javax.swing.JPanel parentPanel)
Create a new panel builder with the given columns, which sits on the given panel. You can add rows afterwards by usingaddParagraph(String)
,addRow()
andaddGrowingRow()
.- Parameters:
encodedColumnSpecs
- The encoded column spec.parentPanel
- the finally built panel will be a child of this parent panel
-
-
Method Detail
-
addParagraph
public javax.swing.JComponent addParagraph(java.lang.String label)
create a new section in the layout, which is separated from the previous line by a PARAGRAPH_GAP- Parameters:
label
- label string- Returns:
- the new separator component
-
addRow
public com.jgoodies.forms.builder.PanelBuilder addRow()
Add a new standard layout row to the builders layout. It is separated from the preceding row with a LINE_GAP. UseAbstractFormBuilder.getRow()
to address this line afterwards.- Returns:
- the builder
-
addRow
public com.jgoodies.forms.builder.PanelBuilder addRow(boolean withGap)
Add a new standard layout row to the builders layout. It is separated from the preceding row with a LINE_GAP if parameter withGap istrue
. UseAbstractFormBuilder.getRow()
to address this line afterwards.- Parameters:
withGap
- If the LINE_GAP should be added- Returns:
- the builder
-
addGrowingRow
public com.jgoodies.forms.builder.PanelBuilder addGrowingRow()
Add a new growing layout row to the builders layout. It is separated from the preceding row by LINE_GAP and will grow to take the available space.- Returns:
- the builder
-
addGrowingRow
public com.jgoodies.forms.builder.PanelBuilder addGrowingRow(boolean withGap)
Add a new growing layout row to the builders layout. It is separated from the preceding row by LINE_GAP if parameter withGap istrue
and will grow to take the available space.- Parameters:
withGap
- If the LINE_GAP should be added- Returns:
- the builder
-
addRow
public com.jgoodies.forms.builder.PanelBuilder addRow(java.lang.String rowHeightCode)
Add a new layout row with the given height to the builders layout. It is separated from the preceding row with a LINE_GAP. UseAbstractFormBuilder.getRow()
to address this line afterwards.
This method should normally not be used! UseaddRow()
oraddGrowingRow()
instead. The necessary sizes for rows will be calculated by the PanelBuilder.- Parameters:
rowHeightCode
- row height- Returns:
- the builder
-
addRow
public com.jgoodies.forms.builder.PanelBuilder addRow(java.lang.String rowHeightCode, boolean withGap)
Add a new layout row with the given height to the builders layout. It is separated from the preceding row with a LINE_GAP if parameter withGap istrue
. UseAbstractFormBuilder.getRow()
to address this line afterwards.
This method should normally not be used! UseaddRow()
oraddGrowingRow()
instead. The necessary sizes for rows will be calculated by the PanelBuilder.- Parameters:
rowHeightCode
- row heightwithGap
- If the LINE_GAP should be added- Returns:
- the builder
-
-