Lines Matching refs:pref

216     // Used by prepare, indicates min, pref or max isn't going to be used.
337 private static void checkSize(int min, int pref, int max,
340 if (!isComponentSpring && pref < 0) {
343 checkResizeType(pref, true);
346 checkLessThan(min, pref);
347 checkLessThan(pref, max);
361 "Following is not met: min<=pref<=max");
1051 // Step 4: (for min/pref/max size calculations only) calculate the
1262 * Spring consists of a range: min, pref and max, a value some where in
1264 * min/max/pref. If the min/pref/max has internally changes, or needs
1271 private int pref;
1277 min = pref = max = UNSET;
1345 if (pref == UNSET) {
1346 pref = constrain(calculatePreferredSize(axis));
1348 return pref;
1378 * Resets the cached min/max/pref.
1381 size = min = pref = max = UNSET;
1405 int pref = getPreferredSize(axis);
1406 return (min != pref || pref != getMaximumSize(axis));
1468 * &lt;= {@code pref} &lt;= {@code max}.
1516 * @param pref the preferred size or one of {@code DEFAULT_SIZE} or
1522 public Group addComponent(Component component, int min, int pref,
1524 return addSpring(new ComponentSpring(component, min, pref, max));
1543 * @param pref the preferred size of the gap
1549 public Group addGap(int min, int pref, int max) {
1550 return addSpring(new GapSpring(min, pref, max));
1700 // Clear cached pref/min/max.
1723 // Clear cached pref/min/max.
1815 int pref, int max) {
1817 component, min, pref, max);
1829 * @param pref the preferred size or one of {@code DEFAULT_SIZE} or
1836 Component component, int min, int pref, int max) {
1837 super.addComponent(component, min, pref, max);
1854 public SequentialGroup addGap(int min, int pref, int max) {
1855 return (SequentialGroup)super.addGap(min, pref, max);
1885 * @param pref the preferred size of the grap; one of
1896 JComponent comp2, ComponentPlacement type, int pref,
1905 checkPreferredGapValues(pref, max);
1907 comp1, comp2, type, pref, max));
1944 * @param pref the preferred size of the grap; one of
1956 int pref, int max) {
1964 checkPreferredGapValues(pref, max);
1967 type, pref, max));
1993 * @param pref the preferred size; one of {@code DEFAULT_SIZE} or a
1999 public SequentialGroup addContainerGap(int pref, int max) {
2000 if ((pref < 0 && pref != DEFAULT_SIZE) ||
2002 (pref >= 0 && max >= 0 && pref > max)) {
2005 "or >= 0 and pref <= max");
2009 new ContainerAutoPreferredGapSpring(pref, max));
2017 int pref = getPreferredSize(axis);
2018 if (size == pref) {
2031 // Adjust between min/pref
2046 // 1. Calculate the resizability of each spring (pref - min or
2047 // max - pref) into a list.
2050 // to give them (pref - size) / resizeCount
2335 private void checkPreferredGapValues(int pref, int max) {
2336 if ((pref < 0 && pref != DEFAULT_SIZE && pref != PREFERRED_SIZE) ||
2338 (pref >= 0 && max >= 0 && pref > max)) {
2341 "PREFERRED_SIZE, or >= 0 and pref <= max");
2353 // Delta, one of pref - min or max - pref.
2482 public ParallelGroup addComponent(Component component, int min, int pref,
2484 return (ParallelGroup)super.addComponent(component, min, pref, max);
2490 public ParallelGroup addGap(int pref) {
2491 return (ParallelGroup)super.addGap(pref);
2497 public ParallelGroup addGap(int min, int pref, int max) {
2498 return (ParallelGroup)super.addGap(min, pref, max);
2542 * @param pref the preferred size
2549 Alignment alignment, int min, int pref, int max) {
2552 min, pref, max);
2937 // min/pref/max are either a value >= 0 or one of
2940 private final int pref;
2949 private ComponentSpring(Component component, int min, int pref,
2957 checkSize(min, pref, max, true);
2961 this.pref = pref;
2980 int pref = calculateNonlinkedPreferredSize(axis);
2982 return Math.min(max, Math.max(min, pref));
3015 if (pref >= 0) {
3016 return pref;
3018 assert (pref == DEFAULT_SIZE || pref == PREFERRED_SIZE);
3114 private final int pref;
3118 ComponentPlacement type, int pref, int max) {
3122 this.pref = pref;
3131 if (pref == DEFAULT_SIZE || pref == PREFERRED_SIZE) {
3136 return Math.min(max, Math.max(min, pref));
3169 private final int pref;
3172 GapSpring(int min, int pref, int max) {
3173 checkSize(min, pref, max, false);
3175 this.pref = pref;
3187 return pref;
3216 private final int pref;
3223 this.pref = PREFERRED_SIZE;
3228 AutoPreferredGapSpring(int pref, int max) {
3229 this.pref = pref;
3233 AutoPreferredGapSpring(ComponentPlacement type, int pref, int max) {
3235 this.pref = pref;
3359 if (pref == PREFERRED_SIZE || pref == DEFAULT_SIZE) {
3362 return Math.max(size, pref);
3422 ContainerAutoPreferredGapSpring(int pref, int max) {
3423 super(pref, max);