/[classpath]/classpath/javax/swing/plaf/basic/BasicMenuBarUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicMenuBarUI.java

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

revision 1.3 by mark, Sat Jun 26 16:07:02 2004 UTC revision 1.4 by mark, Thu Jul 22 19:45:39 2004 UTC
# Line 101  public class BasicMenuBarUI extends Menu Line 101  public class BasicMenuBarUI extends Menu
101    }    }
102    
103    /**    /**
104     * DOCUMENT ME!     * Creates ChangeListener
105     *     *
106     * @return DOCUMENT ME!     * @return The ChangeListener
107     */     */
108    protected ChangeListener createChangeListener()    protected ChangeListener createChangeListener()
109    {    {
# Line 112  public class BasicMenuBarUI extends Menu Line 112  public class BasicMenuBarUI extends Menu
112    
113    /**    /**
114     * Creates ContainerListener() to listen for ContainerEvents     * Creates ContainerListener() to listen for ContainerEvents
115     * fired by JMenuBar     * fired by JMenuBar.
116     *     *
117     * @return The ContainerListener     * @return The ContainerListener
118     */     */
# Line 242  public class BasicMenuBarUI extends Menu Line 242  public class BasicMenuBarUI extends Menu
242    }    }
243    
244    /**    /**
245     * DOCUMENT ME!     * Unregisters all the listeners that this UI delegate was using.
246     */     */
247    protected void uninstallListeners()    protected void uninstallListeners()
248    {    {
# Line 273  public class BasicMenuBarUI extends Menu Line 273  public class BasicMenuBarUI extends Menu
273    }    }
274    
275    /**    /**
276     * This class handles ContainerEvents fired by JMenuBar     * This class handles ContainerEvents fired by JMenuBar. It revalidates
277       * and repaints menu bar whenever menu is added or removed from it.
278     */     */
279    protected class ContainerHandler implements ContainerListener    protected class ContainerHandler implements ContainerListener
280    {    {
# Line 284  public class BasicMenuBarUI extends Menu Line 285  public class BasicMenuBarUI extends Menu
285       */       */
286      public void componentAdded(ContainerEvent e)      public void componentAdded(ContainerEvent e)
287      {      {
288        System.out.println("BasicMenuBar...componentAdded.. listener");        menuBar.revalidate();
289          menuBar.repaint();
290      }      }
291    
292      /**      /**
293       * This method is called whenever menu is removed from the menu bar       * This method is called whenever menu is removed from the menu bar.
294       *       *
295       * @param e The ContainerEvent.       * @param e The ContainerEvent.
296       */       */
297      public void componentRemoved(ContainerEvent e)      public void componentRemoved(ContainerEvent e)
298      {      {
299        System.out.println("BasicMenuBar...componentRemoved.. listener");        menuBar.revalidate();
300          menuBar.repaint();
301      }      }
302    }    }
303    
# Line 313  public class BasicMenuBarUI extends Menu Line 316  public class BasicMenuBarUI extends Menu
316      {      {
317        if (e.getPropertyName().equals(JMenuBar.BORDER_PAINTED_CHANGED_PROPERTY))        if (e.getPropertyName().equals(JMenuBar.BORDER_PAINTED_CHANGED_PROPERTY))
318          menuBar.repaint();          menuBar.repaint();
319          if (e.getPropertyName().equals(JMenuBar.MARGIN_CHANGED_PROPERTY))
320            menuBar.repaint();
321      }      }
322    }    }
323  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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