Heng Sin Low 2009-05-21 07:34:06 +00:00
parent 893c2ddba6
commit 94686ee053
1 changed files with 8 additions and 7 deletions

View File

@ -202,7 +202,7 @@ public class StringElement extends PrintElement
{ {
return m_ID; return m_ID;
} // getID } // getID
/** /**
* Get Original String * Get Original String
* @return original (may be null) * @return original (may be null)
@ -239,7 +239,7 @@ public class StringElement extends PrintElement
m_string_view = m_string_paper; m_string_view = m_string_paper;
} // translate } // translate
/************************************************************************** /**************************************************************************
* Layout and Calculate Size. * Layout and Calculate Size.
* Set p_width & p_height * Set p_width & p_height
@ -358,7 +358,7 @@ public class StringElement extends PrintElement
return true; return true;
} // calculateSize } // calculateSize
/************************************************************************** /**************************************************************************
* Get Drill Down value * Get Drill Down value
* @param relativePoint relative Point * @param relativePoint relative Point
@ -396,7 +396,7 @@ public class StringElement extends PrintElement
return null; return null;
} // getDrillAcross } // getDrillAcross
/************************************************************************** /**************************************************************************
* Paint/Print. * Paint/Print.
* Calculate actual Size. * Calculate actual Size.
@ -419,7 +419,7 @@ public class StringElement extends PrintElement
if (m_originalString != null) if (m_originalString != null)
translate(ctx); translate(ctx);
AttributedString aString = null; AttributedString aString = null;
AttributedCharacterIterator iter = null; AttributedCharacterIterator iter = null;
AttributedCharacterIterator iter2 = null; AttributedCharacterIterator iter2 = null;
float xPos = (float)location.x; float xPos = (float)location.x;
@ -448,7 +448,7 @@ public class StringElement extends PrintElement
if (iter.getBeginIndex() == iter.getEndIndex()) if (iter.getBeginIndex() == iter.getEndIndex())
continue; continue;
// Check for Tab (just first) and 16 bit characters // Check for Tab (just first) and 16 bit characters
int tabPos = -1; int tabPos = -1;
boolean is8Bit = true; boolean is8Bit = true;
@ -512,7 +512,7 @@ public class StringElement extends PrintElement
if (tabPos == -1) if (tabPos == -1)
{ {
layout = measurer.nextLayout(p_maxWidth); layout = measurer.nextLayout(p_maxWidth);
if (iter.getEndIndex() != measurer.nextOffset(p_maxWidth)) if (measurer.getPosition() < iter.getEndIndex())
fastDraw = false; fastDraw = false;
} }
else // tab else // tab
@ -551,6 +551,7 @@ public class StringElement extends PrintElement
g2D.setFont(m_font); g2D.setFont(m_font);
g2D.setPaint(m_paint); g2D.setPaint(m_paint);
g2D.drawString(iter, xPen, yPen); g2D.drawString(iter, xPen, yPen);
break;
} }
else else
{ {