< prev index next >
src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java
Print this page
*** 162,172 ****
titleW = lastIconBounds.x - titleX - gap;
} else {
if (lastIconBounds.x == 0) { // There are no icons
lastIconBounds.x = frame.getInsets().left;
}
! titleW = SwingUtilities2.stringWidth(frame, fm, title);
int minTitleX = lastIconBounds.x + lastIconBounds.width + gap;
if (xp != null) {
minTitleX += 2;
}
int availableWidth = systemLabel.getX() - gap - minTitleX;
--- 162,173 ----
titleW = lastIconBounds.x - titleX - gap;
} else {
if (lastIconBounds.x == 0) { // There are no icons
lastIconBounds.x = frame.getInsets().left;
}
! titleW = SwingUtilities2.getTextUIDrawing(frame)
! .getStringWidth(frame, fm, title);
int minTitleX = lastIconBounds.x + lastIconBounds.width + gap;
if (xp != null) {
minTitleX += 2;
}
int availableWidth = systemLabel.getX() - gap - minTitleX;
*** 190,207 ****
Prop.TEXTSHADOWOFFSET);
Color shadowColor = xp.getColor(this, Part.WP_WINDOW, State.ACTIVE,
Prop.TEXTSHADOWCOLOR, null);
if (shadowOffset != null && shadowColor != null) {
g.setColor(shadowColor);
! SwingUtilities2.drawString(frame, g, title,
titleX + shadowOffset.x,
baseline + shadowOffset.y);
}
}
}
g.setColor(isSelected ? selectedTextColor : notSelectedTextColor);
! SwingUtilities2.drawString(frame, g, title, titleX, baseline);
g.setFont(oldFont);
}
}
public Dimension getPreferredSize() {
--- 191,210 ----
Prop.TEXTSHADOWOFFSET);
Color shadowColor = xp.getColor(this, Part.WP_WINDOW, State.ACTIVE,
Prop.TEXTSHADOWCOLOR, null);
if (shadowOffset != null && shadowColor != null) {
g.setColor(shadowColor);
! SwingUtilities2.getTextUIDrawing(frame)
! .drawString(frame, g, title,
titleX + shadowOffset.x,
baseline + shadowOffset.y);
}
}
}
g.setColor(isSelected ? selectedTextColor : notSelectedTextColor);
! SwingUtilities2.getTextUIDrawing(frame)
! .drawString(frame, g, title, titleX, baseline);
g.setFont(oldFont);
}
}
public Dimension getPreferredSize() {
< prev index next >