G
- V
- E
- public abstract class BaseGraphGUI<G extends Graph<V,E>,V,E extends Edge<V>> extends Object implements GraphGUI<G,V,E>, GraphViewListener, GraphListener<G>
Modifier and Type | Field and Description |
---|---|
protected G |
graph |
protected GraphSelection<V,E> |
selection |
Constructor and Description |
---|
BaseGraphGUI(G g,
GraphGUIHelper<G,V,E> helper,
boolean can_be_saved) |
Modifier and Type | Method and Description |
---|---|
void |
addGraphGUIListener(GraphGUIListener<G,V,E> listener)
Register a GraphGUIListener
|
boolean |
canBeSaved()
Indicates if the type of graph associated to the GraphGUI can be saved or not
|
boolean |
canCopyPaste()
Does this graph type support copy/paste actions?
|
void |
fireGraphClose()
Warn the listeners that the graph will be closed
|
protected void |
fireSelectionChange() |
GUIEditor<E> |
getEdgeEditionPanel() |
EditActionManager |
getEditActionManager() |
String |
getEditingTabLabel() |
Graph<V,E> |
getGraph() |
JPanel |
getInfoPanel() |
GUIEditor<G> |
getMainEditionPanel() |
GUIEditor<V> |
getNodeEditionPanel() |
GraphSelection<V,E> |
getSelection()
Get an object to interact with the selection
|
JMenu |
getViewMenu(JMenu layout)
Fill the view menu with actions available on this graph GUI
|
protected Action |
getZoomAction(BaseGraphGUI<?,?,?> gui,
ZoomEffect effect) |
GraphEventCascade |
graphChanged(G g,
GraphChangeType type,
Object data) |
boolean |
isEditAllowed() |
boolean |
isSaved()
Returns true if this graph has not been modified since the last change
|
void |
removeGraphGUIListener(GraphGUIListener<G,V,E> listener)
Remove a listener.
|
boolean |
save() |
boolean |
saveAs()
Pick a destination and save the graph.
|
void |
setSaved(boolean isSaved)
Set the graph has been saved or has not been modified since opened
|
protected abstract void |
setZoomLevel(ZoomEffect effect) |
protected void |
updateSelection(List<V> nodes,
List<E> edges) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGraphComponent, getZoomLevel, repaint, selectionChanged
refresh, repaint
protected final GraphSelection<V,E extends Edge<V>> selection
public BaseGraphGUI(G g, GraphGUIHelper<G,V,E> helper, boolean can_be_saved)
public String getEditingTabLabel()
public JPanel getInfoPanel()
public EditActionManager getEditActionManager()
public JMenu getViewMenu(JMenu layout)
GraphGUI
public boolean isSaved()
GraphGUI
public boolean canBeSaved()
GraphGUI
public void setSaved(boolean isSaved)
GraphGUI
public boolean saveAs()
GraphGUI
public void fireGraphClose()
GraphGUI
public void addGraphGUIListener(GraphGUIListener<G,V,E> listener)
GraphGUI
public void removeGraphGUIListener(GraphGUIListener<G,V,E> listener)
GraphGUI
public boolean isEditAllowed()
public boolean canCopyPaste()
GraphGUI
public GraphSelection<V,E> getSelection()
GraphGUI
protected void fireSelectionChange()
public GraphEventCascade graphChanged(G g, GraphChangeType type, Object data)
graphChanged
in interface GraphListener<G extends Graph<V,E>>
protected abstract void setZoomLevel(ZoomEffect effect)
protected Action getZoomAction(BaseGraphGUI<?,?,?> gui, ZoomEffect effect)
Copyright © 2005–2020. All rights reserved.