< prev index next >

src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java

Print this page




 357                                           ? (d.width - insets.right - buttonWidth)
 358                                           : insets.left,
 359                                           insets.top,
 360                                           buttonWidth, d.height - insets.top - insets.bottom);
 361                 }
 362             }
 363         };
 364     }
 365 
 366     protected void installKeyboardActions() {
 367         super.installKeyboardActions();
 368     }
 369 
 370     protected ComboPopup createPopup() {
 371         return super.createPopup();
 372     }
 373 
 374     /**
 375      * Creates the default editor that will be used in editable combo boxes.
 376      * A default editor will be used only if an editor has not been
 377      * explicitly set with <code>setEditor</code>.
 378      *
 379      * @return a <code>ComboBoxEditor</code> used for the combo box
 380      * @see javax.swing.JComboBox#setEditor
 381      */
 382     protected ComboBoxEditor createEditor() {
 383         return new WindowsComboBoxEditor();
 384     }
 385 
 386     /**
 387      * {@inheritDoc}
 388      * @since 1.6
 389      */
 390     @Override
 391     protected ListCellRenderer<Object> createRenderer() {
 392         XPStyle xp = XPStyle.getXP();
 393         if (xp != null && xp.isSkinDefined(comboBox, Part.CP_READONLY)) {
 394             return new WindowsComboBoxRenderer();
 395         } else {
 396             return super.createRenderer();
 397         }
 398     }
 399 




 357                                           ? (d.width - insets.right - buttonWidth)
 358                                           : insets.left,
 359                                           insets.top,
 360                                           buttonWidth, d.height - insets.top - insets.bottom);
 361                 }
 362             }
 363         };
 364     }
 365 
 366     protected void installKeyboardActions() {
 367         super.installKeyboardActions();
 368     }
 369 
 370     protected ComboPopup createPopup() {
 371         return super.createPopup();
 372     }
 373 
 374     /**
 375      * Creates the default editor that will be used in editable combo boxes.
 376      * A default editor will be used only if an editor has not been
 377      * explicitly set with {@code setEditor}.
 378      *
 379      * @return a {@code ComboBoxEditor} used for the combo box
 380      * @see javax.swing.JComboBox#setEditor
 381      */
 382     protected ComboBoxEditor createEditor() {
 383         return new WindowsComboBoxEditor();
 384     }
 385 
 386     /**
 387      * {@inheritDoc}
 388      * @since 1.6
 389      */
 390     @Override
 391     protected ListCellRenderer<Object> createRenderer() {
 392         XPStyle xp = XPStyle.getXP();
 393         if (xp != null && xp.isSkinDefined(comboBox, Part.CP_READONLY)) {
 394             return new WindowsComboBoxRenderer();
 395         } else {
 396             return super.createRenderer();
 397         }
 398     }
 399 


< prev index next >