$darkmode
DENOPTIM
|
Main tool bar of the DENOPTIM graphical user interface. More...
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... | |
Main tool bar of the DENOPTIM graphical user interface.
Definition at line 64 of file MainToolBar.java.
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().
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!).
panel | the 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().
JMenu denoptim.gui.MainToolBar.getMainMenu | ( | ) |
Returns the main menu of the tool bar.
Definition at line 558 of file MainToolBar.java.
References denoptim.gui.MainToolBar.menuDenoptim.
|
private |
Initialize the contents of the tool bar.
Definition at line 149 of file MainToolBar.java.
References denoptim.gui.MainToolBar.activeTabsMenu, denoptim.gui.GUIMainPanel.add(), denoptim.gui.GUI.closeIfAllSaved(), denoptim.files.FileFormat.COMP_MAP, denoptim.files.FileUtils.detectFileFormat(), denoptim.files.FileFormat.FR_PARAM, denoptim.files.FileFormat.FSE_PARAM, denoptim.files.FileFormat.FSE_RUN, denoptim.files.FileFormat.GA_PARAM, denoptim.files.FileFormat.GA_RUN, denoptim.gui.MainToolBar.gui, denoptim.gui.MainToolBar.mainPanel, denoptim.gui.MainToolBar.menuDenoptim, denoptim.gui.MainToolBar.menuFile, denoptim.gui.MainToolBar.openFile(), denoptim.gui.MainToolBar.openRecent, denoptim.gui.GUIFileOpener.pickFileOrFolder(), denoptim.gui.MainToolBar.queueStatusBar, denoptim.task.StaticTaskManager.setLinkToProgressBar(), denoptim.gui.MainToolBar.updateOpenRecentMenu(), and denoptim.logging.Version.VERSION.
Referenced by denoptim.gui.MainToolBar.MainToolBar().
|
package |
Process a file that has a recognized file format and loads a suitable GUI card to visualize the file content.
file | the file to open |
fileFormat | the 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().
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.
panel | the 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().
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().
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().
|
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().
|
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().
|
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().
|
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().
|
protected |
Reference to the main panel (cards deck)
Definition at line 110 of file MainToolBar.java.
Referenced by denoptim.gui.MainToolBar.addActiveTab(), denoptim.gui.MainToolBar.initialize(), denoptim.gui.MainToolBar.openFile(), and denoptim.gui.MainToolBar.setRefToMainPanel().
|
private |
Main DENOPTIM menu.
Definition at line 75 of file MainToolBar.java.
Referenced by denoptim.gui.MainToolBar.getMainMenu(), and denoptim.gui.MainToolBar.initialize().
|
private |
Main File menu.
Definition at line 80 of file MainToolBar.java.
Referenced by denoptim.gui.MainToolBar.initialize().
|
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().
|
private |
Progress bar indicating the queue of task to complete.
Definition at line 95 of file MainToolBar.java.
Referenced by denoptim.gui.MainToolBar.initialize().
|
staticprivate |
Version.
Definition at line 70 of file MainToolBar.java.