API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. SpringLayout View Source
Author(s)
Philip Milne
Scott Violet
Joe Winchester
Since
1.4
Version
1.26 04/07/06
Serial
Hierarchy
 Object
      SpringLayout
Implements
 LayoutManager2
Subclasses
Description
public class SpringLayout
  A SpringLayout lays out the children of its associated container according to a set of constraints.
Constructors
public SpringLayout ()
Constructs a new SpringLayout.
Methods
Hide/Show inherited methods
public void addLayoutComponent (Component component, Object constraints) [Specified in LayoutManager2]
  If constraints is an instance of SpringLayout.Constraints, associates the constraints with the specified component.
public void addLayoutComponent (String name, Component c)
Has no effect, since this layout manager does not use a per-component string.
public Spring getConstraint (String edgeName, Component c)
  Returns the spring controlling the distance between the specified edge of the component and the top or left edge of its parent.
public Constraints getConstraints (Component c)
  Returns the constraints for the specified component.
public float getLayoutAlignmentX (Container p) [Specified in LayoutManager2]
Returns 0.5f (centered).
public float getLayoutAlignmentY (Container p) [Specified in LayoutManager2]
Returns 0.5f (centered).
public void invalidateLayout (Container p) [Specified in LayoutManager2]
pack-private boolean isCyclic (Spring s)
public void layoutContainer (Container parent)
public Dimension maximumLayoutSize (Container parent) [Specified in LayoutManager2]
public Dimension minimumLayoutSize (Container parent)
public Dimension preferredLayoutSize (Container parent)
public void putConstraint (String e1, Component c1, int pad, String e2, Component c2)
  Links edge e1 of component c1 to edge e2 of component c2, with a fixed distance between the edges.
public void putConstraint (String e1, Component c1, Spring s, String e2, Component c2)
  Links edge e1 of component c1 to edge e2 of component c2.
public void removeLayoutComponent (Component c)
  Removes the constraints associated with the specified component.
Fields
Hide/Show inherited fields
publicfinalstatic String BASELINE = "Baseline"
  Specifies the baseline of a component.
publicfinalstatic String EAST = "East"
Specifies the right edge of a component's bounding rectangle.
publicfinalstatic String HEIGHT = "Height"
  Specifies the height of a component's bounding rectangle.
publicfinalstatic String HORIZONTAL_CENTER = "HorizontalCenter"
  Specifies the horizontal center of a component's bounding rectangle.
publicfinalstatic String NORTH = "North"
Specifies the top edge of a component's bounding rectangle.
publicfinalstatic String SOUTH = "South"
Specifies the bottom edge of a component's bounding rectangle.
publicfinalstatic String VERTICAL_CENTER = "VerticalCenter"
  Specifies the vertical center of a component's bounding rectangle.
publicfinalstatic String WEST = "West"
Specifies the left edge of a component's bounding rectangle.
publicfinalstatic String WIDTH = "Width"
  Specifies the width of a component's bounding rectangle.
Nested Classes
  SpringLayout.Constraints
A Constraints object holds the constraints that govern the way a component's size and position change in a container controlled by a SpringLayout.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar