$darkmode
DENOPTIM
denoptim.gui.GUIVertexSelector Class Reference

A modal dialog with a viewer that understands the different types of DENOPTIM vertex and allows to select vertices and, if needed, attachment points. More...

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

Classes

class  VrtxSpinnerChangeEvent
 

Public Member Functions

 GUIVertexSelector (Component refForPlacement, boolean use3rd)
 Constructor for an empty modal panel meant for selection of vertexes. More...
 
void load (List< Vertex > fragments, int initialId)
 Load the list of vertexes to choose from. More...
 
void setRequireApSelection (boolean enforced)
 Allows to control whether confirming the selection of a vertex without having selected an attachment point is permitted or not. More...
 
- Public Member Functions inherited from denoptim.gui.GUIModalDialog
 GUIModalDialog (Component refForPlacement)
 Constructor. More...
 
 GUIModalDialog (Component refForPlacement, boolean useExtraButton)
 Constructor. More...
 
Object showDialog ()
 Shows the dialog and restrains the modality to it, until the dialog gets closed. More...
 
void addToNorthPane (JComponent comp)
 Adds a component to the topmost part of this dialog frame. More...
 
void addToCentralPane (JComponent comp)
 Adds a component to the central part of this dialog frame. More...
 

Static Public Attributes

static final String PRESELECTEDAPSFIELD = "pre-SelectedAPs"
 Property used to pre-select APs. More...
 
static final String PRESELECTEDAPSFIELDSEP = "pre-SelectedAPs"
 Separator in property used to pre-select APs. More...
 

Protected Attributes

JPanel ctrlPane
 
- Protected Attributes inherited from denoptim.gui.GUIModalDialog
JButton btnDone
 The button that is used to launch the processing of the data given to the open dialog, and close the dialog window. More...
 
JButton btnCanc
 The button that is used to close the dialog without processing any input. More...
 
JButton btnExtra
 The button that can be used for any action that does not close the dialog. More...
 
Object result = null
 The result to be returned once the dialog is closed. More...
 

Private Member Functions

void appendToResult (int vrtxId, int apId)
 
void loadCurrentVrtxIdxToViewer ()
 Loads the vertices corresponding to the field index. More...
 
void updateVrtxListSpinner ()
 
void clearCurrentSystem ()
 
void activateTabEditsListener (boolean var)
 

Private Attributes

List< VertexvertexLibrary
 The currently loaded list of vertices. More...
 
Vertex vertex
 The currently loaded vertex. More...
 
int currVrtxIdx = 0
 The index of the currently loaded vertex [0–(n-1)}. More...
 
int currApIdx = -1
 The index of the selected AP [0-(n-1)]. More...
 
VertexViewPanel vertexViewer
 
JPanel navigPanel
 
JPanel navigPanel2
 
JSpinner navigSpinner
 
JLabel totalVerticesLabel
 
final VrtxSpinnerChangeEvent vrtxSpinnerListener
 
boolean enforceAPSelection = false
 

Static Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from denoptim.gui.GUIModalDialog
void close ()
 Closes the dialog window. More...
 

Detailed Description

A modal dialog with a viewer that understands the different types of DENOPTIM vertex and allows to select vertices and, if needed, attachment points.

Author
Marco Foscato

Definition at line 48 of file GUIVertexSelector.java.

Constructor & Destructor Documentation

◆ GUIVertexSelector()

Member Function Documentation

◆ activateTabEditsListener()

void denoptim.gui.GUIVertexSelector.activateTabEditsListener ( boolean  var)
private

Definition at line 363 of file GUIVertexSelector.java.

References denoptim.gui.VertexViewPanel.activateTabEditsListener(), and denoptim.gui.GUIVertexSelector.vertexViewer.

Referenced by denoptim.gui.GUIVertexSelector.VrtxSpinnerChangeEvent.stateChanged().

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

◆ appendToResult()

void denoptim.gui.GUIVertexSelector.appendToResult ( int  vrtxId,
int  apId 
)
private

Definition at line 247 of file GUIVertexSelector.java.

References denoptim.gui.GUIModalDialog.result.

Referenced by denoptim.gui.GUIVertexSelector.GUIVertexSelector().

Here is the caller graph for this function:

◆ clearCurrentSystem()

void denoptim.gui.GUIVertexSelector.clearCurrentSystem ( )
private

Definition at line 322 of file GUIVertexSelector.java.

References denoptim.gui.VertexViewPanel.clearCurrentSystem(), denoptim.gui.GUIVertexSelector.vertex, and denoptim.gui.GUIVertexSelector.vertexViewer.

Referenced by denoptim.gui.GUIVertexSelector.loadCurrentVrtxIdxToViewer().

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

◆ load()

void denoptim.gui.GUIVertexSelector.load ( List< Vertex fragments,
int  initialId 
)

Load the list of vertexes to choose from.

Parameters
fragmentsthe list of vertexes among which the usel will be allowed to chose.
initialIdthe index of the one vertex that should be displayed when showing the dialog.

Definition at line 234 of file GUIVertexSelector.java.

References denoptim.gui.GUIVertexSelector.currVrtxIdx, denoptim.gui.GUIVertexSelector.loadCurrentVrtxIdxToViewer(), denoptim.gui.GUIVertexSelector.updateVrtxListSpinner(), and denoptim.gui.GUIVertexSelector.vertexLibrary.

Referenced by denoptim.gui.GUIGraphHandler.createEmptyVertexAndPlaceItInGraph(), denoptim.gui.GUIGraphHandler.extendGraphFromFragSpace(), denoptim.gui.GUIVertexInspector.initialize(), and denoptim.gui.GUIGraphHandler.startGraphFromFragSpaceOrCreationOfEmptyVertex().

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

◆ loadCurrentVrtxIdxToViewer()

void denoptim.gui.GUIVertexSelector.loadCurrentVrtxIdxToViewer ( )
private

Loads the vertices corresponding to the field index.

The molecular data is loaded in the Jmol viewer, and the attachment point (AP) information in the the list of APs. Jmol is not aware of AP-related information, so this also launches the generation of the graphical objects representing the APs.

Definition at line 294 of file GUIVertexSelector.java.

References denoptim.gui.GUIVertexSelector.clearCurrentSystem(), denoptim.gui.GUIVertexSelector.currVrtxIdx, denoptim.gui.VertexViewPanel.loadVertexToViewer(), denoptim.gui.GUIVertexSelector.vertex, denoptim.gui.GUIVertexSelector.vertexLibrary, and denoptim.gui.GUIVertexSelector.vertexViewer.

Referenced by denoptim.gui.GUIVertexSelector.load(), and denoptim.gui.GUIVertexSelector.VrtxSpinnerChangeEvent.stateChanged().

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

◆ setRequireApSelection()

void denoptim.gui.GUIVertexSelector.setRequireApSelection ( boolean  enforced)

Allows to control whether confirming the selection of a vertex without having selected an attachment point is permitted or not.

Parameters
enforceduse true to enforce the selection of an AP.

Definition at line 280 of file GUIVertexSelector.java.

Referenced by denoptim.gui.GUIGraphHandler.createEmptyVertexAndPlaceItInGraph(), denoptim.gui.GUIGraphHandler.extendGraphFromFragSpace(), denoptim.gui.GUIVertexInspector.initialize(), and denoptim.gui.GUIGraphHandler.startGraphFromFragSpaceOrCreationOfEmptyVertex().

Here is the caller graph for this function:

◆ updateVrtxListSpinner()

void denoptim.gui.GUIVertexSelector.updateVrtxListSpinner ( )
private

Definition at line 313 of file GUIVertexSelector.java.

References denoptim.gui.GUIVertexSelector.currVrtxIdx, denoptim.gui.GUIVertexSelector.navigSpinner, denoptim.gui.GUIVertexSelector.totalVerticesLabel, and denoptim.gui.GUIVertexSelector.vertexLibrary.

Referenced by denoptim.gui.GUIVertexSelector.load().

Here is the caller graph for this function:

Member Data Documentation

◆ ctrlPane

◆ currApIdx

int denoptim.gui.GUIVertexSelector.currApIdx = -1
private

The index of the selected AP [0-(n-1)].

Definition at line 74 of file GUIVertexSelector.java.

Referenced by denoptim.gui.GUIVertexSelector.GUIVertexSelector().

◆ currVrtxIdx

◆ enforceAPSelection

boolean denoptim.gui.GUIVertexSelector.enforceAPSelection = false
private

◆ navigPanel

JPanel denoptim.gui.GUIVertexSelector.navigPanel
private

◆ navigPanel2

JPanel denoptim.gui.GUIVertexSelector.navigPanel2
private

◆ navigSpinner

◆ PRESELECTEDAPSFIELD

final String denoptim.gui.GUIVertexSelector.PRESELECTEDAPSFIELD = "pre-SelectedAPs"
static

◆ PRESELECTEDAPSFIELDSEP

final String denoptim.gui.GUIVertexSelector.PRESELECTEDAPSFIELDSEP = "pre-SelectedAPs"
static

◆ serialVersionUID

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

Version UID.

Definition at line 53 of file GUIVertexSelector.java.

◆ totalVerticesLabel

JLabel denoptim.gui.GUIVertexSelector.totalVerticesLabel
private

◆ vertex

Vertex denoptim.gui.GUIVertexSelector.vertex
private

◆ vertexLibrary

List<Vertex> denoptim.gui.GUIVertexSelector.vertexLibrary
private
Initial value:
=
new ArrayList<Vertex>()

The currently loaded list of vertices.

Definition at line 58 of file GUIVertexSelector.java.

Referenced by denoptim.gui.GUIVertexSelector.load(), denoptim.gui.GUIVertexSelector.loadCurrentVrtxIdxToViewer(), and denoptim.gui.GUIVertexSelector.updateVrtxListSpinner().

◆ vertexViewer

◆ vrtxSpinnerListener

final VrtxSpinnerChangeEvent denoptim.gui.GUIVertexSelector.vrtxSpinnerListener
private
Initial value:
=
new VrtxSpinnerChangeEvent()

Definition at line 83 of file GUIVertexSelector.java.

Referenced by denoptim.gui.GUIVertexSelector.GUIVertexSelector().


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