|
|
@ -254,6 +254,7 @@ public class WindowsTitlePane extends CustomTitlePane { |
|
|
|
private void installSubcomponents() { |
|
|
|
private void installSubcomponents() { |
|
|
|
titleLabel = new JLabel(); |
|
|
|
titleLabel = new JLabel(); |
|
|
|
titleLabel.setHorizontalAlignment(JLabel.LEFT); |
|
|
|
titleLabel.setHorizontalAlignment(JLabel.LEFT); |
|
|
|
|
|
|
|
titleLabel.setFont(getFont()); |
|
|
|
|
|
|
|
|
|
|
|
createIcons(); |
|
|
|
createIcons(); |
|
|
|
createActions(); |
|
|
|
createActions(); |
|
|
@ -311,6 +312,12 @@ public class WindowsTitlePane extends CustomTitlePane { |
|
|
|
setFont(UIManager.getFont("InternalFrame.titleFont", getLocale())); |
|
|
|
setFont(UIManager.getFont("InternalFrame.titleFont", getLocale())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void setFont(final Font font) { |
|
|
|
|
|
|
|
super.setFont(font); |
|
|
|
|
|
|
|
if (titleLabel != null) titleLabel.setFont(font); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JButton createWindowIcon() { |
|
|
|
protected JButton createWindowIcon() { |
|
|
|
JButton button = new JButton(); |
|
|
|
JButton button = new JButton(); |
|
|
|
button.putClientProperty("JButton.noShadowOverwrite", true); |
|
|
|
button.putClientProperty("JButton.noShadowOverwrite", true); |
|
|
@ -702,7 +709,7 @@ public class WindowsTitlePane extends CustomTitlePane { |
|
|
|
|
|
|
|
|
|
|
|
private int computeHeight() { |
|
|
|
private int computeHeight() { |
|
|
|
if (hideTitleBar()) return 0; |
|
|
|
if (hideTitleBar()) return 0; |
|
|
|
FontMetrics fm = rootPane.getFontMetrics(getFont()); |
|
|
|
FontMetrics fm = titleLabel.getFontMetrics(titleLabel.getFont()); |
|
|
|
int height = fm.getHeight() + 7; |
|
|
|
int height = fm.getHeight() + 7; |
|
|
|
if (menuBarStealer.hasMenuBar()) { |
|
|
|
if (menuBarStealer.hasMenuBar()) { |
|
|
|
height = Math.max(height, menuBarStealer.getMenuBar().getMinimumSize().height); |
|
|
|
height = Math.max(height, menuBarStealer.getMenuBar().getMinimumSize().height); |
|
|
|