$darkmode
DENOPTIM
denoptim.gui.VertexAsTwoDimStructureViewPanel Class Reference

A panel to visualize a vertex as two-dimensional chemical structure with attachment point table. More...

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

Classes

class  AtomOrAPGenerator
 
class  PausableTableModelListener
 
class  TwoDimStructurePanel
 Panel dealing with the painting of 2D chemical representation. More...
 

Public Member Functions

 VertexAsTwoDimStructureViewPanel (boolean editableTable)
 Constructor that allows to specify whether the AP table is editable or not. More...
 
 VertexAsTwoDimStructureViewPanel (boolean editableTable, int dividerPosition)
 Constructor that allows to specify whether the AP table is editable or not. More...
 
void setVertexSpecificEditableAPTable (boolean editable)
 
void loadVertexToViewer (Vertex v)
 
boolean hasUnsavedAPEdits ()
 Check for unsaved edits to the AP data. More...
 
void deprotectEdits ()
 Overrides the flag signaling unsaved edits to saying that there are no altered data. More...
 
void clearAll ()
 Removes the currently visualized molecule and AP table. More...
 
void clearAPTable ()
 Clears the table of attachment points. More...
 
ArrayList< AttachmentPointgetSelectedAPs ()
 Identifies which attachment points are selected in the visualized table. More...
 
ArrayList< Integer > getSelectedAPIDs ()
 Identifies which attachment points are selected in the visualized table. More...
 
void activateTabEditsListener (boolean var)
 Allows to activate and deactivate the listener. More...
 
Map< Integer, AttachmentPointgetMapOfAPsInTable ()
 
DefaultTableModel getAPTableModel ()
 
ArrayList< Integer > getSelectedAPIDs ()
 
Map< Integer, AttachmentPointgetMapOfAPsInTable ()
 
DefaultTableModel getAPTableModel ()
 

Public Attributes

boolean alteredAPData = false
 Flag signaling that data about APs has been changed in the GUI. More...
 
- Public Attributes inherited from denoptim.gui.IVertexAPSelection
final String APDATACHANGEEVENT = "APDATA"
 

Protected Attributes

Map< Integer, AttachmentPointmapAPs = null
 Temporary list of attachment points of the current fragment. More...
 
DefaultTableModel apTabModel
 
JTable apTable
 

Private Member Functions

void initialize (int dividerPosition)
 
void loadVertexStructure ()
 
void clearPanel ()
 trashed the current panel displaying any 2D structure and replaces it with a new empty panel. More...
 
void updateAPsMapAndTable ()
 Uses the AP of the Fragment to create a new map and table of APs. More...
 
void preSelectAPs ()
 

Private Attributes

Vertex vertex
 The currently loaded fragment. More...
 
JScrollPane viewPanel
 
JPanel twoDimView
 
JScrollPane tabPanel
 
boolean editableAPTable = false
 
boolean vertexSpecificAPTabEditable = true
 

Static Private Attributes

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

Detailed Description

A panel to visualize a vertex as two-dimensional chemical structure with attachment point table.

Author
Marco Foscato

Definition at line 79 of file VertexAsTwoDimStructureViewPanel.java.

Constructor & Destructor Documentation

◆ VertexAsTwoDimStructureViewPanel() [1/2]

denoptim.gui.VertexAsTwoDimStructureViewPanel.VertexAsTwoDimStructureViewPanel ( boolean  editableTable)

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

Parameters
editableTableuse true to make the AP table editable

Definition at line 328 of file VertexAsTwoDimStructureViewPanel.java.

◆ VertexAsTwoDimStructureViewPanel() [2/2]

denoptim.gui.VertexAsTwoDimStructureViewPanel.VertexAsTwoDimStructureViewPanel ( boolean  editableTable,
int  dividerPosition 
)

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

Parameters
parentthe parent component.
editableTableuse true to make the AP table editable
dividerPositionallows to set the initial position of the divide

Definition at line 342 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.editableAPTable, and denoptim.gui.VertexAsTwoDimStructureViewPanel.initialize().

Here is the call graph for this function:

Member Function Documentation

◆ activateTabEditsListener()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.activateTabEditsListener ( boolean  var)

Allows to activate and deactivate the listener.

Parameters
varuse true to activate the listener

Definition at line 608 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.apTabModel, and denoptim.gui.VertexAsTwoDimStructureViewPanel.PausableTableModelListener.setActive().

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAPTable(), denoptim.gui.VertexAsTwoDimStructureViewPanel.preSelectAPs(), and denoptim.gui.VertexAsTwoDimStructureViewPanel.updateAPsMapAndTable().

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

◆ clearAll()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAll ( )

Removes the currently visualized molecule and AP table.

Definition at line 519 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAPTable().

Here is the call graph for this function:

◆ clearAPTable()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAPTable ( )

Clears the table of attachment points.

Definition at line 529 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.activateTabEditsListener(), and denoptim.gui.VertexAsTwoDimStructureViewPanel.apTabModel.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAll(), denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexToViewer(), and denoptim.gui.VertexAsTwoDimStructureViewPanel.updateAPsMapAndTable().

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

◆ clearPanel()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.clearPanel ( )
private

trashed the current panel displaying any 2D structure and replaces it with a new empty panel.

Definition at line 432 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.twoDimView, and denoptim.gui.VertexAsTwoDimStructureViewPanel.viewPanel.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.initialize(), and denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexStructure().

Here is the caller graph for this function:

◆ deprotectEdits()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.deprotectEdits ( )

Overrides the flag signaling unsaved edits to saying that there are no altered data.

Definition at line 457 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.alteredAPData.

◆ getAPTableModel()

DefaultTableModel denoptim.gui.VertexAsTwoDimStructureViewPanel.getAPTableModel ( )

◆ getMapOfAPsInTable()

Map< Integer, AttachmentPoint > denoptim.gui.VertexAsTwoDimStructureViewPanel.getMapOfAPsInTable ( )

◆ getSelectedAPIDs()

ArrayList< Integer > denoptim.gui.VertexAsTwoDimStructureViewPanel.getSelectedAPIDs ( )

Identifies which attachment points are selected in the visualized table.

Returns
the list of attachment points indexes

Implements denoptim.gui.IVertexAPSelection.

Definition at line 565 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.apTable.

◆ getSelectedAPs()

ArrayList< AttachmentPoint > denoptim.gui.VertexAsTwoDimStructureViewPanel.getSelectedAPs ( )

Identifies which attachment points are selected in the visualized table.

Returns
the list of attachment points

Definition at line 547 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.apTable, and denoptim.gui.VertexAsTwoDimStructureViewPanel.mapAPs.

◆ hasUnsavedAPEdits()

boolean denoptim.gui.VertexAsTwoDimStructureViewPanel.hasUnsavedAPEdits ( )

Check for unsaved edits to the AP data.

Returns
true if there are unsaved edits

Definition at line 446 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.alteredAPData.

◆ initialize()

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

Definition at line 352 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.apTable, denoptim.gui.VertexAsTwoDimStructureViewPanel.apTabModel, denoptim.gui.VertexAsTwoDimStructureViewPanel.clearPanel(), denoptim.gui.VertexAsTwoDimStructureViewPanel.editableAPTable, denoptim.gui.VertexAsTwoDimStructureViewPanel.tabPanel, and denoptim.gui.VertexAsTwoDimStructureViewPanel.vertexSpecificAPTabEditable.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.VertexAsTwoDimStructureViewPanel().

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

◆ loadVertexStructure()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexStructure ( )
private

Definition at line 416 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.clearPanel(), denoptim.gui.VertexAsTwoDimStructureViewPanel.twoDimView, and denoptim.gui.VertexAsTwoDimStructureViewPanel.vertex.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexToViewer().

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

◆ loadVertexToViewer()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexToViewer ( Vertex  v)

Definition at line 401 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAPTable(), denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexStructure(), denoptim.gui.VertexAsTwoDimStructureViewPanel.preSelectAPs(), denoptim.gui.VertexAsTwoDimStructureViewPanel.setVertexSpecificEditableAPTable(), denoptim.gui.VertexAsTwoDimStructureViewPanel.updateAPsMapAndTable(), and denoptim.gui.VertexAsTwoDimStructureViewPanel.vertex.

Referenced by denoptim.gui.VertexViewPanel.loadFragmentToViewer().

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

◆ preSelectAPs()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.preSelectAPs ( )
private

Definition at line 492 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.activateTabEditsListener(), denoptim.gui.VertexAsTwoDimStructureViewPanel.apTable, denoptim.graph.Vertex.getProperty(), denoptim.gui.GUIVertexSelector.PRESELECTEDAPSFIELD, denoptim.gui.GUIVertexSelector.PRESELECTEDAPSFIELDSEP, and denoptim.gui.VertexAsTwoDimStructureViewPanel.vertex.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexToViewer().

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

◆ setVertexSpecificEditableAPTable()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.setVertexSpecificEditableAPTable ( boolean  editable)

Definition at line 394 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.vertexSpecificAPTabEditable.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexToViewer().

Here is the caller graph for this function:

◆ updateAPsMapAndTable()

void denoptim.gui.VertexAsTwoDimStructureViewPanel.updateAPsMapAndTable ( )
private

Uses the AP of the Fragment to create a new map and table of APs.

Definition at line 468 of file VertexAsTwoDimStructureViewPanel.java.

References denoptim.gui.VertexAsTwoDimStructureViewPanel.activateTabEditsListener(), denoptim.gui.VertexAsTwoDimStructureViewPanel.apTabModel, denoptim.gui.VertexAsTwoDimStructureViewPanel.clearAPTable(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.gui.VertexAsTwoDimStructureViewPanel.mapAPs, and denoptim.gui.VertexAsTwoDimStructureViewPanel.vertex.

Referenced by denoptim.gui.VertexAsTwoDimStructureViewPanel.loadVertexToViewer().

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

Member Data Documentation

◆ alteredAPData

boolean denoptim.gui.VertexAsTwoDimStructureViewPanel.alteredAPData = false

◆ apTable

◆ apTabModel

◆ editableAPTable

boolean denoptim.gui.VertexAsTwoDimStructureViewPanel.editableAPTable = false
private

◆ mapAPs

Map<Integer, AttachmentPoint> denoptim.gui.VertexAsTwoDimStructureViewPanel.mapAPs = null
protected

◆ serialVersionUID

final long denoptim.gui.VertexAsTwoDimStructureViewPanel.serialVersionUID = 1L
staticprivate

Version UID.

Definition at line 85 of file VertexAsTwoDimStructureViewPanel.java.

◆ tabPanel

JScrollPane denoptim.gui.VertexAsTwoDimStructureViewPanel.tabPanel
private

◆ twoDimView

JPanel denoptim.gui.VertexAsTwoDimStructureViewPanel.twoDimView
private

◆ vertex

◆ vertexSpecificAPTabEditable

boolean denoptim.gui.VertexAsTwoDimStructureViewPanel.vertexSpecificAPTabEditable = true
private

◆ viewPanel

JScrollPane denoptim.gui.VertexAsTwoDimStructureViewPanel.viewPanel
private

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