org.jmol.popup
Class SimplePopup

java.lang.Object
  extended by org.jmol.popup.SimplePopup
Direct Known Subclasses:
JmolPopup, ModelKitPopup

public class SimplePopup
extends Object


Nested Class Summary
(package private)  class SimplePopup.CheckboxMenuItemListener
           
(package private)  class SimplePopup.MenuItemListener
           
 
Field Summary
private  boolean allowSignedFeatures
           
protected  String altlocs
           
protected  List AppletOnly
           
protected  boolean asPopup
           
protected  int atomCount
           
protected  List ChargesOnly
           
protected  SimplePopup.CheckboxMenuItemListener cmil
           
(package private)  String currentMenuItemId
           
protected  Component display
           
protected static boolean dumpList
           
protected  List FramesOnly
           
protected  JPopupMenu frankPopup
           
private  ButtonGroup group
           
protected  boolean haveBFactors
           
protected  boolean haveCharges
           
protected  Hashtable htCheckbox
           
protected  Hashtable htMenus
           
protected  boolean isApplet
           
private  boolean isHorizontal
           
protected  boolean isLastFrame
           
protected  boolean isMultiConfiguration
           
protected  boolean isMultiFrame
           
protected  boolean isPDB
           
protected  boolean isSigned
           
protected  boolean isSymmetry
           
protected  boolean isUnitCell
           
protected  boolean isVibration
           
protected  boolean isZapped
           
protected  Properties menuText
           
protected  SimplePopup.MenuItemListener mil
           
protected  int modelCount
           
protected  int modelIndex
           
protected  Hashtable modelInfo
           
protected  String modelSetFileName
           
protected  Hashtable modelSetInfo
           
protected  String modelSetName
           
protected  String modelSetRoot
           
protected  List NotPDB
           
protected  String nullModelSetName
           
protected  List PDBOnly
           
protected  List SignedOnly
           
protected  List SingleModelOnly
           
protected  JPopupMenu swingPopup
           
protected  List SymmetryOnly
           
protected  List TemperatureOnly
           
protected  int thisx
           
protected  int thisy
           
protected  List UnitcellOnly
           
(package private) static int UPDATE_ALL
           
(package private) static int UPDATE_CONFIG
           
(package private) static int UPDATE_SHOW
           
(package private)  int updateMode
           
protected  List VibrationOnly
           
protected  JmolViewer viewer
           
 
Constructor Summary
SimplePopup(JmolViewer viewer)
           
SimplePopup(JmolViewer viewer, String title, PopupResource bundle, boolean isHorizontal)
           
 
Method Summary
(package private)  Object addCheckboxMenuItem(Object menu, String entry, String basename, String id, boolean isRadio)
           
(package private)  Object addCheckboxMenuItem(Object menu, String entry, String basename, String id, boolean state, boolean isRadio)
           
protected static void addCurrentItem(StringBuffer sb, char type, int level, String name, String label, String script, String flags)
           
(package private)  Object addMenuItem(Object menuItem, String entry)
           
(package private)  Object addMenuItem(Object menu, String entry, String script, String id)
           
protected  void addMenuItems(String parentId, String key, Object menu, PopupResource popupResourceBundle)
           
(package private)  void addMenuSeparator(Object menu)
           
(package private)  void addMenuSubMenu(Object menu, Object subMenu)
           
(package private)  void addToMenu(Object menu, JComponent item)
           
protected  void build(String title, Object popupMenu, PopupResource bundle)
           
(package private)  boolean checkBoolean(Hashtable info, String key)
           
 void checkMenuClick(Object source, String script)
           
protected  void checkSpecialMenu(String item, Object subMenu, String word)
           
(package private)  Object cloneMenu(Object menu)
           
(package private)  void enableMenu(Object menu, boolean enable)
           
(package private)  void enableMenuItem(Object item, boolean enable)
           
protected  String fixScript(String id, String script)
           
protected  ImageIcon getIcon(String name)
           
(package private)  String getId(Object menu)
           
(package private)  int getMenuItemCount(Object menu)
           
protected  String getMenuText(String key)
           
protected  void getViewerData()
           
(package private)  Object newMenu(String entry, String id)
           
(package private)  void rememberCheckbox(String key, Object checkboxMenuItem)
           
(package private)  void removeAll(Object menu)
           
(package private)  void removeMenuItem(Object menu, int index)
           
(package private)  void renameMenu(Object menu, String entry)
           
(package private)  void restorePopupMenu()
           
(package private)  void setAutoscrolls(Object menu)
           
protected  String setCheckBoxOption(JMenuItem item, String name, String what)
           
(package private)  void setCheckBoxState(Object item, boolean state)
           
protected  void setCheckBoxValue(JMenuItem item, String what, boolean TF)
          (1) setOption --> set setOption true or set setOption false
(package private)  void setCheckBoxValue(Object source)
           
protected  void setLabel(Object menu, String entry)
           
 void show(int x, int y)
           
 void show(int x, int y, boolean doPopup)
           
protected  void showPopupMenu(int x, int y)
           
(package private)  void updateButton(AbstractButton b, String entry, String script)
           
(package private)  void updateFileTypeDependentMenus()
           
protected  void updateForShow()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dumpList

protected static final boolean dumpList
See Also:
Constant Field Values

viewer

protected JmolViewer viewer

display

protected Component display

mil

protected SimplePopup.MenuItemListener mil

cmil

protected SimplePopup.CheckboxMenuItemListener cmil

asPopup

protected boolean asPopup

menuText

protected Properties menuText

nullModelSetName

protected String nullModelSetName

modelSetName

protected String modelSetName

modelSetFileName

protected String modelSetFileName

modelSetRoot

protected String modelSetRoot

modelSetInfo

protected Hashtable modelSetInfo

modelInfo

protected Hashtable modelInfo

frankPopup

protected JPopupMenu frankPopup

htMenus

protected Hashtable htMenus

NotPDB

protected List NotPDB

PDBOnly

protected List PDBOnly

UnitcellOnly

protected List UnitcellOnly

SingleModelOnly

protected List SingleModelOnly

FramesOnly

protected List FramesOnly

VibrationOnly

protected List VibrationOnly

SymmetryOnly

protected List SymmetryOnly

SignedOnly

protected List SignedOnly

AppletOnly

protected List AppletOnly

ChargesOnly

protected List ChargesOnly

TemperatureOnly

protected List TemperatureOnly

isPDB

protected boolean isPDB

isSymmetry

protected boolean isSymmetry

isUnitCell

protected boolean isUnitCell

isMultiFrame

protected boolean isMultiFrame

isLastFrame

protected boolean isLastFrame

isMultiConfiguration

protected boolean isMultiConfiguration

isVibration

protected boolean isVibration

isApplet

protected boolean isApplet

isSigned

protected boolean isSigned

isZapped

protected boolean isZapped

haveCharges

protected boolean haveCharges

haveBFactors

protected boolean haveBFactors

altlocs

protected String altlocs

modelIndex

protected int modelIndex

modelCount

protected int modelCount

atomCount

protected int atomCount

swingPopup

protected JPopupMenu swingPopup

isHorizontal

private boolean isHorizontal

allowSignedFeatures

private boolean allowSignedFeatures

thisx

protected int thisx

thisy

protected int thisy

UPDATE_ALL

static final int UPDATE_ALL
See Also:
Constant Field Values

UPDATE_CONFIG

static final int UPDATE_CONFIG
See Also:
Constant Field Values

UPDATE_SHOW

static final int UPDATE_SHOW
See Also:
Constant Field Values

updateMode

int updateMode

group

private ButtonGroup group

htCheckbox

protected Hashtable htCheckbox

currentMenuItemId

String currentMenuItemId
Constructor Detail

SimplePopup

SimplePopup(JmolViewer viewer)

SimplePopup

public SimplePopup(JmolViewer viewer,
                   String title,
                   PopupResource bundle,
                   boolean isHorizontal)
Method Detail

build

protected void build(String title,
                     Object popupMenu,
                     PopupResource bundle)

show

public void show(int x,
                 int y)

updateForShow

protected void updateForShow()

show

public void show(int x,
                 int y,
                 boolean doPopup)

addCurrentItem

protected static void addCurrentItem(StringBuffer sb,
                                     char type,
                                     int level,
                                     String name,
                                     String label,
                                     String script,
                                     String flags)

getMenuText

protected String getMenuText(String key)

checkBoolean

boolean checkBoolean(Hashtable info,
                     String key)

getViewerData

protected void getViewerData()

updateFileTypeDependentMenus

void updateFileTypeDependentMenus()

addMenuItems

protected void addMenuItems(String parentId,
                            String key,
                            Object menu,
                            PopupResource popupResourceBundle)

checkSpecialMenu

protected void checkSpecialMenu(String item,
                                Object subMenu,
                                String word)

rememberCheckbox

void rememberCheckbox(String key,
                      Object checkboxMenuItem)

setCheckBoxValue

protected void setCheckBoxValue(JMenuItem item,
                                String what,
                                boolean TF)
(1) setOption --> set setOption true or set setOption false

Parameters:
item -
what - option to set
TF - true or false

setCheckBoxOption

protected String setCheckBoxOption(JMenuItem item,
                                   String name,
                                   String what)

fixScript

protected String fixScript(String id,
                           String script)

checkMenuClick

public void checkMenuClick(Object source,
                           String script)

restorePopupMenu

void restorePopupMenu()

addMenuItem

Object addMenuItem(Object menuItem,
                   String entry)

addCheckboxMenuItem

Object addCheckboxMenuItem(Object menu,
                           String entry,
                           String basename,
                           String id,
                           boolean isRadio)

showPopupMenu

protected void showPopupMenu(int x,
                             int y)

addToMenu

void addToMenu(Object menu,
               JComponent item)

addMenuSeparator

void addMenuSeparator(Object menu)

addMenuItem

Object addMenuItem(Object menu,
                   String entry,
                   String script,
                   String id)

setLabel

protected void setLabel(Object menu,
                        String entry)

getId

String getId(Object menu)

setCheckBoxValue

void setCheckBoxValue(Object source)

setCheckBoxState

void setCheckBoxState(Object item,
                      boolean state)

getIcon

protected ImageIcon getIcon(String name)

updateButton

void updateButton(AbstractButton b,
                  String entry,
                  String script)

addCheckboxMenuItem

Object addCheckboxMenuItem(Object menu,
                           String entry,
                           String basename,
                           String id,
                           boolean state,
                           boolean isRadio)

cloneMenu

Object cloneMenu(Object menu)

addMenuSubMenu

void addMenuSubMenu(Object menu,
                    Object subMenu)

newMenu

Object newMenu(String entry,
               String id)

setAutoscrolls

void setAutoscrolls(Object menu)

renameMenu

void renameMenu(Object menu,
                String entry)

getMenuItemCount

int getMenuItemCount(Object menu)

removeMenuItem

void removeMenuItem(Object menu,
                    int index)

removeAll

void removeAll(Object menu)

enableMenu

void enableMenu(Object menu,
                boolean enable)

enableMenuItem

void enableMenuItem(Object item,
                    boolean enable)