$darkmode
DENOPTIM
denoptim.gui.VertexAsGraphViewPanel Class Reference

A panel to visualize a vertex as a graph component with attachment point table. More...

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

Classes

class  PausableTableModelListener
 

Public Member Functions

 VertexAsGraphViewPanel (boolean editableTable)
 Constructor that allows to specify whether the AP table is editable or not. More...
 
 VertexAsGraphViewPanel (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...
 
void dispose ()
 
Map< Integer, AttachmentPointgetMapOfAPsInTable ()
 
DefaultTableModel getAPTableModel ()
 
ArrayList< Integer > getSelectedAPIDs ()
 
Map< Integer, AttachmentPointgetMapOfAPsInTable ()
 
DefaultTableModel getAPTableModel ()
 

Public Attributes

boolean alteredAPData = false
 Flag signalling 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 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...
 
GraphViewerPanel graphViewer
 
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 a graph component with attachment point table.

Author
Marco Foscato

Definition at line 52 of file VertexAsGraphViewPanel.java.

Constructor & Destructor Documentation

◆ VertexAsGraphViewPanel() [1/2]

denoptim.gui.VertexAsGraphViewPanel.VertexAsGraphViewPanel ( 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 92 of file VertexAsGraphViewPanel.java.

◆ VertexAsGraphViewPanel() [2/2]

denoptim.gui.VertexAsGraphViewPanel.VertexAsGraphViewPanel ( 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 106 of file VertexAsGraphViewPanel.java.

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

Here is the call graph for this function:

Member Function Documentation

◆ activateTabEditsListener()

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

Allows to activate and deactivate the listener.

Parameters
varuse true to activate the listener

Definition at line 372 of file VertexAsGraphViewPanel.java.

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

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

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

◆ clearAll()

void denoptim.gui.VertexAsGraphViewPanel.clearAll ( )

Removes the currently visualized molecule and AP table.

Definition at line 283 of file VertexAsGraphViewPanel.java.

References denoptim.gui.VertexAsGraphViewPanel.clearAPTable().

Here is the call graph for this function:

◆ clearAPTable()

void denoptim.gui.VertexAsGraphViewPanel.clearAPTable ( )

Clears the table of attachment points.

Definition at line 293 of file VertexAsGraphViewPanel.java.

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

Referenced by denoptim.gui.VertexAsGraphViewPanel.clearAll(), denoptim.gui.VertexViewPanel.clearCurrentSystem(), denoptim.gui.VertexAsGraphViewPanel.loadVertexToViewer(), and denoptim.gui.VertexAsGraphViewPanel.updateAPsMapAndTable().

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

◆ deprotectEdits()

void denoptim.gui.VertexAsGraphViewPanel.deprotectEdits ( )

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

Definition at line 221 of file VertexAsGraphViewPanel.java.

References denoptim.gui.VertexAsGraphViewPanel.alteredAPData.

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

Here is the caller graph for this function:

◆ dispose()

void denoptim.gui.VertexAsGraphViewPanel.dispose ( )

Definition at line 389 of file VertexAsGraphViewPanel.java.

References denoptim.gui.GraphViewerPanel.dispose(), and denoptim.gui.VertexAsGraphViewPanel.graphViewer.

Here is the call graph for this function:

◆ getAPTableModel()

DefaultTableModel denoptim.gui.VertexAsGraphViewPanel.getAPTableModel ( )

◆ getMapOfAPsInTable()

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

◆ getSelectedAPIDs()

ArrayList< Integer > denoptim.gui.VertexAsGraphViewPanel.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 329 of file VertexAsGraphViewPanel.java.

References denoptim.gui.VertexAsGraphViewPanel.apTable.

◆ getSelectedAPs()

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

Identifies which attachment points are selected in the visualized table.

Returns
the list of attachment points

Definition at line 311 of file VertexAsGraphViewPanel.java.

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

◆ hasUnsavedAPEdits()

boolean denoptim.gui.VertexAsGraphViewPanel.hasUnsavedAPEdits ( )

Check for unsaved edits to the AP data.

Returns
true if there are unsaved edits

Definition at line 210 of file VertexAsGraphViewPanel.java.

References denoptim.gui.VertexAsGraphViewPanel.alteredAPData.

◆ initialize()

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

◆ loadVertexStructure()

void denoptim.gui.VertexAsGraphViewPanel.loadVertexStructure ( )
private

Definition at line 181 of file VertexAsGraphViewPanel.java.

References denoptim.graph.DGraph.addVertex(), denoptim.gui.GraphViewerPanel.cleanup(), denoptim.graph.Vertex.clone(), denoptim.gui.VertexAsGraphViewPanel.graphViewer, denoptim.gui.GraphViewerPanel.loadGraphToViewer(), and denoptim.gui.VertexAsGraphViewPanel.vertex.

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

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

◆ loadVertexToViewer()

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

Definition at line 166 of file VertexAsGraphViewPanel.java.

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

Referenced by denoptim.gui.VertexViewPanel.loadEmptyVertexToViewer(), denoptim.gui.VertexViewPanel.loadFragmentToViewer(), and denoptim.gui.VertexViewPanel.loadTemplateToViewer().

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

◆ preSelectAPs()

void denoptim.gui.VertexAsGraphViewPanel.preSelectAPs ( )
private

Definition at line 256 of file VertexAsGraphViewPanel.java.

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

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

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

◆ setVertexSpecificEditableAPTable()

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

Definition at line 159 of file VertexAsGraphViewPanel.java.

References denoptim.gui.VertexAsGraphViewPanel.vertexSpecificAPTabEditable.

Referenced by denoptim.gui.VertexViewPanel.loadTemplateToViewer(), and denoptim.gui.VertexAsGraphViewPanel.loadVertexToViewer().

Here is the caller graph for this function:

◆ updateAPsMapAndTable()

void denoptim.gui.VertexAsGraphViewPanel.updateAPsMapAndTable ( )
private

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

Definition at line 232 of file VertexAsGraphViewPanel.java.

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

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

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

Member Data Documentation

◆ alteredAPData

boolean denoptim.gui.VertexAsGraphViewPanel.alteredAPData = false

◆ apTable

◆ apTabModel

◆ editableAPTable

boolean denoptim.gui.VertexAsGraphViewPanel.editableAPTable = false
private

◆ graphViewer

◆ mapAPs

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

◆ serialVersionUID

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

Version UID.

Definition at line 57 of file VertexAsGraphViewPanel.java.

◆ tabPanel

JScrollPane denoptim.gui.VertexAsGraphViewPanel.tabPanel
private

◆ vertex

◆ vertexSpecificAPTabEditable

boolean denoptim.gui.VertexAsGraphViewPanel.vertexSpecificAPTabEditable = true
private

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