java.lang.Object
org.proto4j.swing.core.desc.GenericDesc<Layout>
org.proto4j.swing.core.desc.LayoutDesc
org.proto4j.swing.core.desc.layout.GridLayoutDesc
org.proto4j.swing.core.desc.layout.GridBagLayoutDesc
public class GridBagLayoutDesc extends GridLayoutDesc
The basic descriptor for the
GridBagLayout.- See Also:
LayoutDesc
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedGridBagLayoutDesc(ComponentDesc parent) -
Method Summary
Modifier and Type Method Description java.lang.ObjectcreateConstraints(ComponentDesc child)Creates layout constraints if possible by using extra configuration variables by the parentComponentDesc.java.awt.LayoutManagercreateManager()Based on the configuration given by the annotations on each field, this descriptor tries to create the correspondingLayoutManager.Methods inherited from class org.proto4j.swing.core.desc.LayoutDesc
applyTo, bind, getParent, setConstraintMethods inherited from class org.proto4j.swing.core.desc.GenericDesc
annotationType, get, getDefinedOptions, getOption, hasOption, keys, put, read, read
-
Constructor Details
-
Method Details
-
createManager
public java.awt.LayoutManager createManager()Description copied from class:LayoutDescBased on the configuration given by the annotations on each field, this descriptor tries to create the correspondingLayoutManager.Implementations of this method should return
nullof failure instead of throwing an exception.- Overrides:
createManagerin classGridLayoutDesc- Returns:
- the qualified LayoutManager
-
createConstraints
Description copied from class:LayoutDescCreates layout constraints if possible by using extra configuration variables by the parentComponentDesc.This method may return
nullif no constraints are defined or can be used. Another way is to throw an exception in order to show the user a misconfiguration.- Overrides:
createConstraintsin classGridLayoutDesc- Returns:
- the layout constraints for the given child component
-