66 |
import javax.swing.JMenuItem; |
import javax.swing.JMenuItem; |
67 |
import javax.swing.SwingConstants; |
import javax.swing.SwingConstants; |
68 |
import javax.swing.SwingUtilities; |
import javax.swing.SwingUtilities; |
|
import javax.swing.UIDefaults; |
|
69 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
70 |
|
|
71 |
/** |
/** |
717 |
*/ |
*/ |
718 |
protected void installDefaults() |
protected void installDefaults() |
719 |
{ |
{ |
720 |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
title.setFont(UIManager.getFont("InternalFrame.titleFont")); |
721 |
|
selectedTextColor = UIManager.getColor("InternalFrame.activeTitleForeground"); |
722 |
title.setFont(defaults.getFont("InternalFrame.titleFont")); |
selectedTitleColor = UIManager.getColor("InternalFrame.activeTitleBackground"); |
723 |
selectedTextColor = defaults.getColor("InternalFrame.activeTitleForeground"); |
notSelectedTextColor = UIManager.getColor("InternalFrame.inactiveTitleForeground"); |
724 |
selectedTitleColor = defaults.getColor("InternalFrame.activeTitleBackground"); |
notSelectedTitleColor = UIManager.getColor("InternalFrame.inactiveTitleBackground"); |
|
notSelectedTextColor = defaults.getColor("InternalFrame.inactiveTitleForeground"); |
|
|
notSelectedTitleColor = defaults.getColor("InternalFrame.inactiveTitleBackground"); |
|
725 |
|
|
726 |
closeIcon = UIManager.getIcon("InternalFrame.closeIcon"); |
closeIcon = UIManager.getIcon("InternalFrame.closeIcon"); |
727 |
iconIcon = UIManager.getIcon("InternalFrame.iconifyIcon"); |
iconIcon = UIManager.getIcon("InternalFrame.iconifyIcon"); |
768 |
*/ |
*/ |
769 |
protected void setButtonIcons() |
protected void setButtonIcons() |
770 |
{ |
{ |
771 |
if (closeIcon != null) |
if (closeIcon != null && closeButton != null) |
772 |
closeButton.setIcon(closeIcon); |
closeButton.setIcon(closeIcon); |
773 |
if (iconIcon != null) |
if (iconIcon != null && iconButton != null) |
774 |
iconButton.setIcon(iconIcon); |
iconButton.setIcon(iconIcon); |
775 |
if (maxIcon != null) |
if (maxIcon != null && maxButton != null) |
776 |
maxButton.setIcon(maxIcon); |
maxButton.setIcon(maxIcon); |
777 |
} |
} |
778 |
|
|
898 |
*/ |
*/ |
899 |
protected void paintTitleBackground(Graphics g) |
protected void paintTitleBackground(Graphics g) |
900 |
{ |
{ |
901 |
|
if (!isOpaque()) |
902 |
|
return; |
903 |
|
|
904 |
Color saved = g.getColor(); |
Color saved = g.getColor(); |
905 |
Dimension dims = getSize(); |
Dimension dims = getSize(); |
906 |
|
|