478 }
479
480 protected int inv(int i) {
481 return getHeightFromBaseLine(i);
482 }
483 };
484 }
485
486 private Spring relativeBaselineToHeight(Spring s) {
487 return new Spring.SpringMap(s) {
488 protected int map(int i) {
489 return getHeightFromBaseLine(i);
490 }
491
492 protected int inv(int i) {
493 return getBaselineFromHeight(i);
494 }
495 };
496 }
497
498 private boolean defined(List history, String s1, String s2) {
499 return history.contains(s1) && history.contains(s2);
500 }
501
502 /**
503 * Sets the <code>x</code> property,
504 * which controls the <code>x</code> value
505 * of a component's location.
506 *
507 * @param x the spring controlling the <code>x</code> value
508 * of a component's location
509 *
510 * @see #getX
511 * @see SpringLayout.Constraints
512 */
513 public void setX(Spring x) {
514 this.x = x;
515 pushConstraint(WEST, x, true);
516 }
517
518 /**
|
478 }
479
480 protected int inv(int i) {
481 return getHeightFromBaseLine(i);
482 }
483 };
484 }
485
486 private Spring relativeBaselineToHeight(Spring s) {
487 return new Spring.SpringMap(s) {
488 protected int map(int i) {
489 return getHeightFromBaseLine(i);
490 }
491
492 protected int inv(int i) {
493 return getBaselineFromHeight(i);
494 }
495 };
496 }
497
498 private boolean defined(List<?> history, String s1, String s2) {
499 return history.contains(s1) && history.contains(s2);
500 }
501
502 /**
503 * Sets the <code>x</code> property,
504 * which controls the <code>x</code> value
505 * of a component's location.
506 *
507 * @param x the spring controlling the <code>x</code> value
508 * of a component's location
509 *
510 * @see #getX
511 * @see SpringLayout.Constraints
512 */
513 public void setX(Spring x) {
514 this.x = x;
515 pushConstraint(WEST, x, true);
516 }
517
518 /**
|