src/java.desktop/share/classes/javax/swing/GroupLayout.java

Print this page




3374 
3375         String getMatchDescription() {
3376             return (matches == null) ? "" : matches.toString();
3377         }
3378 
3379         public String toString() {
3380             return super.toString() + getMatchDescription();
3381         }
3382 
3383         @Override
3384         boolean willHaveZeroSize(boolean treatAutopaddingAsZeroSized) {
3385             return treatAutopaddingAsZeroSized;
3386         }
3387     }
3388 
3389 
3390     /**
3391      * Represents two springs that should have autopadding inserted between
3392      * them.
3393      */
3394     private final static class AutoPreferredGapMatch {
3395         public final ComponentSpring source;
3396         public final ComponentSpring target;
3397 
3398         AutoPreferredGapMatch(ComponentSpring source, ComponentSpring target) {
3399             this.source = source;
3400             this.target = target;
3401         }
3402 
3403         private String toString(ComponentSpring spring) {
3404             return spring.getComponent().getName();
3405         }
3406 
3407         public String toString() {
3408             return "[" + toString(source) + "-" + toString(target) + "]";
3409         }
3410     }
3411 
3412 
3413     /**
3414      * An extension of AutopaddingSpring used for container level padding.




3374 
3375         String getMatchDescription() {
3376             return (matches == null) ? "" : matches.toString();
3377         }
3378 
3379         public String toString() {
3380             return super.toString() + getMatchDescription();
3381         }
3382 
3383         @Override
3384         boolean willHaveZeroSize(boolean treatAutopaddingAsZeroSized) {
3385             return treatAutopaddingAsZeroSized;
3386         }
3387     }
3388 
3389 
3390     /**
3391      * Represents two springs that should have autopadding inserted between
3392      * them.
3393      */
3394     private static final class AutoPreferredGapMatch {
3395         public final ComponentSpring source;
3396         public final ComponentSpring target;
3397 
3398         AutoPreferredGapMatch(ComponentSpring source, ComponentSpring target) {
3399             this.source = source;
3400             this.target = target;
3401         }
3402 
3403         private String toString(ComponentSpring spring) {
3404             return spring.getComponent().getName();
3405         }
3406 
3407         public String toString() {
3408             return "[" + toString(source) + "-" + toString(target) + "]";
3409         }
3410     }
3411 
3412 
3413     /**
3414      * An extension of AutopaddingSpring used for container level padding.