Package io.github.jonestimd.swing.layout
Interface GridBagFormula
-
- All Known Implementing Classes:
FormElement
public interface GridBagFormula
An interface for generatingGridBagConstraints
.- See Also:
GridBagBuilder
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static GridBagFormula
get(GridBagFormula labelConstraints, int anchor, int width, int height, double weightx, double weighty, int indent)
Create an instance ofGridBagFormula
.static GridBagFormula
get(GridBagFormula labelConstraints, int anchor, int width, int height, double weightx, double weighty, java.awt.Insets insets)
Create an instance ofGridBagFormula
.GridBagFormula
getLabelConstraints()
Get the constraints to use for the label associated with the current component.java.awt.GridBagConstraints
setConstraints(java.awt.GridBagConstraints gbc)
Apply the constraints for the current component.
-
-
-
Method Detail
-
getLabelConstraints
GridBagFormula getLabelConstraints()
Get the constraints to use for the label associated with the current component.
-
setConstraints
java.awt.GridBagConstraints setConstraints(java.awt.GridBagConstraints gbc)
Apply the constraints for the current component.- Parameters:
gbc
- the constraints to be updated- Returns:
- the updated
gbc
parameter
-
get
static GridBagFormula get(GridBagFormula labelConstraints, int anchor, int width, int height, double weightx, double weighty, int indent)
Create an instance ofGridBagFormula
.- Parameters:
labelConstraints
- theGridBagFormula
to use for the labelanchor
- the anchor position for the fieldwidth
- the grid width for the fieldheight
- the grid height for the fieldweightx
- the width size allocation for the fieldweighty
- the height size allocation for the fieldindent
- the left inset for the field
-
get
static GridBagFormula get(GridBagFormula labelConstraints, int anchor, int width, int height, double weightx, double weighty, java.awt.Insets insets)
Create an instance ofGridBagFormula
.- Parameters:
labelConstraints
- theGridBagFormula
to use for the labelanchor
- the anchor position for the fieldwidth
- the grid width for the fieldheight
- the grid height for the fieldweightx
- the width size allocation for the fieldweighty
- the height size allocation for the fieldinsets
- the insets for the field
-
-