Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P3
-
Resolution: Fixed
-
Affects Version/s: 1.1.4
-
Fix Version/s: 1.2.0
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Resolved In Build:swing1.1
-
CPU:x86
-
OS:windows_nt
Description
==========================================================================
carlos.lucasius@canada 1998-03-19:
Bug reported by Corel (licensee) for JFC1.1 using JDK1.1.4 on WINNT4.0.
Corel: "Very critical bug for our product - requires immediate attention."
a. Setup to use the underline style for text formatting
b. Enter text
c. Press <enter> twice to create a couple of blank lines
d. Enter text again
f. Note that there are underscores characters left in the blank lines.
==========================================================================
carlos.lucasius@canada 1998-03-26:
Further to my request to Corel for more info (a test case), Corel responded
with the following fix to the problem (changed code is underlined):
In the file LabelView.java:
final void paintText(Graphics g, Shape a, int p0, int p1) {
Rectangle alloc = a.getBounds();
sync();
loadText(p0, p1);
int y = alloc.y + alloc.height - metrics.getDescent();
g.setFont(font);
g.setColor(fg);
Utilities.drawTabbedText(text, alloc.x, y, g, expander, p0);
if (underline && text != null && !text.toString().equals("\n")) {
y += 1; //------------------------------------------------
g.drawLine(alloc.x, y, alloc.x + alloc.width, y);
}
}
carlos.lucasius@canada 1998-03-19:
Bug reported by Corel (licensee) for JFC1.1 using JDK1.1.4 on WINNT4.0.
Corel: "Very critical bug for our product - requires immediate attention."
a. Setup to use the underline style for text formatting
b. Enter text
c. Press <enter> twice to create a couple of blank lines
d. Enter text again
f. Note that there are underscores characters left in the blank lines.
==========================================================================
carlos.lucasius@canada 1998-03-26:
Further to my request to Corel for more info (a test case), Corel responded
with the following fix to the problem (changed code is underlined):
In the file LabelView.java:
final void paintText(Graphics g, Shape a, int p0, int p1) {
Rectangle alloc = a.getBounds();
sync();
loadText(p0, p1);
int y = alloc.y + alloc.height - metrics.getDescent();
g.setFont(font);
g.setColor(fg);
Utilities.drawTabbedText(text, alloc.x, y, g, expander, p0);
if (underline && text != null && !text.toString().equals("\n")) {
y += 1; //------------------------------------------------
g.drawLine(alloc.x, y, alloc.x + alloc.width, y);
}
}