Class DumbGridBagLayout
java.lang.Object
java.awt.GridBagLayout
net.thevpc.common.swing.layout.DumbGridBagLayout
- All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
- Author:
- Taha BEN SALAH (taha.bensalah@gmail.com) %creationtime 5 mai 2006 00:52:57
- See Also:
-
Field Summary
Fields inherited from class GridBagLayout
columnWeights, columnWidths, comptable, defaultConstraints, layoutInfo, MAXGRIDSIZE, MINSIZE, PREFERREDSIZE, rowHeights, rowWeights -
Constructor Summary
ConstructorsConstructorDescription- fill=HORIZONTAL | fill=VERTICAL + fill=BOTH * gridheight++ : gridwidth ++ .DumbGridBagLayout(String pattern) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(Component comp, Object constraints) voidcompileWhite(Container comp) getConstraints(String name) voidlayoutContainer(Container parent) voidreset()setPattern(String pattern) Methods inherited from class GridBagLayout
addLayoutComponent, adjustForGravity, AdjustForGravity, arrangeGrid, ArrangeGrid, getConstraints, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutDimensions, getLayoutInfo, GetLayoutInfo, getLayoutOrigin, getLayoutWeights, getMinSize, GetMinSize, invalidateLayout, location, lookupConstraints, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setConstraints, toString
-
Constructor Details
-
DumbGridBagLayout
public DumbGridBagLayout()- fill=HORIZONTAL | fill=VERTICAL + fill=BOTH * gridheight++ : gridwidth ++ . gridwidth=REMAINDER .. gridwidth=RELATIVE ; gridheight=REMAINDER ;; gridheight=RELATIVE < anchor=LINE_START > anchor=LINE_END _ anchor=PAGE_END ~ ou ^ anchor=PAGE_START = weightx++ $ weighty++ # weightx++ && weighty++ ' ' do nothing just allowed for formatting Identifier position identifier to use in component.add(something,"Identifier") [ and ] define x position (next column) \n define y position (next row)
example :
JPanel p=new JPanel(new DumbGridBagLayout() .addLine("[<~titleBarStyle : ]") .addLine("[<~enableClose ] [<~freezeLayout ]") .addLine("[<~]") .addLine("[<~verticalSpanExample *]") .addLine("[+# ]") ); p.add(new JLabel("Hello"),"titleBarStyle"); -
DumbGridBagLayout
-
-
Method Details
-
addLine
- Parameters:
pattern- pattern line- Returns:
- current layout instance
-
getConstraints
-
getPattern
-
reset
public void reset() -
setPattern
-
append
-
setInsets
-
setIpadx
-
setIpady
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager2- Overrides:
addLayoutComponentin classGridBagLayout
-
compileWhite
-
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager- Overrides:
layoutContainerin classGridBagLayout
-