Class RJMenuButton

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class RJMenuButton extends JLabel
This class is a label subclass with a popup menu attached to implement popup menus.

Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill <info@reportmill.com>.

See Also:
  • Constructor Details

    • RJMenuButton

      public RJMenuButton()
      Creates a new menu button.
  • Method Details

    • getPopupMenu

      public JPopupMenu getPopupMenu()
      Returns the menu button's popup menu.
    • setPopupMenu

      public void setPopupMenu(JMenu aMenu)
      Sets the contents of the pop-up menu to be the same as the given jmenu
    • getPopupPoint

      public Point getPopupPoint()
      Returns the point that popup menu pops up at.
    • setPopupPoint

      public void setPopupPoint(Point aPoint)
      Sets the point that popup menu pops up at.
    • getPopupSize

      public Dimension getPopupSize()
      Returns the size that popup menu pops up with.
    • setPopupSize

      public void setPopupSize(Dimension aSize)
      Sets the size that popup menu pops up with.
    • getItemCount

      public int getItemCount()
      Returns the number of menu items in this button.
    • getItemAt

      public JMenuItem getItemAt(int anIndex)
      Returns the specifc menu item at the given index.
    • addItem

      public void addItem(String aString, String aName)
      Adds a menu item for the given name.
    • setFont

      public void setFont(Font aFont)
      Sets the font for the menu button.
      Overrides:
      setFont in class JComponent
    • getDownArrowIcon

      public Icon getDownArrowIcon()
      Returns an Icon of a down arrow.