MultiPopupMenuUI (Java SE 26 & JDK 26)
Description: declaration: module: java.desktop, package: javax.swing.plaf.multi, class: MultiPopupMenuUI
Keywords: javax.swing.plaf.multi.MultiPopupMenuUI class

# Class MultiPopupMenuUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.PopupMenuUI
javax.swing.plaf.multi.MultiPopupMenuUI

public class MultiPopupMenuUI extends PopupMenuUI
A multiplexing UI used to combine `PopupMenuUI`s.

This file was automatically generated by AutoMulti.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Vector<ComponentUI>`
  `uis`
  The vector containing the real UIs.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MultiPopupMenuUI()`
  Constructs a `MultiPopupMenuUI`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(JComponent a, int b, int c)`
  Invokes the `contains` method on each UI handled by this object.
  `static ComponentUI`
  `createUI(JComponent a)`
  Returns a multiplexing UI instance if any of the auxiliary `LookAndFeel`s supports this UI.
  `Accessible`
  `getAccessibleChild(JComponent a, int b)`
  Invokes the `getAccessibleChild` method on each UI handled by this object.
  `int`
  `getAccessibleChildrenCount(JComponent a)`
  Invokes the `getAccessibleChildrenCount` method on each UI handled by this object.
  `Dimension`
  `getMaximumSize(JComponent a)`
  Invokes the `getMaximumSize` method on each UI handled by this object.
  `Dimension`
  `getMinimumSize(JComponent a)`
  Invokes the `getMinimumSize` method on each UI handled by this object.
  `Popup`
  `getPopup(JPopupMenu a, int b, int c)`
  Invokes the `getPopup` method on each UI handled by this object.
  `Dimension`
  `getPreferredSize(JComponent a)`
  Invokes the `getPreferredSize` method on each UI handled by this object.
  `ComponentUI[]`
  `getUIs()`
  Returns the list of UIs associated with this multiplexing UI.
  `void`
  `installUI(JComponent a)`
  Invokes the `installUI` method on each UI handled by this object.
  `boolean`
  `isPopupTrigger(MouseEvent a)`
  Invokes the `isPopupTrigger` method on each UI handled by this object.
  `void`
  `paint(Graphics a, JComponent b)`
  Invokes the `paint` method on each UI handled by this object.
  `void`
  `uninstallUI(JComponent a)`
  Invokes the `uninstallUI` method on each UI handled by this object.
  `void`
  `update(Graphics a, JComponent b)`
  Invokes the `update` method on each UI handled by this object.

  ### Methods declared in class ComponentUI

  `getBaseline, getBaselineResizeBehavior`
  Modifier and Type
  Method
  Description
  `int`
  `getBaseline(JComponent c, int width, int height)`
  Returns the baseline.
  `Component.BaselineResizeBehavior`
  `getBaselineResizeBehavior(JComponent c)`
  Returns an enum indicating how the baseline of the component changes as the size changes.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  Creates and returns a copy of this object.
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `protected void`
  `finalize()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Finalization is deprecated and subject to removal in a future release.
  `final Class<?>`
  `getClass()`
  Returns the runtime class of this `Object`.
  `int`
  `hashCode()`
  Returns a hash code value for this object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
  `final void`
  `wait(long timeoutMillis)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
  `final void`
  `wait(long timeoutMillis, int nanos)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

- ## Field Details

  - ### uis

    protected Vector<ComponentUI> uis
    The vector containing the real UIs. This is populated in the call to `createUI`, and can be obtained by calling the `getUIs` method. The first element is guaranteed to be the real UI obtained from the default look and feel.

- ## Constructor Details

  - ### MultiPopupMenuUI

    public MultiPopupMenuUI()
    Constructs a `MultiPopupMenuUI`.

- ## Method Details

  - ### getUIs

    public ComponentUI[] getUIs()
    Returns the list of UIs associated with this multiplexing UI. This allows processing of the UIs by an application aware of multiplexing UIs on components.
    Returns:
      an array of the UI delegates

  - ### isPopupTrigger

    public boolean isPopupTrigger(MouseEvent a)
    Invokes the `isPopupTrigger` method on each UI handled by this object.
    Overrides:
      `isPopupTrigger` in class `PopupMenuUI`
    Parameters:
      `a` - a `MouseEvent`
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    Since:
      1.3

  - ### getPopup

    public Popup getPopup(JPopupMenu a, int b, int c)
    Invokes the `getPopup` method on each UI handled by this object.
    Overrides:
      `getPopup` in class `PopupMenuUI`
    Parameters:
      `a` - JPopupMenu requesting Popup
      `b` - Screen x location Popup is to be shown at
      `c` - Screen y location Popup is to be shown at.
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    Since:
      1.4

  - ### contains

    public boolean contains(JComponent a, int b, int c)
    Invokes the `contains` method on each UI handled by this object.
    Overrides:
      `contains` in class `ComponentUI`
    Parameters:
      `a` - the component where the x,y location is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
      `b` - the x coordinate of the point
      `c` - the y coordinate of the point
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    See Also:
      - `JComponent.contains(int, int)`
      - `Component.contains(int, int)`

  - ### update

    public void update(Graphics a, JComponent b)
    Invokes the `update` method on each UI handled by this object.
    Overrides:
      `update` in class `ComponentUI`
    Parameters:
      `a` - the `Graphics` context in which to paint
      `b` - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
    See Also:
      - `ComponentUI.paint(Graphics, JComponent)`
      - `JComponent.paintComponent(Graphics)`

  - ### createUI

    public static ComponentUI createUI(JComponent a)
    Returns a multiplexing UI instance if any of the auxiliary `LookAndFeel`s supports this UI. Otherwise, just returns the UI object obtained from the default `LookAndFeel`.
    Parameters:
      `a` - the component to create the UI for
    Returns:
      the UI delegate created

  - ### installUI

    public void installUI(JComponent a)
    Invokes the `installUI` method on each UI handled by this object.
    Overrides:
      `installUI` in class `ComponentUI`
    Parameters:
      `a` - the component where this UI delegate is being installed
    See Also:
      - `ComponentUI.uninstallUI(JComponent)`
      - `JComponent.setUI(ComponentUI)`
      - `JComponent.updateUI()`

  - ### uninstallUI

    public void uninstallUI(JComponent a)
    Invokes the `uninstallUI` method on each UI handled by this object.
    Overrides:
      `uninstallUI` in class `ComponentUI`
    Parameters:
      `a` - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
    See Also:
      - `ComponentUI.installUI(JComponent)`
      - `JComponent.updateUI()`

  - ### paint

    public void paint(Graphics a, JComponent b)
    Invokes the `paint` method on each UI handled by this object.
    Overrides:
      `paint` in class `ComponentUI`
    Parameters:
      `a` - the `Graphics` context in which to paint
      `b` - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
    See Also:
      - `ComponentUI.update(Graphics, JComponent)`

  - ### getPreferredSize

    public Dimension getPreferredSize(JComponent a)
    Invokes the `getPreferredSize` method on each UI handled by this object.
    Overrides:
      `getPreferredSize` in class `ComponentUI`
    Parameters:
      `a` - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    See Also:
      - `JComponent.getPreferredSize()`
      - `LayoutManager.preferredLayoutSize(Container)`

  - ### getMinimumSize

    public Dimension getMinimumSize(JComponent a)
    Invokes the `getMinimumSize` method on each UI handled by this object.
    Overrides:
      `getMinimumSize` in class `ComponentUI`
    Parameters:
      `a` - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    See Also:
      - `JComponent.getMinimumSize()`
      - `LayoutManager.minimumLayoutSize(Container)`
      - `ComponentUI.getPreferredSize(JComponent)`

  - ### getMaximumSize

    public Dimension getMaximumSize(JComponent a)
    Invokes the `getMaximumSize` method on each UI handled by this object.
    Overrides:
      `getMaximumSize` in class `ComponentUI`
    Parameters:
      `a` - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    See Also:
      - `JComponent.getMaximumSize()`
      - `LayoutManager2.maximumLayoutSize(Container)`

  - ### getAccessibleChildrenCount

    public int getAccessibleChildrenCount(JComponent a)
    Invokes the `getAccessibleChildrenCount` method on each UI handled by this object.
    Overrides:
      `getAccessibleChildrenCount` in class `ComponentUI`
    Parameters:
      `a` - `JComponent` for which to get count of accessible children
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    See Also:
      - `ComponentUI.getAccessibleChild(JComponent, int)`

  - ### getAccessibleChild

    public Accessible getAccessibleChild(JComponent a, int b)
    Invokes the `getAccessibleChild` method on each UI handled by this object.
    Overrides:
      `getAccessibleChild` in class `ComponentUI`
    Parameters:
      `a` - a `JComponent` for which to get a child object
      `b` - zero-based index of child
    Returns:
      the value obtained from the first UI, which is the UI obtained from the default `LookAndFeel`
    See Also:
      - `ComponentUI.getAccessibleChildrenCount(JComponent)`