Class DropDownComponent.ScrollablePopupMenu

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPopupMenu
org.apache.batik.util.gui.DropDownComponent.ScrollablePopupMenu
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement
Enclosing class:
DropDownComponent

public static class DropDownComponent.ScrollablePopupMenu extends JPopupMenu
The Scrollable Popup Menu Component.
See Also:
  • Constructor Details

    • ScrollablePopupMenu

      public ScrollablePopupMenu(JComponent owner)
      Constructor.
      Parameters:
      owner - The owner component
  • Method Details

    • showMenu

      public void showMenu(Component invoker, Component refComponent)
      Shows this popup menu.
      Parameters:
      invoker - The popup menu invoker component
      refComponent - The dropdown component that containts this menu
    • add

      public void add(DropDownComponent.ScrollablePopupMenuItem menuItem, int index, int oldSize, int newSize)
      Adds the item to this component at the specified location.
      Parameters:
      menuItem - the item to add
    • remove

      public void remove(DropDownComponent.ScrollablePopupMenuItem menuItem, int oldSize, int newSize)
      Removes the item from this component.
      Parameters:
      menuItem - the item to remove
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent
    • selectionChanged

      public void selectionChanged(DropDownComponent.ScrollablePopupMenuItem targetItem, boolean wasSelected)
      Invoked when item selection changes.
    • setModel

      public void setModel(DropDownComponent.ScrollablePopupMenuModel model)
      Sets the ScrollablePopupMenuModel.
      Parameters:
      model - the model to set
    • getModel

      Gets the ScrollablePopupMenuModel
      Returns:
      the ScrollablePopupMenuModel model
    • getSelectedItemsCount

      public int getSelectedItemsCount()
      Gets the number of the selected items.
      Returns:
      number of selected items
    • processItemClicked

      public void processItemClicked()
      Processes click on the pop up menu item.
    • getOwner

      public JComponent getOwner()
      Gets the owner component.
      Returns:
      the owner component
    • getFooter

      Gets the footer item.
      Returns:
      the footer
    • addListener

      public void addListener(DropDownComponent.ScrollablePopupMenuListener listener)
      Adds the listener to the listener list.
      Parameters:
      listener - The listener to add
    • fireItemsWereAdded

      public void fireItemsWereAdded(DropDownComponent.ScrollablePopupMenuEvent event)
      Fires the itemsWereAdded event, when the items are added to this pop up menu.
      Parameters:
      event - The associated ScrollablePopupMenuEvent event
    • fireItemsWereRemoved

      public void fireItemsWereRemoved(DropDownComponent.ScrollablePopupMenuEvent event)
      Fires the itemsWereRemove event, when the items are removed from this pop up menu.
      Parameters:
      event - The associated ScrollablePopupMenuEvent event