summaryrefslogtreecommitdiff
path: root/javax/swing/text/FlowView.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/text/FlowView.java')
-rw-r--r--javax/swing/text/FlowView.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/javax/swing/text/FlowView.java b/javax/swing/text/FlowView.java
index 89fcc6fcd..3de95ed7f 100644
--- a/javax/swing/text/FlowView.java
+++ b/javax/swing/text/FlowView.java
@@ -524,6 +524,7 @@ public abstract class FlowView extends BoxView
*/
public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory vf)
{
+ layoutPool.removeUpdate(changes, a, vf);
strategy.removeUpdate(this, changes, getInsideAllocation(a));
layoutDirty = true;
}
@@ -539,6 +540,7 @@ public abstract class FlowView extends BoxView
*/
public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory vf)
{
+ layoutPool.changedUpdate(changes, a, vf);
strategy.changedUpdate(this, changes, getInsideAllocation(a));
layoutDirty = true;
}
@@ -597,12 +599,14 @@ public abstract class FlowView extends BoxView
protected SizeRequirements calculateMinorAxisRequirements(int axis,
SizeRequirements r)
{
- // We need to call super here so that the alignment is properly
- // calculated.
- SizeRequirements res = super.calculateMinorAxisRequirements(axis, r);
+ SizeRequirements res = r;
+ if (res == null)
+ res = new SizeRequirements();
res.minimum = (int) layoutPool.getMinimumSpan(axis);
- res.preferred = (int) layoutPool.getPreferredSpan(axis);
- res.maximum = (int) layoutPool.getMaximumSpan(axis);
+ res.preferred = Math.max(res.minimum,
+ (int) layoutPool.getMinimumSpan(axis));
+ res.maximum = Integer.MAX_VALUE;
+ res.alignment = 0.5F;
return res;
}
}