// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __javax_swing_JPopupMenu__
#define __javax_swing_JPopupMenu__

#pragma interface

#include <javax/swing/JComponent.h>
#include <gcj/array.h>

extern "Java"
{
  namespace javax
  {
    namespace accessibility
    {
      class AccessibleContext;
    }
    namespace swing
    {
      class JPopupMenu;
      class MenuSelectionManager;
      class MenuElement;
      namespace event
      {
        class PopupMenuListener;
      }
      namespace plaf
      {
        class PopupMenuUI;
      }
      class Action;
      class JMenuItem;
      class Popup;
      class SingleSelectionModel;
    }
  }
  namespace java
  {
    namespace beans
    {
      class PropertyChangeListener;
    }
    namespace awt
    {
      namespace event
      {
        class KeyEvent;
        class MouseEvent;
      }
      class Dimension;
      class Insets;
      class Component;
    }
  }
}

class javax::swing::JPopupMenu : public ::javax::swing::JComponent
{
public:
  JPopupMenu ();
  JPopupMenu (::java::lang::String *);
  virtual ::javax::swing::JMenuItem *add (::javax::swing::JMenuItem *);
  virtual ::javax::swing::JMenuItem *add (::java::lang::String *);
  virtual ::javax::swing::JMenuItem *add (::javax::swing::Action *);
  virtual void remove (jint);
  virtual void insert (::javax::swing::Action *, jint);
  virtual void insert (::java::awt::Component *, jint);
  static jboolean getDefaultLightWeightPopupEnabled ();
  static void setDefaultLightWeightPopupEnabled (jboolean);
  virtual ::javax::swing::plaf::PopupMenuUI *getUI ();
  virtual void setUI (::javax::swing::plaf::PopupMenuUI *);
  virtual void updateUI ();
  virtual ::java::lang::String *getUIClassID ();
  virtual ::javax::swing::SingleSelectionModel *getSelectionModel () { return selectionModel; }
  virtual void setSelectionModel (::javax::swing::SingleSelectionModel *);
public:  // actually protected
  virtual ::javax::swing::JMenuItem *createActionComponent (::javax::swing::Action *);
  virtual ::java::beans::PropertyChangeListener *createActionChangeListener (::javax::swing::JMenuItem *);
public:
  virtual jboolean isLightWeightPopupEnabled () { return lightWeightPopupEnabled; }
  virtual void setLightWeightPopupEnabled (jboolean);
  virtual ::java::lang::String *getLabel () { return label; }
  virtual void setLabel (::java::lang::String *);
  virtual void addSeparator ();
  virtual void addPopupMenuListener (::javax::swing::event::PopupMenuListener *);
  virtual void removePopupMenuListener (::javax::swing::event::PopupMenuListener *);
  virtual JArray< ::javax::swing::event::PopupMenuListener *> *getPopupMenuListeners ();
public:  // actually protected
  virtual void firePopupMenuWillBecomeVisible ();
  virtual void firePopupMenuWillBecomeInvisible ();
  virtual void firePopupMenuCanceled ();
public:
  virtual void pack ();
  virtual jboolean isVisible () { return visible; }
  virtual void setVisible (jboolean);
  virtual void setLocation (jint, jint);
  virtual ::java::awt::Component *getInvoker () { return invoker; }
  virtual void setInvoker (::java::awt::Component *);
  virtual void show (::java::awt::Component *, jint, jint);
  virtual ::java::awt::Component *getComponentAtIndex (jint);
  virtual jint getComponentIndex (::java::awt::Component *);
  virtual void setPopupSize (::java::awt::Dimension *);
  virtual void setPopupSize (jint, jint);
  virtual void setSelected (::java::awt::Component *);
  virtual jboolean isBorderPainted () { return borderPainted; }
  virtual void setBorderPainted (jboolean);
  virtual ::java::awt::Insets *getMargin () { return margin; }
public:  // actually protected
  virtual ::java::lang::String *paramString ();
public:
  virtual void processMouseEvent (::java::awt::event::MouseEvent *, JArray< ::javax::swing::MenuElement *> *, ::javax::swing::MenuSelectionManager *) { }
  virtual void processKeyEvent (::java::awt::event::KeyEvent *, JArray< ::javax::swing::MenuElement *> *, ::javax::swing::MenuSelectionManager *) { }
  virtual void menuSelectionChanged (jboolean);
  virtual JArray< ::javax::swing::MenuElement *> *getSubElements ();
  virtual ::java::awt::Component *getComponent () { return reinterpret_cast< ::java::awt::Component *> (this); }
  virtual jboolean isPopupTrigger (::java::awt::event::MouseEvent *);
  virtual ::javax::accessibility::AccessibleContext *getAccessibleContext ();
private:
  static const jlong serialVersionUID = -8336996630009646009LL;
  jboolean __attribute__((aligned(__alignof__( ::javax::swing::JComponent ))))  borderPainted;
  static jboolean DefaultLightWeightPopupEnabled;
public: // actually package-private
  ::java::awt::Component *invoker;
private:
  ::java::lang::String *label;
  ::java::awt::Insets *margin;
  jboolean lightWeightPopupEnabled;
  ::javax::swing::SingleSelectionModel *selectionModel;
  ::javax::swing::Popup *popup;
  jint popupLocationX;
  jint popupLocationY;
  jboolean visible;

  friend class javax_swing_JPopupMenu$ActionChangeListener;
  friend class javax_swing_JPopupMenu$AccessibleJPopupMenu;
  friend class javax_swing_JPopupMenu$Separator;
  friend class javax_swing_JPopupMenu$2;
  friend class javax_swing_JPopupMenu$1;
public:

  static ::java::lang::Class class$;
};

#endif /* __javax_swing_JPopupMenu__ */
