All Packages  This Package  Class Hierarchy  Class Search  Index

Inner Class matthew.awt.StrutLayout.StrutConstraint
java.lang.Object
   |
   +----matthew.awt.StrutLayout.StrutConstraint

  Summary

public static final class  StrutLayout.StrutConstraint
     extends java.lang.Object
{
          // Fields 5
     public int direction;
     public int fromConnector;
     public int length;
     public Component parent;
     public int toConnector;

          // Constructors 2
     public StrutConstraint(Component, int, int, int);
     public StrutConstraint(Component, int, int, int, int);

}

Represents a strut constraint placed on the location of a component. Each component has nine logical connector points which may be connected by struts to other components.

Each strut goes from a parent component to a child and has a set direction and length.

Example:

  panel.add (nameField, new StrutLayout.StrutConstraint
             (nameLabel, StrutLayout.MID_RIGHT, StrutLayout.MID_LEFT,
              StrutLayout.EAST));
  

See Also: addLayoutComponent, StrutLayout.Strut




  Fields

· parent

Summary  |  Top

   public Component parent


· fromConnector

Summary  |  Top
   public int fromConnector


· toConnector

Summary  |  Top
   public int toConnector


· length

Summary  |  Top
   public int length


· direction

Summary  |  Top
   public int direction


  Constructors

· StrutConstraint

Summary  |  Top

   public StrutConstraint(Component parent, 
                          int fromConnector, 
                          int toConnector, 
                          int direction, 
                          int length) 

Create a strut between connection points on a parent and a child component.

Parameter Description
parent The component the connector starts from.
fromConnector The connector point on the parent that the strut is connected to (eg. TOP_LEFT).
toConnector The connector point on the child that the strut is connected to (eg. TOP_RIGHT).
direction The direction that the strut points (eg. NORTH).
length The length (in pixels) of the strut along the x and/or y axes. Thus a NORTH_WEST strut of length 5 will actually extend 7 pixels diagonally, while a NORTH strut will extend 5 pixels vertically.

See Also: StrutConstraint, StrutLayout.VectorConstraint, TOP_LEFT, MID_TOP, TOP_RIGHT, MID_RIGHT, BOTTOM_RIGHT, MID_BOTTOM, BOTTOM_LEFT, MID_LEFT, CENTER, NORTH, SOUTH, EAST, WEST, NORTH_WEST, NORTH_EAST, SOUTH_WEST, SOUTH_EAST



· StrutConstraint

Summary  |  Top
   public StrutConstraint(Component parent, 
                          int fromConnector, 
                          int toConnector, 
                          int direction) 

Create a strut between connection points on a parent and a child component. The horizontal and/or vertical lengths of the strut are set to the default defined by getDefaultStrutLength().

Parameter Description
parent The component the connector starts from.
fromConnector The connector point on the parent component that the strut is connected to (eg. TOP_LEFT).
toConnector The connector point on the child component that the strut is connected to (eg. TOP_RIGHT).
direction The direction that the strut extends (eg. SOUTH).

See Also: StrutConstraint, getDefaultStrutLength, StrutLayout.VectorConstraint, TOP_LEFT, MID_TOP, TOP_RIGHT, MID_RIGHT, BOTTOM_RIGHT, MID_BOTTOM, BOTTOM_LEFT, MID_LEFT, CENTER, NORTH, SOUTH, EAST, WEST, NORTH_WEST, NORTH_EAST, SOUTH_WEST, SOUTH_EAST



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7