jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java
changeset 25178 dbab904451e9
parent 22574 7f8ce0c8c20a
child 25565 ce603b34c98d
equal deleted inserted replaced
25177:487a5e71f6dd 25178:dbab904451e9
    52  * @author Tom Santos
    52  * @author Tom Santos
    53  */
    53  */
    54 @SuppressWarnings("serial") // Same-version serialization only
    54 @SuppressWarnings("serial") // Same-version serialization only
    55 public class MetalComboBoxUI extends BasicComboBoxUI {
    55 public class MetalComboBoxUI extends BasicComboBoxUI {
    56 
    56 
       
    57     /**
       
    58      * Constructs an instance of {@code MetalComboBoxUI}.
       
    59      *
       
    60      * @param c a component
       
    61      * @return an instance of {@code MetalComboBoxUI}
       
    62      */
    57     public static ComponentUI createUI(JComponent c) {
    63     public static ComponentUI createUI(JComponent c) {
    58         return new MetalComboBoxUI();
    64         return new MetalComboBoxUI();
    59     }
    65     }
    60 
    66 
    61     public void paint(Graphics g, JComponent c) {
    67     public void paint(Graphics g, JComponent c) {
   232     /**
   238     /**
   233      * As of Java 2 platform v1.4 this method is no longer used. Do not call or
   239      * As of Java 2 platform v1.4 this method is no longer used. Do not call or
   234      * override. All the functionality of this method is in the
   240      * override. All the functionality of this method is in the
   235      * MetalPropertyChangeListener.
   241      * MetalPropertyChangeListener.
   236      *
   242      *
       
   243      * @param e an instance of {@code PropertyChangeEvent}
   237      * @deprecated As of Java 2 platform v1.4.
   244      * @deprecated As of Java 2 platform v1.4.
   238      */
   245      */
   239     @Deprecated
   246     @Deprecated
   240     protected void editablePropertyChanged( PropertyChangeEvent e ) { }
   247     protected void editablePropertyChanged( PropertyChangeEvent e ) { }
   241 
   248 
   249      */
   256      */
   250     public class MetalComboBoxLayoutManager extends BasicComboBoxUI.ComboBoxLayoutManager {
   257     public class MetalComboBoxLayoutManager extends BasicComboBoxUI.ComboBoxLayoutManager {
   251         public void layoutContainer( Container parent ) {
   258         public void layoutContainer( Container parent ) {
   252             layoutComboBox( parent, this );
   259             layoutComboBox( parent, this );
   253         }
   260         }
       
   261 
       
   262         /**
       
   263          * Lays out the parent container.
       
   264          *
       
   265          * @param parent a container
       
   266          */
   254         public void superLayout( Container parent ) {
   267         public void superLayout( Container parent ) {
   255             super.layoutContainer( parent );
   268             super.layoutContainer( parent );
   256         }
   269         }
   257     }
   270     }
   258 
   271 
       
   272     /**
       
   273      * Lays out the {@code JComboBox} in the {@code parent} container.
       
   274      *
       
   275      * @param parent a container
       
   276      * @param manager an instance of {@code MetalComboBoxLayoutManager}
       
   277      */
   259     // This is here because of a bug in the compiler.
   278     // This is here because of a bug in the compiler.
   260     // When a protected-inner-class-savvy compiler comes out we
   279     // When a protected-inner-class-savvy compiler comes out we
   261     // should move this into MetalComboBoxLayoutManager.
   280     // should move this into MetalComboBoxLayoutManager.
   262     public void layoutComboBox( Container parent, MetalComboBoxLayoutManager manager ) {
   281     public void layoutComboBox( Container parent, MetalComboBoxLayoutManager manager ) {
   263         if (comboBox.isEditable() && !MetalLookAndFeel.usingOcean()) {
   282         if (comboBox.isEditable() && !MetalLookAndFeel.usingOcean()) {
   365      * @deprecated As of Java 2 platform v1.4.
   384      * @deprecated As of Java 2 platform v1.4.
   366      */
   385      */
   367     @Deprecated
   386     @Deprecated
   368     public class MetalComboPopup extends BasicComboPopup {
   387     public class MetalComboPopup extends BasicComboPopup {
   369 
   388 
       
   389         /**
       
   390          * Constructs a new instance of {@code MetalComboPopup}.
       
   391          *
       
   392          * @param cBox an instance of {@code JComboBox}
       
   393          */
   370         public MetalComboPopup( JComboBox cBox) {
   394         public MetalComboPopup( JComboBox cBox) {
   371             super( cBox );
   395             super( cBox );
   372         }
   396         }
   373 
   397 
   374         // This method was overloaded and made public. This was probably
   398         // This method was overloaded and made public. This was probably