Class PlasticComboBoxUI.PlasticComboPopup

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement, ComboPopup
Enclosing class:
PlasticComboBoxUI

private static final class PlasticComboBoxUI.PlasticComboPopup extends BasicComboPopup
Differs from the BasicComboPopup in that it uses the standard popmenu border and honors an optional popup prototype display value.
  • Constructor Details

    • PlasticComboPopup

      private PlasticComboPopup(JComboBox combo)
  • Method Details

    • configureList

      protected void configureList()
      Configures the list created by #createList().
      Overrides:
      configureList in class BasicComboPopup
    • configureScroller

      protected void configureScroller()
      Configures the JScrollPane created by #createScroller().
      Overrides:
      configureScroller in class BasicComboPopup
    • computePopupBounds

      protected Rectangle computePopupBounds(int px, int py, int pw, int ph)
      Calculates the placement and size of the popup portion of the combo box based on the combo box location and the enclosing screen bounds. If no transformations are required, then the returned rectangle will have the same values as the parameters.

      In addition to the superclass behavior, this class offers to use the combo's popup prototype display value to compute the popup menu width. This is an optional feature of the JGoodies Plastic L&fs implemented via a client property key.

      If a prototype is set, the popup width is the maximum of the combobox width and the prototype based popup width. For the latter the renderer is used to render the prototype. The prototype based popup width is the prototype's width plus the scrollbar width - if any. The scrollbar test checks if there are more items than the combo's maximum row count.

      Overrides:
      computePopupBounds in class BasicComboPopup
      Parameters:
      px - starting x location
      py - starting y location
      pw - starting width
      ph - starting height
      Returns:
      a rectangle which represents the placement and size of the popup
      See Also: