public class DumbGridBagLayout extends GridBagLayout
columnWeights, columnWidths, comptable, defaultConstraints, layoutInfo, MAXGRIDSIZE, MINSIZE, PREFERREDSIZE, rowHeights, rowWeights| Constructor and Description |
|---|
DumbGridBagLayout()
- fill=HORIZONTAL
| fill=VERTICAL
+ fill=BOTH
* gridheight++
: gridwidth ++
.
|
DumbGridBagLayout(String pattern) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(Component comp,
Object constraints) |
DumbGridBagLayout |
addLine(String pattern) |
DumbGridBagLayout |
append(String pattern) |
void |
compileWhite(Container comp) |
GridBagConstraints |
getConstraints(String name) |
String |
getPattern() |
void |
layoutContainer(Container parent) |
void |
reset() |
DumbGridBagLayout |
setInsets(String regexp,
Insets insets) |
DumbGridBagLayout |
setIpadx(String regexp,
int ipadx) |
DumbGridBagLayout |
setIpady(String regexp,
int ipady) |
DumbGridBagLayout |
setPattern(String pattern) |
addLayoutComponent, adjustForGravity, AdjustForGravity, arrangeGrid, ArrangeGrid, getConstraints, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutDimensions, getLayoutInfo, GetLayoutInfo, getLayoutOrigin, getLayoutWeights, getMinSize, GetMinSize, invalidateLayout, location, lookupConstraints, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setConstraints, toStringpublic 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");
public DumbGridBagLayout(String pattern)
public DumbGridBagLayout addLine(String pattern)
pattern - pattern linepublic GridBagConstraints getConstraints(String name)
public String getPattern()
public void reset()
public DumbGridBagLayout setPattern(String pattern)
public DumbGridBagLayout append(String pattern)
public DumbGridBagLayout setInsets(String regexp, Insets insets)
public DumbGridBagLayout setIpadx(String regexp, int ipadx)
public DumbGridBagLayout setIpady(String regexp, int ipady)
public void addLayoutComponent(Component comp, Object constraints)
addLayoutComponent in interface LayoutManager2addLayoutComponent in class GridBagLayoutpublic void compileWhite(Container comp)
public void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerlayoutContainer in class GridBagLayoutCopyright © 2021 vpc open source initiative. All rights reserved.