Lines Matching refs:constraints

38  * according to a set of constraints.
64 * has exactly one set of constraints
66 * These constraints are represented by
69 * <code>SpringLayout</code> creates constraints
83 * a component's constraints in several ways.
99 * with a component by specifying the constraints object
127 * of the <code>SpringLayout</code> when presented with constraints linking
145 * Depending on the constraints you use,
165 * creating the constraints implied by the other layout managers.
168 * is linear in the number of constraints (and/or components).
256 * constraints that govern the way a component's size and position
290 * a constraints object is registered with a SpringLayout object.]
950 * Removes the constraints associated with the specified component.
990 * If <code>constraints</code> is an instance of
992 * associates the constraints with the specified component.
995 * @param constraints the component's constraints
999 public void addLayoutComponent(Component component, Object constraints) {
1000 if (constraints instanceof Constraints) {
1001 putConstraints(component, (Constraints)constraints);
1084 private Constraints applyDefaults(Component c, Constraints constraints) {
1085 if (constraints == null) {
1086 constraints = new Constraints();
1088 if (constraints.c == null) {
1089 constraints.c = c;
1091 if (constraints.horizontalHistory.size() < 2) {
1092 applyDefaults(constraints, WEST, Spring.constant(0), WIDTH,
1093 Spring.width(c), constraints.horizontalHistory);
1095 if (constraints.verticalHistory.size() < 2) {
1096 applyDefaults(constraints, NORTH, Spring.constant(0), HEIGHT,
1097 Spring.height(c), constraints.verticalHistory);
1099 return constraints;
1102 private void applyDefaults(Constraints constraints, String name1,
1106 constraints.setConstraint(name1, spring1);
1107 constraints.setConstraint(name2, spring2);
1111 if (constraints.getConstraint(name2) == null) {
1112 constraints.setConstraint(name2, spring2);
1115 constraints.setConstraint(name1, spring1);
1122 private void putConstraints(Component component, Constraints constraints) {
1123 componentConstraints.put(component, applyDefaults(component, constraints));
1127 * Returns the constraints for the specified component.
1131 * this method does not clone constraints.
1132 * If no constraints
1135 * returns a default constraints object positioned at
1140 * instead this method returns a constraints object
1144 * @param c the component whose constraints will be returned
1146 * @return the constraints for the specified component
1172 * constraints for a layout in any order. Proxies do, however,
1174 * the constraints of a layout. Such cycles are detected