/[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.2 by gnu_andrew, Tue Sep 20 18:46:34 2005 UTC revision 1.1.2.3 by gnu_andrew, Wed Nov 2 00:44:00 2005 UTC
# Line 61  import javax.swing.plaf.basic.BasicInter Line 61  import javax.swing.plaf.basic.BasicInter
61    
62    
63  /**  /**
64   * The title pane for a {@link JInternalFrame}.  This can be displayed in two   * The title pane for a {@link JInternalFrame} (see
65   * styles: one for regular internal frames, and the other for "palette" style   * {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}).  This can
66   * internal frames.   * be displayed in two styles: one for regular internal frames, and the other
67     * for "palette" style internal frames.
68   */   */
69  public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane  public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
70  {  {
# Line 86  public class MetalInternalFrameTitlePane Line 87  public class MetalInternalFrameTitlePane
87            
88      /**      /**
89       * Handles <code>JInternalFrame.isPalette</code> property changes, with all       * Handles <code>JInternalFrame.isPalette</code> property changes, with all
90       * other propert changes being passed to the superclass.       * other property changes being passed to the superclass.
91       *       *
92       * @param e  the event.       * @param e  the event.
93       */       */
# Line 214  public class MetalInternalFrameTitlePane Line 215  public class MetalInternalFrameTitlePane
215       */       */
216      public void removeLayoutComponent(Component c)      public void removeLayoutComponent(Component c)
217      {      {
218          // Nothing to do here.
219      }      }
220    }    }
221    
# Line 234  public class MetalInternalFrameTitlePane Line 236  public class MetalInternalFrameTitlePane
236    protected int paletteTitleHeight;    protected int paletteTitleHeight;
237        
238    /** The label used to display the title for the internal frame. */    /** The label used to display the title for the internal frame. */
239    private JLabel title;    JLabel title;
240        
241    /**    /**
242     * Creates a new title pane for the specified frame.     * Creates a new title pane for the specified frame.
# Line 315  public class MetalInternalFrameTitlePane Line 317  public class MetalInternalFrameTitlePane
317        // do nothing            // do nothing    
318    }    }
319        
320      /**
321       * Adds the sub components of the title pane.
322       */
323    protected void addSubComponents()    protected void addSubComponents()
324    {    {
325      // FIXME:  this method is probably overridden to only add the required      // FIXME:  this method is probably overridden to only add the required
# Line 348  public class MetalInternalFrameTitlePane Line 353  public class MetalInternalFrameTitlePane
353      Rectangle b = SwingUtilities.getLocalBounds(this);      Rectangle b = SwingUtilities.getLocalBounds(this);
354      g.setColor(MetalLookAndFeel.getPrimaryControlShadow());      g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
355      g.fillRect(b.x, b.y, b.width, b.height);      g.fillRect(b.x, b.y, b.width, b.height);
356      MetalUtils.fillMetalPattern(g, b.x + 4, b.y + 2, b.width      MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width
357              - paletteCloseIcon.getIconWidth() - 13, b.height - 5,              - paletteCloseIcon.getIconWidth() - 13, b.height - 5,
358              MetalLookAndFeel.getPrimaryControlHighlight(),              MetalLookAndFeel.getPrimaryControlHighlight(),
359              MetalLookAndFeel.getBlack());              MetalLookAndFeel.getBlack());
# Line 399  public class MetalInternalFrameTitlePane Line 404  public class MetalInternalFrameTitlePane
404            endX = Math.max(closeButton.getX(), endX);            endX = Math.max(closeButton.getX(), endX);
405          endX -= 7;          endX -= 7;
406          if (endX > startX)          if (endX > startX)
407            MetalUtils.fillMetalPattern(g, startX, 3, endX - startX, getHeight() - 6, Color.white, Color.gray);            MetalUtils.fillMetalPattern(this, g, startX, 3, endX - startX, getHeight() - 6, Color.white, Color.gray);
408        }        }
409      g.setColor(savedColor);      g.setColor(savedColor);
410    }    }
# Line 422  public class MetalInternalFrameTitlePane Line 427  public class MetalInternalFrameTitlePane
427        closeButton.setIcon(closeIcon);        closeButton.setIcon(closeIcon);
428    }    }
429        
430      /**
431       * Creates and returns a property change handler for the title pane.
432       *
433       * @return The property change handler.
434       */
435    protected PropertyChangeListener createPropertyChangeListener()    protected PropertyChangeListener createPropertyChangeListener()
436    {    {
437      return new MetalInternalFrameTitlePanePropertyChangeHandler();        return new MetalInternalFrameTitlePanePropertyChangeHandler();  

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

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