org.openscience.jmol.app.webexport

Class WebPanel

abstract class WebPanel extends JPanel implements ActionListener

Nested Class Summary
classWebPanel.InstanceCellRenderer
Field Summary
JButtonaddInstanceButton
protected StringappletInfoDivs
protected JSpinnerappletSizeSpinnerH
protected JSpinnerappletSizeSpinnerP
protected JSpinnerappletSizeSpinnerW
JButtondeleteInstanceButton
JScrollPaneeditorScrollPane
JFileChooserfc
JButtonhelpButton
protected StringhtmlAppletTemplate
JListinstanceList
protected StringlistLabel
JTextFieldlocalAppletPath
JTextFieldpageAuthorName
intpanelIndex
protected StringpanelName
JTextFieldremoteAppletPath
JButtonsaveButton
JButtonshowInstanceButton
protected booleanuseAppletJS
JmolViewerviewer
JTextFieldwebPageTitle
WebPanel[]webPanels
Constructor Summary
protected WebPanel(JmolViewer viewer, JFileChooser fc, WebPanel[] webPanels, int panelIndex)
Method Summary
voidactionPerformed(ActionEvent e)
static StringaddFileList(String script, String tag)
abstract JPanelappletParamPanel()
static StringcopyBinaryFile(String fullPathName, String dataPath)
voidenableButtons(JList list)
booleanfileWriter(File file, JList InstanceList)
abstract StringfixHtml(String html)
abstract StringgetAppletDefs(int i, String html, StringBuffer appletDefs, JmolInstance instance)
static byte[]getFileAsBytes(String path)
intgetInfoHeight()
intgetInfoWidth()
StringgetInstanceName(int i)
JPanelgetLeftPanel(int w, int h)
JPanelgetPanel(int infoWidth, int infoHeight)
static StringlocalizeFileReferences(String script, String[] origFileList, String[] copiedFileNames)
voidsyncLists()
static StringwriteFileBytes(String path, byte[] data)

Field Detail

addInstanceButton

private JButton addInstanceButton

appletInfoDivs

protected String appletInfoDivs

appletSizeSpinnerH

protected JSpinner appletSizeSpinnerH

appletSizeSpinnerP

protected JSpinner appletSizeSpinnerP

appletSizeSpinnerW

protected JSpinner appletSizeSpinnerW

deleteInstanceButton

private JButton deleteInstanceButton

editorScrollPane

private JScrollPane editorScrollPane

fc

private JFileChooser fc

helpButton

private JButton helpButton

htmlAppletTemplate

protected String htmlAppletTemplate

instanceList

private JList instanceList

listLabel

protected String listLabel

localAppletPath

private JTextField localAppletPath

pageAuthorName

private JTextField pageAuthorName

panelIndex

private int panelIndex

panelName

protected String panelName

remoteAppletPath

private JTextField remoteAppletPath

saveButton

private JButton saveButton

showInstanceButton

private JButton showInstanceButton

useAppletJS

protected boolean useAppletJS

viewer

private JmolViewer viewer

webPageTitle

private JTextField webPageTitle

webPanels

private WebPanel[] webPanels

Constructor Detail

WebPanel

protected WebPanel(JmolViewer viewer, JFileChooser fc, WebPanel[] webPanels, int panelIndex)

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)

addFileList

private static String addFileList(String script, String tag)

appletParamPanel

abstract JPanel appletParamPanel()

copyBinaryFile

private static String copyBinaryFile(String fullPathName, String dataPath)

enableButtons

void enableButtons(JList list)

fileWriter

boolean fileWriter(File file, JList InstanceList)

fixHtml

abstract String fixHtml(String html)

getAppletDefs

abstract String getAppletDefs(int i, String html, StringBuffer appletDefs, JmolInstance instance)

getFileAsBytes

private static byte[] getFileAsBytes(String path)

getInfoHeight

int getInfoHeight()

getInfoWidth

int getInfoWidth()

getInstanceName

String getInstanceName(int i)

getLeftPanel

private JPanel getLeftPanel(int w, int h)

getPanel

JPanel getPanel(int infoWidth, int infoHeight)

localizeFileReferences

private static String localizeFileReferences(String script, String[] origFileList, String[] copiedFileNames)

syncLists

void syncLists()

writeFileBytes

private static String writeFileBytes(String path, byte[] data)