$darkmode
DENOPTIM
denoptim.gui.MoleculeViewPanel Class Reference

A panel with a molecular viewer and data table. More...

Inheritance diagram for denoptim.gui.MoleculeViewPanel:
[legend]
Collaboration diagram for denoptim.gui.MoleculeViewPanel:
[legend]

Public Member Functions

 MoleculeViewPanel ()
 Constructor. More...
 
 MoleculeViewPanel (int dividerPosition)
 Constructor that allows to specify whether the data table is editable or not. More...
 
void enablePartialData (boolean enable)
 Sets the behavior in case of request to visualize partial data. More...
 
void loadChemicalStructure (IAtomContainer mol)
 Loads a structure in the Jmol viewer. More...
 
void loadChemicalStructureFromFile (String pathName)
 Loads a structure in the Jmol viewer. More...
 
void loadChemicalStructureFromFile (File file)
 Loads a structure in the Jmol viewer. More...
 
void clearAll (boolean dataIsComing)
 Removes the currently visualized molecule and AP table. More...
 
void cleardataTable ()
 Clears the table of attachment points. More...
 
void clearMolecularViewer (boolean dataIsComing)
 Clears the molecular viewer. More...
 
void dispose ()
 

Protected Attributes

DefaultTableModel dataTabModel
 
JTable dataTable
 

Private Member Functions

void initialize (int dividerPosition)
 
void showPopup (MouseEvent e)
 
void fillDataTable (File molFile)
 
void fillDataTable (IAtomContainer mol)
 
void setJmolViewer ()
 

Private Attributes

Candidate item
 The currently loaded item. More...
 
boolean toleratePartialData = false
 Flag controlling behavior in case of partial data (e.r., lack of fitness/error) More...
 
JmolPanel jmolPanel
 
JScrollPane tabPanel
 
JPopupMenu dataTabPopMenu
 
String tmpSDFFile
 
final String NL = System.getProperty("line.separator")
 

Static Private Attributes

static final long serialVersionUID = 912850110991449553L
 Version UID. More...
 

Detailed Description

A panel with a molecular viewer and data table.

Author
Marco Foscato

Definition at line 62 of file MoleculeViewPanel.java.

Constructor & Destructor Documentation

◆ MoleculeViewPanel() [1/2]

denoptim.gui.MoleculeViewPanel.MoleculeViewPanel ( )

Constructor.

Definition at line 95 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.initialize().

Here is the call graph for this function:

◆ MoleculeViewPanel() [2/2]

denoptim.gui.MoleculeViewPanel.MoleculeViewPanel ( int  dividerPosition)

Constructor that allows to specify whether the data table is editable or not.

Parameters
dividerPositionallows to set the initial position of the divide

Definition at line 107 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.initialize().

Here is the call graph for this function:

Member Function Documentation

◆ clearAll()

void denoptim.gui.MoleculeViewPanel.clearAll ( boolean  dataIsComing)

Removes the currently visualized molecule and AP table.

Parameters
dataIsComingset true when there is incoming molecular data to visualize. In such case we do not run the very slow zap script in JMol because the molecular data will be overwritten anyway.

Definition at line 485 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.cleardataTable(), and denoptim.gui.MoleculeViewPanel.clearMolecularViewer().

Referenced by denoptim.gui.GraphVertexMolViewerPanel.clearMolecularViewer(), denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile(), denoptim.gui.GraphVertexMolViewerPanel.renderMolVieverToNeedUpdate(), denoptim.gui.GUIInspectFSERun.renderViewWithoutSelectedItems(), denoptim.gui.GUIInspectGARun.renderViewWithoutSelectedItems(), and denoptim.gui.GraphVertexMolViewerPanel.updateMolevularViewer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleardataTable()

void denoptim.gui.MoleculeViewPanel.cleardataTable ( )

Clears the table of attachment points.

Definition at line 496 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.dataTabModel.

Referenced by denoptim.gui.MoleculeViewPanel.clearAll(), and denoptim.gui.MoleculeViewPanel.fillDataTable().

Here is the caller graph for this function:

◆ clearMolecularViewer()

void denoptim.gui.MoleculeViewPanel.clearMolecularViewer ( boolean  dataIsComing)

Clears the molecular viewer.

WARNING: this is VERY SLOW: do not do it unless you are sure you really need to clear the data. Typically, if there is incoming data, you do not need to run this, as the old data will be overwritten anyway.

Parameters
dataIsComingset true when there is incoming molecular data to visualize.

Definition at line 516 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.jmolPanel, and denoptim.gui.JmolPanel.viewer.

Referenced by denoptim.gui.MoleculeViewPanel.clearAll().

Here is the caller graph for this function:

◆ dispose()

void denoptim.gui.MoleculeViewPanel.dispose ( )

Definition at line 538 of file MoleculeViewPanel.java.

References denoptim.gui.JmolPanel.dispose(), and denoptim.gui.MoleculeViewPanel.jmolPanel.

Referenced by denoptim.gui.GraphVertexMolViewerPanel.dispose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enablePartialData()

void denoptim.gui.MoleculeViewPanel.enablePartialData ( boolean  enable)

Sets the behavior in case of request to visualize partial data.

E.g., SDF files that have neither fitness nor error field.

Definition at line 260 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.toleratePartialData.

Referenced by denoptim.gui.GraphVertexMolViewerPanel.initialize().

Here is the caller graph for this function:

◆ fillDataTable() [1/2]

void denoptim.gui.MoleculeViewPanel.fillDataTable ( File  molFile)
private
Parameters
molFilecan be null, used only to get more data than what already collected in the DNEOPTIMMolecule class.

Definition at line 382 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.fillDataTable(), and denoptim.io.DenoptimIO.readAllAtomContainers().

Referenced by denoptim.gui.MoleculeViewPanel.fillDataTable(), denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile(), and denoptim.gui.MoleculeViewPanel.showPopup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillDataTable() [2/2]

◆ initialize()

void denoptim.gui.MoleculeViewPanel.initialize ( int  dividerPosition)
private

Definition at line 115 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.dataTable, denoptim.gui.MoleculeViewPanel.dataTabModel, denoptim.gui.Utils.getTempFile(), denoptim.gui.MoleculeViewPanel.jmolPanel, denoptim.gui.MoleculeViewPanel.showPopup(), denoptim.gui.MoleculeViewPanel.tabPanel, and denoptim.gui.MoleculeViewPanel.tmpSDFFile.

Referenced by denoptim.gui.MoleculeViewPanel.MoleculeViewPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadChemicalStructure()

void denoptim.gui.MoleculeViewPanel.loadChemicalStructure ( IAtomContainer  mol)

Loads a structure in the Jmol viewer.

Parameters
molthe structure to load

Definition at line 271 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile(), denoptim.gui.MoleculeViewPanel.tmpSDFFile, and denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.gui.GraphVertexMolViewerPanel.loadDnGraphToViewer(), and denoptim.gui.GraphVertexMolViewerPanel.updateMolevularViewer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadChemicalStructureFromFile() [1/2]

void denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile ( File  file)

◆ loadChemicalStructureFromFile() [2/2]

void denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile ( String  pathName)

Loads a structure in the Jmol viewer.

Parameters
fitProvMolthe structure to load

Definition at line 290 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile().

Referenced by denoptim.gui.MoleculeViewPanel.loadChemicalStructure(), denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile(), denoptim.gui.GUIInspectFSERun.renderViewWithSelectedItem(), and denoptim.gui.GUIInspectGARun.renderViewWithSelectedItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setJmolViewer()

void denoptim.gui.MoleculeViewPanel.setJmolViewer ( )
private

Definition at line 524 of file MoleculeViewPanel.java.

References denoptim.gui.MoleculeViewPanel.jmolPanel, denoptim.gui.MoleculeViewPanel.NL, and denoptim.gui.JmolPanel.viewer.

Referenced by denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile().

Here is the caller graph for this function:

◆ showPopup()

void denoptim.gui.MoleculeViewPanel.showPopup ( MouseEvent  e)
private

Definition at line 187 of file MoleculeViewPanel.java.

References denoptim.gui.GUIPreferences.chosenSDFTags, denoptim.gui.MoleculeViewPanel.dataTabPopMenu, denoptim.gui.GUIPreferences.defualtSDFTags, denoptim.gui.MoleculeViewPanel.fillDataTable(), denoptim.graph.Candidate.getSDFFile(), denoptim.gui.MoleculeViewPanel.item, and denoptim.io.DenoptimIO.readAllAtomContainers().

Referenced by denoptim.gui.MoleculeViewPanel.initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dataTable

JTable denoptim.gui.MoleculeViewPanel.dataTable
protected

Definition at line 83 of file MoleculeViewPanel.java.

Referenced by denoptim.gui.MoleculeViewPanel.initialize().

◆ dataTabModel

DefaultTableModel denoptim.gui.MoleculeViewPanel.dataTabModel
protected

◆ dataTabPopMenu

JPopupMenu denoptim.gui.MoleculeViewPanel.dataTabPopMenu
private

Definition at line 84 of file MoleculeViewPanel.java.

Referenced by denoptim.gui.MoleculeViewPanel.showPopup().

◆ item

Candidate denoptim.gui.MoleculeViewPanel.item
private

◆ jmolPanel

◆ NL

final String denoptim.gui.MoleculeViewPanel.NL = System.getProperty("line.separator")
private

Definition at line 88 of file MoleculeViewPanel.java.

Referenced by denoptim.gui.MoleculeViewPanel.setJmolViewer().

◆ serialVersionUID

final long denoptim.gui.MoleculeViewPanel.serialVersionUID = 912850110991449553L
staticprivate

Version UID.

Definition at line 67 of file MoleculeViewPanel.java.

◆ tabPanel

JScrollPane denoptim.gui.MoleculeViewPanel.tabPanel
private

Definition at line 81 of file MoleculeViewPanel.java.

Referenced by denoptim.gui.MoleculeViewPanel.initialize().

◆ tmpSDFFile

String denoptim.gui.MoleculeViewPanel.tmpSDFFile
private

◆ toleratePartialData

boolean denoptim.gui.MoleculeViewPanel.toleratePartialData = false
private

Flag controlling behavior in case of partial data (e.r., lack of fitness/error)

Definition at line 78 of file MoleculeViewPanel.java.

Referenced by denoptim.gui.MoleculeViewPanel.enablePartialData(), and denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile().


The documentation for this class was generated from the following file: