Class GenericPopup

java.lang.Object
org.jmol.popup.GenericPopup
All Implemented Interfaces:
GenericMenuInterface
Direct Known Subclasses:
JmolGenericPopup, JSVGenericPopup

public abstract class GenericPopup extends Object implements GenericMenuInterface
The overall parent of all popup classes in Jmol and JSmol. Contains methods and fields common to the "SwingComponent" SC class, which allows for both JavaScript (org.jmol.awtjs.swing) and Java (java.awt) components. This solution predates Jmol-SwingJS by about six years (2012 vs. 2018)
 abstract GenericPopop 
 -- abstract JmolGenericPopup
   -- abstract JmolPopup
      -- AwtJmolPopup
      -- JSJmolPopup
   -- abstract ModelKitPopup
      -- AwtModelKitPopup
      -- JSModelKitPopup
 -- abstract JSVGenericPopup
   -- AwtPopup
   -- JsPopup
 
Author:
Bob Hanson
  • Field Details

    • helper

      public PopupHelper helper
    • strMenuStructure

      protected String strMenuStructure
    • allowSignedFeatures

      protected boolean allowSignedFeatures
    • isJS

      protected boolean isJS
    • isApplet

      protected boolean isApplet
    • isSigned

      protected boolean isSigned
    • isWebGL

      protected boolean isWebGL
    • thisx

      public int thisx
    • thisy

      public int thisy
    • isTainted

      protected boolean isTainted
    • popupMenu

      protected SC popupMenu
    • thisPopup

      protected SC thisPopup
    • htCheckbox

      protected Map<String,SC> htCheckbox
    • buttonGroup

      protected Object buttonGroup
    • currentMenuItemId

      protected String currentMenuItemId
    • htMenus

      protected Map<String,SC> htMenus
    • updatingForShow

      protected boolean updatingForShow
  • Constructor Details

    • GenericPopup

      public GenericPopup()
  • Method Details

    • getImageIcon

      protected abstract Object getImageIcon(String fileName)
    • getUnknownCheckBoxScriptToRun

      protected abstract String getUnknownCheckBoxScriptToRun(SC item, String name, String what, boolean TF)
    • appCheckItem

      protected void appCheckItem(String item, SC newMenu)
      Opportunity to do something special with an item.
      Parameters:
      item -
      newMenu -
    • appCheckSpecialMenu

      public void appCheckSpecialMenu(String item, SC subMenu, String word)
      Opportunity to do something special with a given submenu is created
      Parameters:
      item -
      subMenu -
      word -
    • appFixLabel

      protected abstract String appFixLabel(String label)
    • getScriptForCallback

      protected abstract String getScriptForCallback(SC source, String name, String script)
    • appGetBooleanProperty

      protected abstract boolean appGetBooleanProperty(String name)
    • appRunSpecialCheckBox

      protected abstract boolean appRunSpecialCheckBox(SC item, String basename, String what, boolean TF)
    • appRestorePopupMenu

      protected abstract void appRestorePopupMenu()
    • appRunScript

      protected abstract void appRunScript(String script)
    • appUpdateSpecialCheckBoxValue

      protected abstract void appUpdateSpecialCheckBoxValue(SC source, String actionCommand, boolean selected)
    • appUpdateForShow

      protected abstract void appUpdateForShow()
    • initSwing

      protected void initSwing(String title, PopupResource bundle, Object applet, boolean isJS, boolean isSigned, boolean isWebGL)
    • addMenuItems

      public void addMenuItems(String parentId, String key, SC menu, PopupResource popupResourceBundle)
    • addMenu

      protected void addMenu(String id, String item, SC subMenu, String label, PopupResource popupResourceBundle)
    • updateSignedAppletItems

      protected void updateSignedAppletItems()
    • updateButton

      protected void updateButton(SC b, String entry, String script)
    • getEntryIcon

      protected Object getEntryIcon(String[] ret)
    • addMenuItem

      protected SC addMenuItem(SC menuItem, String entry)
    • doMenuClickCallback

      protected void doMenuClickCallback(SC source, String script)
    • doMenuCheckBoxCallback

      protected void doMenuCheckBoxCallback(SC source)
    • setText

      protected SC setText(String item, String text)
    • show

      protected void show(int x, int y, boolean doPopup)
      Parameters:
      x -
      y -
      doPopup -
    • jpiGetMenuAsString

      public String jpiGetMenuAsString(String title)
      Specified by:
      jpiGetMenuAsString in interface GenericMenuInterface
    • appGetMenuAsString

      protected String appGetMenuAsString(String title)
      Parameters:
      title -
      Returns:
      null
    • convertToMegabytes

      protected static int convertToMegabytes(long num)
    • jpiDispose

      public void jpiDispose()
      Specified by:
      jpiDispose in interface GenericMenuInterface