|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.miginfocom.swing.MigLayout
public final class MigLayout
A very flexible layout manager.
Read the documentation that came with this layout manager for information on usage.
| Constructor Summary | |
|---|---|
MigLayout()
Constructor with no constraints. |
|
MigLayout(LC layoutConstraints)
Constructor. |
|
MigLayout(LC layoutConstraints,
AC colConstraints)
Constructor. |
|
MigLayout(LC layoutConstraints,
AC colConstraints,
AC rowConstraints)
Constructor. |
|
MigLayout(java.lang.String layoutConstraints)
Constructor. |
|
MigLayout(java.lang.String layoutConstraints,
java.lang.String colConstraints)
Constructor. |
|
MigLayout(java.lang.String layoutConstraints,
java.lang.String colConstraints,
java.lang.String rowConstraints)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addLayoutCallback(LayoutCallback callback)
Adds the callback function that will be called at different stages of the layout cylce. |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
|
void |
addLayoutComponent(java.lang.String s,
java.awt.Component comp)
|
java.lang.Object |
getColumnConstraints()
Returns the column layout constraints either as a String or AC. |
java.lang.Object |
getComponentConstraints(java.awt.Component comp)
Returns the component constraints as a String representation. |
java.util.Map<java.awt.Component,java.lang.Object> |
getConstraintMap()
Returns a shallow copy of the constraints map. |
float |
getLayoutAlignmentX(java.awt.Container parent)
|
float |
getLayoutAlignmentY(java.awt.Container parent)
|
java.lang.Object |
getLayoutConstraints()
Returns layout constraints either as a String or LC depending what was sent in
to the constructor or set with setLayoutConstraints(Object). |
java.lang.Object |
getRowConstraints()
Returns the row layout constraints as a String representation. |
void |
invalidateLayout(java.awt.Container target)
|
boolean |
isManagingComponent(java.awt.Component c)
Returns if this layout manager is currently managing this component. |
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
removeLayoutCallback(LayoutCallback callback)
Removes the callback if it exists. |
void |
removeLayoutComponent(java.awt.Component comp)
|
void |
setColumnConstraints(java.lang.Object constr)
Sets the column layout constraints for the layout manager instance as a String. |
void |
setComponentConstraints(java.awt.Component comp,
java.lang.Object constr)
Sets the component constraint for the component that already must be handled by this layout manager. |
void |
setConstraintMap(java.util.Map<java.awt.Component,java.lang.Object> map)
Sets the constraints map. |
void |
setLayoutConstraints(java.lang.Object constr)
Sets the layout constraints for the layout manager instance as a String. |
void |
setRowConstraints(java.lang.Object constr)
Sets the row layout constraints for the layout manager instance as a String. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MigLayout()
public MigLayout(java.lang.String layoutConstraints)
layoutConstraints - The constraints that concern the whole layout. null will be treated as "".
public MigLayout(java.lang.String layoutConstraints,
java.lang.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(java.lang.String layoutConstraints,
java.lang.String colConstraints,
java.lang.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.| Method Detail |
|---|
public java.lang.Object getLayoutConstraints()
String or LC depending what was sent in
to the constructor or set with setLayoutConstraints(Object).
String or LC depending what was sent in
to the constructor or set with setLayoutConstraints(Object). Never null.public void setLayoutConstraints(java.lang.Object constr)
See the class JavaDocs for information on how this string is formatted.
constr - The layout constraints as a String representation. null is converted to "" for storage.
java.lang.RuntimeException - if the constraint was not valid.public java.lang.Object getColumnConstraints()
String or AC.
String or LC depending what was sent in
to the constructor or set with setLayoutConstraints(Object). Never null.public void setColumnConstraints(java.lang.Object constr)
See the class JavaDocs for information on how this string is formatted.
constr - The column layout constraints as a String representation. null is converted to "" for storage.
java.lang.RuntimeException - if the constraint was not valid.public java.lang.Object getRowConstraints()
setRowConstraints(Object)
or sent into the constructor.
See the class JavaDocs for information on how this string is formatted.
null.public void setRowConstraints(java.lang.Object constr)
See the class JavaDocs for information on how this string is formatted.
constr - The row layout constraints as a String representation. null is converted to "" for storage.
java.lang.RuntimeException - if the constraint was not valid.public java.util.Map<java.awt.Component,java.lang.Object> getConstraintMap()
null.public void setConstraintMap(java.util.Map<java.awt.Component,java.lang.Object> map)
map - The map. Will be copied.public java.lang.Object getComponentConstraints(java.awt.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 CC
depending on what constraint was sent in when the component was added. May be null.
public void setComponentConstraints(java.awt.Component comp,
java.lang.Object constr)
See the class JavaDocs for information on how this string is formatted.
constr - The component constraints as a String or CC. null is ok.comp - The component to set the constraints for.
java.lang.RuntimeException - if the constraint was not valid.
java.lang.IllegalArgumentException - If the component is not handling the component.public boolean isManagingComponent(java.awt.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(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
maximumLayoutSize in interface java.awt.LayoutManager2public float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY in interface java.awt.LayoutManager2
public void addLayoutComponent(java.lang.String s,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManager
public void addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagerpublic void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||