Package org.jmol.awtjs2d
Class JSPopupHelper
- java.lang.Object
-
- org.jmol.awtjs2d.JSPopupHelper
-
- All Implemented Interfaces:
PopupHelper
public class JSPopupHelper extends Object implements PopupHelper
For menus, popup-related awt/swing class references are in this file. We can ignore all the event/listener references because JSmol will create a simple object with just the elements getSource and getActionCommand. No need to have the entire classes fleshed out.
-
-
Field Summary
Fields Modifier and Type Field Description private ButtonGroupbuttonGroup(package private) GenericPopuppopupused here and by SwingController to refer to the Java class being handled by this helper.
-
Constructor Summary
Constructors Constructor Description JSPopupHelper(GenericPopup popup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)ObjectgetButtonGroup()SCgetCheckBox(String name)intgetItemType(SC m)SCgetMenu(String name)SCgetMenuItem(String text)SCgetRadio(String name)SCgetSwingComponent(Object component)voidhandleEvent(MouseEvent e)voiditemStateChanged(ItemEvent e)voidmenuAddButtonGroup(SC item)voidmenuClearListeners(SC menu)SCmenuCreatePopup(String name, Object applet)voidmenuInsertSubMenu(SC menu, SC subMenu, int index)voidmouseEntered(MouseEvent e)voidmouseExited(MouseEvent e)
-
-
-
Field Detail
-
popup
GenericPopup popup
used here and by SwingController to refer to the Java class being handled by this helper.
-
buttonGroup
private ButtonGroup buttonGroup
-
-
Constructor Detail
-
JSPopupHelper
public JSPopupHelper(GenericPopup popup)
-
-
Method Detail
-
menuCreatePopup
public SC menuCreatePopup(String name, Object applet)
- Specified by:
menuCreatePopupin interfacePopupHelper
-
getMenu
public SC getMenu(String name)
- Specified by:
getMenuin interfacePopupHelper
-
getMenuItem
public SC getMenuItem(String text)
- Specified by:
getMenuItemin interfacePopupHelper
-
getRadio
public SC getRadio(String name)
- Specified by:
getRadioin interfacePopupHelper
-
getCheckBox
public SC getCheckBox(String name)
- Specified by:
getCheckBoxin interfacePopupHelper
-
menuAddButtonGroup
public void menuAddButtonGroup(SC item)
- Specified by:
menuAddButtonGroupin interfacePopupHelper
-
getItemType
public int getItemType(SC m)
- Specified by:
getItemTypein interfacePopupHelper
-
menuInsertSubMenu
public void menuInsertSubMenu(SC menu, SC subMenu, int index)
- Specified by:
menuInsertSubMenuin interfacePopupHelper
-
getSwingComponent
public SC getSwingComponent(Object component)
- Specified by:
getSwingComponentin interfacePopupHelper
-
menuClearListeners
public void menuClearListeners(SC menu)
- Specified by:
menuClearListenersin interfacePopupHelper
-
itemStateChanged
public void itemStateChanged(ItemEvent e)
-
actionPerformed
public void actionPerformed(ActionEvent e)
-
getButtonGroup
public Object getButtonGroup()
- Specified by:
getButtonGroupin interfacePopupHelper
-
handleEvent
public void handleEvent(MouseEvent e)
-
mouseEntered
public void mouseEntered(MouseEvent e)
-
mouseExited
public void mouseExited(MouseEvent e)
-
-