Class WebPanel

All Implemented Interfaces:
ActionListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ListSelectionListener
Direct Known Subclasses:
PopInJmol, ScriptButtons

abstract class WebPanel extends JPanel implements ActionListener, ListSelectionListener, ItemListener
  • Field Details

    • panelName

      protected String panelName
    • htmlAppletTemplate

      protected String htmlAppletTemplate
    • listLabel

      protected String listLabel
    • appletInfoDivs

      protected String appletInfoDivs
    • appletSizeSpinnerW

      protected JSpinner appletSizeSpinnerW
    • appletSizeSpinnerH

      protected JSpinner appletSizeSpinnerH
    • appletSizeSpinnerP

      protected JSpinner appletSizeSpinnerP
    • editorScrollPane

      private JScrollPane editorScrollPane
    • saveButton

      private JButton saveButton
    • viewButton

      private JButton viewButton
    • helpButton

      private JButton helpButton
    • addInstanceButton

      private JButton addInstanceButton
    • deleteInstanceButton

      private JButton deleteInstanceButton
    • showInstanceButton

      private JButton showInstanceButton
    • remoteAppletPath

      private JTextField remoteAppletPath
    • localAppletPath

      private JTextField localAppletPath
    • pageAuthorName

      private JTextField pageAuthorName
    • webPageTitle

      private JTextField webPageTitle
    • fc

      private JFileChooser fc
    • instanceList

      protected JList<JmolInstance> instanceList
    • theWidgets

      protected Widgets theWidgets
    • nWidgets

      protected int nWidgets
    • widgetCheckboxes

      private Checkbox[] widgetCheckboxes
    • vwr

      protected Viewer vwr
    • panelIndex

      private int panelIndex
    • webPanels

      private WebPanel[] webPanels
    • errCount

      private int errCount
    • htmlPath

      private String htmlPath
  • Constructor Details

  • Method Details

    • getAppletDefs

      abstract String getAppletDefs(int i, String html, StringBuilder appletDefs, JmolInstance instance)
    • fixHtml

      abstract String fixHtml(String html)
    • appletParamPanel

      abstract JPanel appletParamPanel()
    • getPanel

      JPanel getPanel(int infoWidth, int infoHeight)
    • getInstanceList

      protected JList<JmolInstance> getInstanceList()
    • getLeftPanel

      private JPanel getLeftPanel(int w, int h)
      Parameters:
      w - UNUSED
      h - UNUSED
      Returns:
      left panel
    • getInfoWidth

      int getInfoWidth()
    • getInfoHeight

      int getInfoHeight()
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Specified by:
      itemStateChanged in interface ItemListener
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • valueChanged

      public void valueChanged(ListSelectionEvent e)
      Specified by:
      valueChanged in interface ListSelectionListener
    • getInstanceName

      String getInstanceName(int i)
    • fileWriter

      String fileWriter(File file, JList<JmolInstance> InstanceList) throws IOException
      Throws:
      IOException
    • replaceQuotedStrings

      public static String replaceQuotedStrings(String s, ArrayList<String> list, ArrayList<String> newList)
    • allSelectedWidgets

      public javajs.util.BS allSelectedWidgets()
    • copyBinaryFile

      private String copyBinaryFile(String fullPathName, String dataPath)
    • writeFileZipped

      private static String writeFileZipped(String[] retName, byte[] data, int maxUnzipped)
    • copyandUnzip

      private String copyandUnzip(String fullPathName, String dataPath, String name)
      Based on code available at Java2s.com
      Parameters:
      fullPathName - String containing path to the zip file being copied and expanded
      dataPath - String containing path to the directory into which the file will be unzipped
      name - String containing name of the zipfile without the path (e.g. xxx.zip)
      Returns:
      string containing path to where file copied.
    • jmolJarURL

      private URL jmolJarURL()
      Returns:
      the URL pointing to the Jmol.jar that is running
    • jmolJarPath

      private String jmolJarPath() throws UnsupportedEncodingException
      Returns a string version of the path to Jmol.jar (including the trailing Jmol.jar) decoded using the system default text encoding (usually UTF-8).
      Returns:
      system text encoding translated string version of the path to Jmol.jar
      Throws:
      UnsupportedEncodingException - if the encoding can't be used to decode the URL or the encoding is bad.
    • syncLists

      void syncLists()
    • enableButtons

      void enableButtons(JList<?> list)
    • checkOption

      public static boolean checkOption(Object o)