Lines Matching defs:pref
146 * @param pref the preferred size >= 0
150 public SizeRequirements(int min, int pref, int max, float a) {
152 preferred = pref;
227 int pref = (int) Math.min((long) totalAscent.preferred + (long) totalDescent.preferred, Integer.MAX_VALUE);
234 return new SizeRequirements(min, pref, max, alignment);
309 long pref = 0;
313 pref += children[i].preferred;
316 if (allocated >= pref) {
317 expandedTile(allocated, min, pref, max, children, offsets, spans, forward);
319 compressedTile(allocated, min, pref, max, children, offsets, spans, forward);
323 private static void compressedTile(int allocated, long min, long pref, long max,
329 float totalPlay = Math.min(pref - allocated, pref - min);
330 float factor = (pref - min == 0) ? 0.0f : totalPlay / (pref - min);
357 private static void expandedTile(int allocated, long min, long pref, long max,
363 float totalPlay = Math.min(allocated - pref, max - pref);
364 float factor = (max - pref == 0) ? 0.0f : totalPlay / (max - pref);