public final class MigLayout extends Layout
Read the documentation that came with this layout manager for information on usage.
Constructor and Description |
---|
MigLayout()
Deprecated.
Constructor with no constraints.
|
MigLayout(LC layoutConstraints)
Deprecated.
Constructor.
|
MigLayout(LC layoutConstraints,
AC colConstraints)
Deprecated.
Constructor.
|
MigLayout(LC layoutConstraints,
AC colConstraints,
AC rowConstraints)
Deprecated.
Constructor.
|
MigLayout(String layoutConstraints)
Deprecated.
Constructor.
|
MigLayout(String layoutConstraints,
String colConstraints)
Deprecated.
Constructor.
|
MigLayout(String layoutConstraints,
String colConstraints,
String rowConstraints)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutCallback(LayoutCallback callback)
Deprecated.
Adds the callback function that will be called at different stages of the
layout cylce.
|
void |
addLayoutComponent(Component comp,
Object constraints)
Deprecated.
|
void |
addLayoutComponent(Object value,
Component comp,
Container c)
Deprecated.
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
static <E> E |
findType(Class<E> clazz,
Component comp)
Deprecated.
|
Object |
getColumnConstraints()
Deprecated.
Returns the column layout constraints either as a
String or
net.miginfocom.layout.AC . |
Object |
getComponentConstraint(Component comp)
Deprecated.
Returns the optional component constraint
|
Object |
getComponentConstraints(Component comp)
Deprecated.
Returns the component constraints as a String representation.
|
Map<Component,Object> |
getConstraintMap()
Deprecated.
Returns a shallow copy of the constraints map.
|
float |
getLayoutAlignmentX(Container parent)
Deprecated.
|
float |
getLayoutAlignmentY(Container parent)
Deprecated.
|
Object |
getLayoutConstraints()
Deprecated.
Returns layout constraints either as a
String or
net.miginfocom.layout.LC depending what was sent in to the
constructor or set with setLayoutConstraints(Object) . |
Dimension |
getPreferredSize(Container parent)
Deprecated.
Returns the container preferred size
|
Object |
getRowConstraints()
Deprecated.
Returns the row layout constraints either as a
String or
net.miginfocom.layout.AC . |
void |
invalidateLayout(Container target)
Deprecated.
|
boolean |
isConstraintTracking()
Deprecated.
If this method returns true, the addLayoutComponent method will be called when replacing a
layout for every component within the container
|
boolean |
isManagingComponent(Component c)
Deprecated.
Returns if this layout manager is currently managing this component.
|
void |
layoutContainer(Container parent)
Deprecated.
Layout the given parent container children
|
Dimension |
maximumLayoutSize(Container parent)
Deprecated.
|
Dimension |
minimumLayoutSize(Container parent)
Deprecated.
|
Dimension |
preferredLayoutSize(Container parent)
Deprecated.
|
void |
removeLayoutCallback(LayoutCallback callback)
Deprecated.
Removes the callback if it exists.
|
void |
removeLayoutComponent(Component comp)
Deprecated.
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
void |
setColumnConstraints(Object constr)
Deprecated.
Sets the column layout constraints for the layout manager instance as a
String.
|
void |
setComponentConstraints(Component comp,
Object constr)
Deprecated.
Sets the component constraint for the component that already must be
handled by this layout manager.
|
void |
setConstraintMap(Map<Component,Object> map)
Deprecated.
Sets the constraints map.
|
void |
setLayoutConstraints(Object constr)
Deprecated.
Sets the layout constraints for the layout manager instance as a String.
|
void |
setRowConstraints(Object constr)
Deprecated.
Sets the row layout constraints for the layout manager instance as a
String.
|
cloneConstraint, equals, getChildrenInTraversalOrder, hashCode, isOverlapSupported, obscuresPotential, overridesTabIndices, updateTabIndices
public MigLayout()
public MigLayout(String layoutConstraints)
layoutConstraints
- The constraints that concern the whole layout.
null
will be treated as "".public MigLayout(String layoutConstraints, String colConstraints)
layoutConstraints
- The constraints that concern the whole layout.
null
will be treated as "".colConstraints
- The constraints for the columns in the grid.
null
will be treated as "".public MigLayout(String layoutConstraints, String colConstraints, String rowConstraints)
layoutConstraints
- The constraints that concern the whole layout.
null
will be treated as "".colConstraints
- The constraints for the columns in the grid.
null
will be treated as "".rowConstraints
- The constraints for the rows in the grid.
null
will be treated as "".public MigLayout(LC layoutConstraints)
layoutConstraints
- The constraints that concern the whole layout.
null
will be treated as an empty constraint.public MigLayout(LC layoutConstraints, AC colConstraints)
layoutConstraints
- The constraints that concern the whole layout.
null
will be treated as an empty constraint.colConstraints
- The constraints for the columns in the grid.
null
will be treated as an empty constraint.public MigLayout(LC layoutConstraints, AC colConstraints, AC rowConstraints)
layoutConstraints
- The constraints that concern the whole layout.
null
will be treated as an empty constraint.colConstraints
- The constraints for the columns in the grid.
null
will be treated as an empty constraint.rowConstraints
- The constraints for the rows in the grid.
null
will be treated as an empty constraint.public Object getLayoutConstraints()
String
or
net.miginfocom.layout.LC
depending what was sent in to the
constructor or set with setLayoutConstraints(Object)
.String
or
net.miginfocom.layout.LC
depending what was sent in to the
constructor or set with setLayoutConstraints(Object)
. Never
null
.public void setLayoutConstraints(Object constr)
See the class JavaDocs for information on how this string is formatted.
constr
- The layout constraints as a String pr
net.miginfocom.layout.LC
representation. null
is
converted to ""
for storage.RuntimeException
- if the constraint was not valid.public Object getColumnConstraints()
String
or
net.miginfocom.layout.AC
.String
or
net.miginfocom.layout.AC
depending what was sent in to the
constructor or set with setColumnConstraints(Object)
. Never
null
.public void setColumnConstraints(Object constr)
See the class JavaDocs for information on how this string is formatted.
constr
- The column layout constraints as a String or
net.miginfocom.layout.AC
representation. null
is
converted to ""
for storage.RuntimeException
- if the constraint was not valid.public Object getRowConstraints()
String
or
net.miginfocom.layout.AC
.String
or
net.miginfocom.layout.AC
depending what was sent in to the
constructor or set with setRowConstraints(Object)
. Never
null
.public void setRowConstraints(Object constr)
See the class JavaDocs for information on how this string is formatted.
constr
- The row layout constraints as a String or
net.miginfocom.layout.AC
representation. null
is
converted to ""
for storage.RuntimeException
- if the constraint was not valid.public Map<Component,Object> getConstraintMap()
null
.public void setConstraintMap(Map<Component,Object> map)
map
- The map. Will be copied.public Object getComponentConstraints(Component comp)
#setComponentConstraints(java.awt.Component, Object)
or set when
adding the component to the parent component.
See the class JavaDocs for information on how this string is formatted.
comp
- The component to return the constraints for.null
if the component is not registered with this layout
manager. The returned values is either a String or a
net.miginfocom.layout.CC
depending on what constraint was sent in
when the component was added. May be null
.public void setComponentConstraints(Component comp, Object constr)
See the class JavaDocs for information on how this string is formatted.
constr
- The component constraints as a String or
net.miginfocom.layout.CC
. null
is ok.comp
- The component to set the constraints for.RuntimeException
- if the constraint was not valid.IllegalArgumentException
- If the component is not handling the
component.public boolean isManagingComponent(Component c)
c
- The component to check. If null
then
false
will be returned.public void addLayoutCallback(LayoutCallback callback)
callback
- The callback. Not null
.public void removeLayoutCallback(LayoutCallback callback)
callback
- The callback. May be null
.public void layoutContainer(Container parent)
Layout
layoutContainer
in class Layout
parent
- the given parent containerpublic float getLayoutAlignmentX(Container parent)
public float getLayoutAlignmentY(Container parent)
public void addLayoutComponent(Object value, Component comp, Container c)
Layout
addLayoutComponent
in class Layout
value
- optional meta data information, like alignment orientationcomp
- the added component to the layoutc
- the parent containerpublic boolean isConstraintTracking()
Layout
isConstraintTracking
in class Layout
public Object getComponentConstraint(Component comp)
Layout
getComponentConstraint
in class Layout
comp
- the component whose constraint should be returnedpublic void removeLayoutComponent(Component comp)
Layout
removeLayoutComponent
in class Layout
comp
- the removed component from layoutpublic void invalidateLayout(Container target)
public Dimension getPreferredSize(Container parent)
Layout
getPreferredSize
in class Layout
parent
- the parent container