$darkmode
DENOPTIM
denoptim.gui.MainToolBar Class Reference

Main tool bar of the DENOPTIM graphical user interface. More...

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

Classes

class  RecentFileItem
 

Public Member Functions

 MainToolBar ()
 Constructor that build the tool bar. More...
 
void setRefToMasterGUI (GUI gui)
 Sets the reference to master GUI. More...
 
void setRefToMainPanel (GUIMainPanel mainPanel)
 Sets the reference to main panel for creating functionality of menu items depending on main panel identity. More...
 
JMenu getMainMenu ()
 Returns the main menu of the tool bar. More...
 
void addActiveTab (GUICardPanel panel)
 Add the reference to an active panel/tab in the menu listing active panel/tabs. More...
 
void removeActiveTab (GUICardPanel panel)
 Remove the reference to an panel/tab in the menu listing active tabs. More...
 

Protected Attributes

GUI gui
 Reference to the GUI window. More...
 
GUIMainPanel mainPanel
 Reference to the main panel (cards deck) More...
 

Package Functions

void openFile (File file, FileFormat fileFormat)
 Process a file that has a recognized file format and loads a suitable GUI card to visualize the file content. More...
 

Private Member Functions

void initialize ()
 Initialize the contents of the tool bar. More...
 
void updateOpenRecentMenu ()
 Updated the the list of recent files in the "open Recent" menu. More...
 

Private Attributes

JMenu menuDenoptim
 Main DENOPTIM menu. More...
 
JMenu menuFile
 Main File menu. More...
 
JMenu openRecent
 Menu with list of recent files. More...
 
JMenu activeTabsMenu
 The menu listing the active panels in the deck of cards. More...
 
JProgressBar queueStatusBar
 Progress bar indicating the queue of task to complete. More...
 
Map< GUICardPanel, JMenuItem > activeTabsAndRefs
 List of the active panels in the deck of cards. More...
 

Static Private Attributes

static final long serialVersionUID = 3L
 Version. More...
 

Detailed Description

Main tool bar of the DENOPTIM graphical user interface.

Author
Marco Foscato

Definition at line 64 of file MainToolBar.java.

Constructor & Destructor Documentation

◆ MainToolBar()

denoptim.gui.MainToolBar.MainToolBar ( )

Constructor that build the tool bar.

Definition at line 117 of file MainToolBar.java.

References denoptim.gui.MainToolBar.activeTabsAndRefs, and denoptim.gui.MainToolBar.initialize().

Here is the call graph for this function:

Member Function Documentation

◆ addActiveTab()

void denoptim.gui.MainToolBar.addActiveTab ( GUICardPanel  panel)

Add the reference to an active panel/tab in the menu listing active panel/tabs.

The panel is assumed to be included in the deck of cards (i.e., this method does not check if this assumption holds!).

Parameters
panelthe panel to reference

Definition at line 573 of file MainToolBar.java.

References denoptim.gui.MainToolBar.activeTabsAndRefs, denoptim.gui.MainToolBar.activeTabsMenu, and denoptim.gui.MainToolBar.mainPanel.

Referenced by denoptim.gui.GUIMainPanel.add().

Here is the caller graph for this function:

◆ getMainMenu()

JMenu denoptim.gui.MainToolBar.getMainMenu ( )

Returns the main menu of the tool bar.

Returns
the DENOPTIM menu of the tool bar

Definition at line 558 of file MainToolBar.java.

References denoptim.gui.MainToolBar.menuDenoptim.

◆ initialize()

◆ openFile()

void denoptim.gui.MainToolBar.openFile ( File  file,
FileFormat  fileFormat 
)
package

Process a file that has a recognized file format and loads a suitable GUI card to visualize the file content.

Parameters
filethe file to open
fileFormatthe DENOPTIM format of the file

Definition at line 449 of file MainToolBar.java.

References denoptim.gui.GUIMainPanel.add(), denoptim.gui.GUITextReader.displayContent(), denoptim.gui.GUICompatibilityMatrixTab.importCPMapFromFile(), denoptim.gui.GUIInspectFSERun.importFSERunData(), denoptim.gui.GUIInspectGARun.importGARunData(), denoptim.gui.GUIGraphHandler.importGraphsFromFile(), denoptim.gui.GUIPrepare.importParametersFromDenoptimParamsFile(), denoptim.gui.GUIVertexInspector.importVerticesFromFile(), and denoptim.gui.MainToolBar.mainPanel.

Referenced by denoptim.gui.MainToolBar.initialize(), denoptim.gui.GUI.run(), and denoptim.gui.MainToolBar.updateOpenRecentMenu().

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

◆ removeActiveTab()

void denoptim.gui.MainToolBar.removeActiveTab ( GUICardPanel  panel)

Remove the reference to an panel/tab in the menu listing active tabs.

If the panel is not listed among the active ones, this does nothing.

Parameters
panelthe panel referenced by the reference to remove from the list

Definition at line 593 of file MainToolBar.java.

References denoptim.gui.MainToolBar.activeTabsAndRefs, and denoptim.gui.MainToolBar.activeTabsMenu.

Referenced by denoptim.gui.GUIMainPanel.removeCard().

Here is the caller graph for this function:

◆ setRefToMainPanel()

void denoptim.gui.MainToolBar.setRefToMainPanel ( GUIMainPanel  mainPanel)

Sets the reference to main panel for creating functionality of menu items depending on main panel identity.

Definition at line 139 of file MainToolBar.java.

References denoptim.gui.MainToolBar.mainPanel.

Referenced by denoptim.gui.GUI.run().

Here is the caller graph for this function:

◆ setRefToMasterGUI()

void denoptim.gui.MainToolBar.setRefToMasterGUI ( GUI  gui)

Sets the reference to master GUI.

Definition at line 128 of file MainToolBar.java.

References denoptim.gui.MainToolBar.gui.

Referenced by denoptim.gui.GUI.run().

Here is the caller graph for this function:

◆ updateOpenRecentMenu()

void denoptim.gui.MainToolBar.updateOpenRecentMenu ( )
private

Updated the the list of recent files in the "open Recent" menu.

Definition at line 404 of file MainToolBar.java.

References denoptim.gui.MainToolBar.RecentFileItem.ff, denoptim.gui.MainToolBar.RecentFileItem.file, denoptim.gui.MainToolBar.openFile(), denoptim.gui.MainToolBar.openRecent, and denoptim.io.DenoptimIO.readRecentFilesMap().

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

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

Member Data Documentation

◆ activeTabsAndRefs

Map<GUICardPanel,JMenuItem> denoptim.gui.MainToolBar.activeTabsAndRefs
private

List of the active panels in the deck of cards.

Definition at line 100 of file MainToolBar.java.

Referenced by denoptim.gui.MainToolBar.addActiveTab(), denoptim.gui.MainToolBar.MainToolBar(), and denoptim.gui.MainToolBar.removeActiveTab().

◆ activeTabsMenu

JMenu denoptim.gui.MainToolBar.activeTabsMenu
private

The menu listing the active panels in the deck of cards.

Definition at line 90 of file MainToolBar.java.

Referenced by denoptim.gui.MainToolBar.addActiveTab(), denoptim.gui.MainToolBar.initialize(), and denoptim.gui.MainToolBar.removeActiveTab().

◆ gui

GUI denoptim.gui.MainToolBar.gui
protected

Reference to the GUI window.

Definition at line 105 of file MainToolBar.java.

Referenced by denoptim.gui.MainToolBar.initialize(), and denoptim.gui.MainToolBar.setRefToMasterGUI().

◆ mainPanel

GUIMainPanel denoptim.gui.MainToolBar.mainPanel
protected

◆ menuDenoptim

JMenu denoptim.gui.MainToolBar.menuDenoptim
private

Main DENOPTIM menu.

Definition at line 75 of file MainToolBar.java.

Referenced by denoptim.gui.MainToolBar.getMainMenu(), and denoptim.gui.MainToolBar.initialize().

◆ menuFile

JMenu denoptim.gui.MainToolBar.menuFile
private

Main File menu.

Definition at line 80 of file MainToolBar.java.

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

◆ openRecent

JMenu denoptim.gui.MainToolBar.openRecent
private

Menu with list of recent files.

Definition at line 85 of file MainToolBar.java.

Referenced by denoptim.gui.MainToolBar.initialize(), and denoptim.gui.MainToolBar.updateOpenRecentMenu().

◆ queueStatusBar

JProgressBar denoptim.gui.MainToolBar.queueStatusBar
private

Progress bar indicating the queue of task to complete.

Definition at line 95 of file MainToolBar.java.

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

◆ serialVersionUID

final long denoptim.gui.MainToolBar.serialVersionUID = 3L
staticprivate

Version.

Definition at line 70 of file MainToolBar.java.


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