|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.layout.AbstractLayoutManager com.alee.extended.layout.ToolbarLayout
public class ToolbarLayout
This layout allows you to quickly and easily place components in a toolbar-like components without overloading interface with lots of panels and different layouts.
Field Summary | |
---|---|
protected java.util.Map<java.awt.Component,java.lang.String> |
constraints
|
static java.lang.String |
END
|
static java.lang.String |
FILL
|
protected java.awt.Insets |
margin
|
static java.lang.String |
MIDDLE
|
protected int |
orientation
|
protected int |
partsSpacing
|
protected int |
spacing
|
static java.lang.String |
START
|
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
---|---|
ToolbarLayout()
Some extended constructors |
|
ToolbarLayout(int spacing)
|
|
ToolbarLayout(int spacing,
int orientation)
|
|
ToolbarLayout(int spacing,
int partsSpacing,
int orientation)
|
Method Summary | |
---|---|
void |
addComponent(java.awt.Component component,
java.lang.Object constraints)
Caled when component added into container with this layout. |
protected java.awt.Insets |
getActualInsets(java.awt.Container container)
|
java.util.Map<java.awt.Component,java.lang.String> |
getConstraints()
Layout constraints |
java.awt.Insets |
getMargin()
Layout sides margin In case this value is null component border is taken into account instead |
int |
getOrientation()
Layout orientation |
int |
getPartsSpacing()
Start-end parts spacing This one does not affect layout if there are any components in FILL part |
int |
getSpacing()
Layout cells spacing |
protected boolean |
hasElement(java.lang.String element)
|
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
removeComponent(java.awt.Component component)
Called when component removed from container with this layout. |
void |
setConstraints(java.util.Map<java.awt.Component,java.lang.String> constraints)
|
void |
setMargin(java.awt.Insets margin)
|
void |
setOrientation(int orientation)
|
void |
setPartsSpacing(int partsSpacing)
|
void |
setSpacing(int spacing)
|
Methods inherited from class com.alee.extended.layout.AbstractLayoutManager |
---|
addLayoutComponent, addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, removeLayoutComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String START
public static final java.lang.String MIDDLE
public static final java.lang.String FILL
public static final java.lang.String END
protected java.util.Map<java.awt.Component,java.lang.String> constraints
protected int spacing
protected int partsSpacing
protected int orientation
protected java.awt.Insets margin
Constructor Detail |
---|
public ToolbarLayout()
public ToolbarLayout(int spacing)
public ToolbarLayout(int spacing, int orientation)
public ToolbarLayout(int spacing, int partsSpacing, int orientation)
Method Detail |
---|
public java.util.Map<java.awt.Component,java.lang.String> getConstraints()
public void setConstraints(java.util.Map<java.awt.Component,java.lang.String> constraints)
public int getSpacing()
public void setSpacing(int spacing)
public int getPartsSpacing()
public void setPartsSpacing(int partsSpacing)
public int getOrientation()
public void setOrientation(int orientation)
public java.awt.Insets getMargin()
public void setMargin(java.awt.Insets margin)
public void addComponent(java.awt.Component component, java.lang.Object constraints)
addComponent
in class AbstractLayoutManager
component
- added componentconstraints
- component constraintspublic void removeComponent(java.awt.Component component)
removeComponent
in class AbstractLayoutManager
component
- removed componentpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
protected boolean hasElement(java.lang.String element)
protected java.awt.Insets getActualInsets(java.awt.Container container)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |