while (ts != -1) {
this.currentLineArea.align(this.align);
this.addLineArea(this.currentLineArea);
+
this.currentLineArea = new
LineArea(fontState, lineHeight, halfLeading,
- allocationWidth, startIndent, endIndent);
+ allocationWidth, startIndent, endIndent,
+ currentLineArea);
if (currentHeight + currentLineArea.getHeight() >
this.maxHeight) {
return ts;
currentLineArea = new LineArea(fontState, lineHeight,
halfLeading, allocationWidth,
startIndent + textIndent,
- endIndent);
+ endIndent,null);
}
public int getEndIndent() {
public LineArea(FontState fontState, int lineHeight, int
halfLeading, int allocationWidth, int startIndent,
- int endIndent) {
+ int endIndent,LineArea prevLineArea) {
super(fontState);
this.currentFontState = fontState;
this.startIndent = startIndent;
this.endIndent = endIndent;
+ if(prevLineArea != null){
+ Enumeration e=prevLineArea.pendingAreas.elements();
+ while( e.hasMoreElements() ){
+ pendingAreas.addElement(e.nextElement());
+ }
+ pendingWidth=prevLineArea.getPendingWidth();
+ }
}
public void render(Renderer renderer) {