/[classpath]/classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.3 by gnu_andrew, Wed Nov 2 00:44:00 2005 UTC revision 1.1.2.4 by gnu_andrew, Sun Nov 27 21:00:41 2005 UTC
# Line 55  import javax.swing.JLabel; Line 55  import javax.swing.JLabel;
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    
# Line 260  public class MetalInternalFrameTitlePane Line 259  public class MetalInternalFrameTitlePane
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(),
# Line 351  public class MetalInternalFrameTitlePane Line 349  public class MetalInternalFrameTitlePane
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(),
# Line 393  public class MetalInternalFrameTitlePane Line 397  public class MetalInternalFrameTitlePane
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;

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26