55 |
import javax.swing.JMenu; |
import javax.swing.JMenu; |
56 |
import javax.swing.SwingConstants; |
import javax.swing.SwingConstants; |
57 |
import javax.swing.SwingUtilities; |
import javax.swing.SwingUtilities; |
|
import javax.swing.UIDefaults; |
|
58 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
59 |
import javax.swing.plaf.basic.BasicInternalFrameTitlePane; |
import javax.swing.plaf.basic.BasicInternalFrameTitlePane; |
60 |
|
|
259 |
notSelectedTextColor = MetalLookAndFeel.getInactiveControlTextColor(); |
notSelectedTextColor = MetalLookAndFeel.getInactiveControlTextColor(); |
260 |
notSelectedTitleColor = MetalLookAndFeel.getWindowTitleInactiveBackground(); |
notSelectedTitleColor = MetalLookAndFeel.getWindowTitleInactiveBackground(); |
261 |
|
|
262 |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
paletteTitleHeight = UIManager.getInt("InternalFrame.paletteTitleHeight"); |
263 |
paletteTitleHeight = defaults.getInt("InternalFrame.paletteTitleHeight"); |
paletteCloseIcon = UIManager.getIcon("InternalFrame.paletteCloseIcon"); |
|
paletteCloseIcon = defaults.getIcon("InternalFrame.paletteCloseIcon"); |
|
264 |
minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16); |
minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16); |
265 |
|
|
266 |
title = new JLabel(frame.getTitle(), |
title = new JLabel(frame.getTitle(), |
349 |
{ |
{ |
350 |
Color savedColor = g.getColor(); |
Color savedColor = g.getColor(); |
351 |
Rectangle b = SwingUtilities.getLocalBounds(this); |
Rectangle b = SwingUtilities.getLocalBounds(this); |
352 |
g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); |
|
353 |
g.fillRect(b.x, b.y, b.width, b.height); |
if (UIManager.get("InternalFrame.activeTitleGradient") != null |
354 |
|
&& frame.isSelected()) |
355 |
|
{ |
356 |
|
MetalUtils.paintGradient(g, b.x, b.y, b.width, b.height, |
357 |
|
SwingConstants.VERTICAL, |
358 |
|
"InternalFrame.activeTitleGradient"); |
359 |
|
} |
360 |
MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width |
MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width |
361 |
- paletteCloseIcon.getIconWidth() - 13, b.height - 5, |
- paletteCloseIcon.getIconWidth() - 13, b.height - 5, |
362 |
MetalLookAndFeel.getPrimaryControlHighlight(), |
MetalLookAndFeel.getPrimaryControlHighlight(), |
397 |
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1); |
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1); |
398 |
|
|
399 |
// draw the metal pattern |
// draw the metal pattern |
400 |
|
if (UIManager.get("InternalFrame.activeTitleGradient") != null |
401 |
|
&& frame.isSelected()) |
402 |
|
{ |
403 |
|
MetalUtils.paintGradient(g, 0, 0, getWidth(), getHeight(), |
404 |
|
SwingConstants.VERTICAL, |
405 |
|
"InternalFrame.activeTitleGradient"); |
406 |
|
} |
407 |
|
|
408 |
Rectangle b = title.getBounds(); |
Rectangle b = title.getBounds(); |
409 |
int startX = b.x + b.width + 5; |
int startX = b.x + b.width + 5; |
410 |
int endX = startX; |
int endX = startX; |