100
101 @Override
102 protected double computeMaxHeight(double width) {
103 return computePrefHeight(width);
104 }
105
106 @Override
107 protected double computePrefHeight(double width) {
108 return flow.isVertical() ? (c.getIndex() == 29 ? 100 : 25) : (c.getIndex() == 29 ? 200 : 100);
109 }
110 });
111 flow.setCellCount(100);
112 flow.resize(300, 300);
113 pulse();
114 // Need a second pulse() call is because this parent can be made
115 // "layout" dirty again by its children
116 pulse();
117 }
118
119 private void pulse() {
120 // flow.impl_processCSS(true);
121 flow.layout();
122 }
123
124 /**
125 * Asserts that the items in the control LinkedList and the ones in the
126 * list are exactly the same.
127 */
128 private void assertMatch(List<IndexedCell> control, AbstractList<IndexedCell> list) {
129 assertEquals("The control and list did not have the same sizes. " +
130 "Expected " + control.size() + " but was " + list.size(),
131 control.size(), list.size());
132 int index = 0;
133 Iterator<IndexedCell> itr = control.iterator();
134 while (itr.hasNext()) {
135 IndexedCell cell = itr.next();
136 IndexedCell cell2 = (IndexedCell)list.get(index);
137 assertSame("The control and list did not have the same item at " +
138 "index " + index + ". Expected " + cell + " but was " + cell2,
139 cell, cell2);
140 index++;
|
100
101 @Override
102 protected double computeMaxHeight(double width) {
103 return computePrefHeight(width);
104 }
105
106 @Override
107 protected double computePrefHeight(double width) {
108 return flow.isVertical() ? (c.getIndex() == 29 ? 100 : 25) : (c.getIndex() == 29 ? 200 : 100);
109 }
110 });
111 flow.setCellCount(100);
112 flow.resize(300, 300);
113 pulse();
114 // Need a second pulse() call is because this parent can be made
115 // "layout" dirty again by its children
116 pulse();
117 }
118
119 private void pulse() {
120 flow.layout();
121 }
122
123 /**
124 * Asserts that the items in the control LinkedList and the ones in the
125 * list are exactly the same.
126 */
127 private void assertMatch(List<IndexedCell> control, AbstractList<IndexedCell> list) {
128 assertEquals("The control and list did not have the same sizes. " +
129 "Expected " + control.size() + " but was " + list.size(),
130 control.size(), list.size());
131 int index = 0;
132 Iterator<IndexedCell> itr = control.iterator();
133 while (itr.hasNext()) {
134 IndexedCell cell = itr.next();
135 IndexedCell cell2 = (IndexedCell)list.get(index);
136 assertSame("The control and list did not have the same item at " +
137 "index " + index + ". Expected " + cell + " but was " + cell2,
138 cell, cell2);
139 index++;
|