public class GUIManager extends Object
Constructor and Description |
---|
GUIManager() |
Modifier and Type | Method and Description |
---|---|
void |
about()
Show an "about" dialog
|
void |
addBlockClose(Graph graph,
Object key)
Block closing of the graph
|
void |
addBlockEdit(Graph graph,
Object key)
block editing mode for the graph
|
boolean |
canClose(Graph graph)
Verify if it is allowed to close the graph can be closed
|
boolean |
close(Graph graph)
Unmemorize the relationship between a graph and its GraphGUI and Frame
|
void |
closeEmptyGraphs()
Close all the windows of graphs that are empty
|
void |
closeStartupDialog() |
void |
exit() |
Frame |
getFrame(Graph graph)
Give access to the Frame corresponding to the given Graph
|
GraphGUI |
getGraphGUI(Graph graph)
Give access to the GraphGUI corresponding to the given Graph
|
static GUIManager |
getInstance()
Give access to the manager singleton
|
boolean |
isEditAllowed(Graph graph)
Verify if edition is allowed on the graph
|
void |
loadGINMLfile(String filename)
Load a graph from a GINML file and open a new frame for it.
|
RegulatoryGraph |
newFrame()
Create a new graph (of the default type, i.e.
|
Frame |
newFrame(Graph graph)
Build a new frame for the given Graph by creating a suitable GraphGUI and memorize their relationship
|
Frame |
newFrame(Graph graph,
boolean can_be_saved)
Build a new frame for the given Graph by creating a suitable GraphGUI and memorize their relationship
|
void |
quit()
try to close all frames
|
void |
registerGUI(GraphGUI graph_gui,
MainFrame frame) |
void |
removeBlockClose(Graph graph,
Object key)
Remove a block on closing
|
void |
removeBlockEdit(Graph graph,
Object key)
Remove a block on Edition
|
void |
startup(List<String> open) |
void |
whatToDoWithGraph(Graph<?,?> new_graph) |
void |
whatToDoWithGraph(Graph<?,?> new_graph,
Graph<?,?> parent_graph)
Manage the action to execute on the new graph (that was generated
from the parent graph).
|
public static GUIManager getInstance()
public void loadGINMLfile(String filename)
filename
- public RegulatoryGraph newFrame()
public Frame newFrame(Graph graph)
graph
- the graph for which a Frame is desiredpublic Frame newFrame(Graph graph, boolean can_be_saved)
graph
- the graph for which a Frame is desiredcan_be_saved
- a boolean indicating if the graph associated to the frame can be saved or notpublic GraphGUI getGraphGUI(Graph graph)
graph
- the graph for which the GraphGUI is desiredpublic Frame getFrame(Graph graph)
graph
- the graph for which the GraphGUI is desiredpublic boolean close(Graph graph)
graph
- the graph to closepublic void quit()
public void closeEmptyGraphs()
public void addBlockEdit(Graph graph, Object key)
key
- public boolean isEditAllowed(Graph graph)
public void removeBlockEdit(Graph graph, Object key)
key
- public void addBlockClose(Graph graph, Object key)
key
- public boolean canClose(Graph graph)
public void removeBlockClose(Graph graph, Object key)
key
- public void whatToDoWithGraph(Graph<?,?> new_graph)
public void whatToDoWithGraph(Graph<?,?> new_graph, Graph<?,?> parent_graph)
new_graph
- the graph to manageparentGraph
- the graph from which the new graph was generatedb
- (unused)public void exit()
public void closeStartupDialog()
public void about()
Copyright © 2005–2020. All rights reserved.