net.miginfocom.swt
public final class MigLayout extends Layout implements Externalizable
Read the documentation that came with this layout manager for information on usage.
Constructor Summary | |
---|---|
MigLayout() Constructor with no constraints. | |
MigLayout(String layoutConstraints) Constructor. | |
MigLayout(String layoutConstraints, String colConstraints) Constructor. | |
MigLayout(String layoutConstraints, String colConstraints, String rowConstraints) Constructor. | |
MigLayout(LC layoutConstraints) Constructor. | |
MigLayout(LC layoutConstraints, AC colConstraints) Constructor. | |
MigLayout(LC layoutConstraints, AC colConstraints, AC rowConstraints) Constructor. |
Method Summary | |
---|---|
void | addLayoutCallback(LayoutCallback callback) Adds the callback function that will be called at different stages of the layout cylce. |
protected Point | computeSize(Composite parent, int wHint, int hHint, boolean flushCache) |
protected boolean | flushCache(Control control) |
Object | getColumnConstraints() Returns the column layout constraints either as a String or AC. |
Map<Control,Object> | getConstraintMap() Returns a shallow copy of the constraints map. |
float | getLayoutAlignmentX(Composite parent) |
float | getLayoutAlignmentY(Composite parent) |
Object | getLayoutConstraints() Returns layout constraints eighter as a String or LC depending what was sent in
to the constructor or set with setLayoutConstraints. |
Object | getRowConstraints() Returns the row layout constraints as a String representation. |
boolean | isManagingComponent(Control c) Returns if this layout manager is currently managing this component. |
protected void | layout(Composite parent, boolean flushCache) |
void | readExternal(ObjectInput in) |
void | removeLayoutCallback(LayoutCallback callback) Removes the callback if it exists. |
void | setColumnConstraints(Object constr) Sets the column layout constraints for the layout manager instance as a String.
|
void | setConstraintMap(Map<Control,Object> map) Sets the constraints map. |
void | setLayoutConstraints(Object s) Sets the layout constraints for the layout manager instance as a String.
|
void | setRowConstraints(Object constr) Sets the row layout constraints for the layout manager instance as a String.
|
void | writeExternal(ObjectOutput out) |
Parameters: layoutConstraints The constraints that concern the whole layout. null
will be treated as "".
Parameters: 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 "".
Parameters: 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 "".
Parameters: layoutConstraints The constraints that concern the whole layout. null
will be treated as an empty cosntraint.
Parameters: layoutConstraints The constraints that concern the whole layout. null
will be treated as an empty cosntraint. colConstraints The constraints for the columns in the grid. null
will be treated as an empty constraint.
Parameters: layoutConstraints The constraints that concern the whole layout. null
will be treated as an empty cosntraint. 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.
Parameters: callback The callback. Not null
.
String
or AC.Returns: The column constraints eighter as a String
or LC depending what was sent in
to the constructor or set with setLayoutConstraints. Never null
.
Returns: A shallow copy of the constraints map. Never null
.
String
or LC depending what was sent in
to the constructor or set with setLayoutConstraints.Returns: The layout constraints eighter as a String
or LC depending what was sent in
to the constructor or set with setLayoutConstraints. Never null
.
See the class JavaDocs for information on how this string is formatted.
Returns: The row layout constraints as a String representation. Never null
.
Parameters: c The component to check. If null
then false
will be returned.
Returns: If this layout manager is currently managing this component.
Parameters: callback The callback. May be null
.
See the class JavaDocs for information on how this string is formatted.
Parameters: constr The column layout constraints as a String representation. null
is converted to ""
for storage.
Throws: RuntimeException if the constaint was not valid.
Parameters: map The map. Will be copied.
See the class JavaDocs for information on how this string is formatted.
Parameters: s The layout constraints as a String representation. null
is converted to ""
for storage.
Throws: RuntimeException if the constaint was not valid.
See the class JavaDocs for information on how this string is formatted.
Parameters: constr The row layout constraints as a String representation. null
is converted to ""
for storage.
Throws: RuntimeException if the constaint was not valid.