|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--javax.swing.JFrame | +--mascoptLib.gui.MascoptViewer
A Multi Layer and multi view viewer for Abstractgraphs.
MascoptViewer can display Oriented (DiGraph) or non oriented (Graph) graphs.
It can also display Chain or Path.
MascoptViewer allows to add and manage labels on Nodes or Edges (see setNodeLabels, setArcLabels). etc etc
Field Summary |
Fields inherited from class javax.swing.JFrame |
EXIT_ON_CLOSE |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
MascoptViewer()
Constructs a new MascoptViewer frame with a specified them and makes it visible. |
|
MascoptViewer(String themeFile)
Constructs a new MascoptViewer frame and makes it visible. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
overiden to listens the buttons; Not an user method. |
void |
addGraphInLayer(mascoptLib.abstractGraph.AbstractGraph g,
mascoptLib.gui.GLayer l)
Add a Graph in a Layer. |
void |
addGraphInLayer(mascoptLib.abstractGraph.AbstractGraph g,
mascoptLib.gui.GLayer l,
boolean visible)
Add a Graph in a Layer. |
void |
addLayerInView(mascoptLib.gui.GLayer l,
mascoptLib.gui.GView v)
Adds a Layer in a View. |
void |
closeView(String name)
Close a view. |
void |
destroyLayer(mascoptLib.gui.GLayer layer)
Destroy a layer. |
String[] |
getArcLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph,
mascoptLib.gui.GLayer l)
Gets the label line for the arc for a specified graph in a specified layer in an array of String. |
String[] |
getNodeLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph,
mascoptLib.gui.GLayer l)
Gets the label line for the node for a specified graph in a specified layer in an array of String. |
void |
itemStateChanged(ItemEvent e)
overiden to listens the combobox; Not an user method. |
void |
moveDownGraphInLayer(mascoptLib.abstractGraph.AbstractGraph ag,
mascoptLib.gui.GLayer gl)
Lower a Graph in a specified Layer. |
void |
moveDownLayerInView(mascoptLib.gui.GLayer gl,
mascoptLib.gui.GView gv)
Lower a Layer in a specified view. |
void |
moveUpGraphInLayer(mascoptLib.abstractGraph.AbstractGraph ag,
mascoptLib.gui.GLayer gl)
Raise a Graph in a specified Layer. |
void |
moveUpLayerInView(mascoptLib.gui.GLayer gl,
mascoptLib.gui.GView gv)
Raise a Layer in a specified view. |
void |
newGraph(mascoptLib.abstractGraph.AbstractGraph g)
Adds a new Graph in the MascoptViewer ie adds it in the "Add Graph" combobox |
mascoptLib.gui.GLayer |
newLayer(String name)
Creates a new Layer with a specified name. |
mascoptLib.gui.GView |
newView()
Creates a new GView with a default name centered on (0,0) and displays it. |
mascoptLib.gui.GView |
newView(String name)
Creates a new GView with a specified name centered on (0,0) and displays it. |
mascoptLib.gui.GView |
newView(String name,
int centerX,
int centerY)
Creates a new GView with a specified name centered and displays it. |
mascoptLib.gui.GView |
newView(String name,
int centerX,
int centerY,
double zoom,
int width,
int height,
int locationX,
int locationY)
Creates a new GView with a specified name centered and displays it. |
mascoptLib.gui.GView |
newView(String name,
int centerX,
int centerY,
double zoom,
int width,
int height,
int locationX,
int locationY,
JPanel title)
Creates a new GView centered with a specified name and displays it. |
mascoptLib.gui.GView |
newView(String name,
int centerX,
int centerY,
double zoom,
int width,
int height,
int locationX,
int locationY,
String title)
Creates a new GView centered with a specified name and displays it. |
void |
purgeUnusedGraphs()
Clean the memory of unused graphs. |
boolean |
removeGraph(mascoptLib.abstractGraph.AbstractGraph graph)
Remove a graph from the list of available graphs. |
void |
removeGraphInLayer(mascoptLib.abstractGraph.AbstractGraph ag,
mascoptLib.gui.GLayer gl)
Remove a Graph in a specified Layer. |
void |
removeLayerInView(mascoptLib.gui.GLayer gl,
mascoptLib.gui.GView gv)
Remove a Layer in a specified view. |
void |
setArcLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph,
mascoptLib.gui.GLayer l,
String value)
set the arc's label for a specified Graph in a specified Layer.The String value will be splitted in a String[] using the delimiter "\n". |
void |
setArcLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph,
mascoptLib.gui.GLayer l,
String[] value)
set the arc's label for a specified Graph in a specified Layer. |
void |
setNodeLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph,
mascoptLib.gui.GLayer l,
String value)
set the node's label for a specified Graph in a specified Layer.The String value will be splitted in a String[] using the delimiter "\n". |
void |
setNodeLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph,
mascoptLib.gui.GLayer l,
String[] value)
set the node's label for a specified Graph in a specified Layer. |
void |
setVisibleGraphInLayer(mascoptLib.abstractGraph.AbstractGraph g,
mascoptLib.gui.GLayer l,
boolean visible)
Shows or hides a Graph in a specified Layer depending on the value of parameter visible. |
void |
setVisibleLabels(mascoptLib.gui.GLayer gl,
boolean visible)
Shows or hides the labels in a specified Layer depending on the value of parameter visible. |
void |
setVisibleLayerInView(mascoptLib.gui.GLayer l,
mascoptLib.gui.GView v,
boolean visible)
Shows or hides a Layer in a specified View depending on the value of parameter visible. |
Methods inherited from class javax.swing.JFrame |
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update |
Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Constructor Detail |
public MascoptViewer()
public MascoptViewer(String themeFile)
Method Detail |
public mascoptLib.gui.GView newView()
public mascoptLib.gui.GView newView(String name)
name
- the name of the view, if a view with this name already exists, than the name=name+'''
public mascoptLib.gui.GView newView(String name, int centerX, int centerY)
name
- the name of the view, if a view with this name already exists, then adds a ' at the end of the name.centerX
- the x coordiantes of the center of the viewcenterY
- the y coordiantes of the center of the view
public mascoptLib.gui.GView newView(String name, int centerX, int centerY, double zoom, int width, int height, int locationX, int locationY)
name
- the name of the view, if a view with this name already exists, then adds a ' at the end of the name.centerX
- the x coordiantes of the center of the viewcenterY
- the y coordiantes of the center of the viewzoom
- the zoom factor for the view.width
- the width the view.locationX
- the x location for the frame containing the view.locationY
- the y location for the frame containing the view.
public mascoptLib.gui.GView newView(String name, int centerX, int centerY, double zoom, int width, int height, int locationX, int locationY, String title)
name
- the name of the view, if a view with this name already exists, then adds a ' at the end of the name.centerX
- the x coordiantes of the center of the viewcenterY
- the y coordiantes of the center of the viewzoom
- the zoom factor for the view.width
- the width of the view.locationX
- the x location for the frame containing the view.locationY
- the y location for the frame containing the view.title
- the title of the view represented by a string. y location for the frame containing the view.
public mascoptLib.gui.GView newView(String name, int centerX, int centerY, double zoom, int width, int height, int locationX, int locationY, JPanel title)
name
- the name of the view, if a view with this name already exists, then adds a ' at the end of the name.centerX
- the x coordiantes of the center of the viewcenterY
- the y coordiantes of the center of the viewzoom
- the zoom factor for the view.width
- the width of the the view.locationX
- the x location for the frame containing the view.locationY
- the y location for the frame containing the view.title
- the JPanel to be added at the bottom of the view.
public void closeView(String name)
name
- the name of the view to be closed.public mascoptLib.gui.GLayer newLayer(String name)
name
- the name of the layer, if a layer with this name already exists,
then adds a ' at the end of the name.
public void destroyLayer(mascoptLib.gui.GLayer layer)
layer
- the layer to destroy.public void newGraph(mascoptLib.abstractGraph.AbstractGraph g)
g
- the Graph to be added.public void addLayerInView(mascoptLib.gui.GLayer l, mascoptLib.gui.GView v)
l
- the Layer to be added.v
- the View in wich the layer is added.public void addGraphInLayer(mascoptLib.abstractGraph.AbstractGraph g, mascoptLib.gui.GLayer l)
g
- the graph to add.l
- the layer.public void addGraphInLayer(mascoptLib.abstractGraph.AbstractGraph g, mascoptLib.gui.GLayer l, boolean visible)
g
- the Graph to be added.l
- the Layer in wich the graph is added.visible
- if true show the graph.public void setVisibleGraphInLayer(mascoptLib.abstractGraph.AbstractGraph g, mascoptLib.gui.GLayer l, boolean visible)
g
- the Graphl
- the Layervisible
- if true, shows the graph in the layer; otherwise, hides it.public void setVisibleLayerInView(mascoptLib.gui.GLayer l, mascoptLib.gui.GView v, boolean visible)
l
- the Layer.v
- the View.visible
- if true, shows the layer in the view; otherwise, hides it.public void setVisibleLabels(mascoptLib.gui.GLayer gl, boolean visible)
gl
- the Layer.visible
- if true, shows labels in the layer; otherwise, hides it.public void moveUpLayerInView(mascoptLib.gui.GLayer gl, mascoptLib.gui.GView gv)
gl
- the Layer to be raised.gv
- the viewpublic void moveDownLayerInView(mascoptLib.gui.GLayer gl, mascoptLib.gui.GView gv)
gl
- the Layer to be loweredgv
- the viewpublic void removeLayerInView(mascoptLib.gui.GLayer gl, mascoptLib.gui.GView gv)
gl
- the Layer to be removed.gv
- the viewpublic void moveUpGraphInLayer(mascoptLib.abstractGraph.AbstractGraph ag, mascoptLib.gui.GLayer gl)
ag
- the graph to be raised.gl
- the Layerpublic void moveDownGraphInLayer(mascoptLib.abstractGraph.AbstractGraph ag, mascoptLib.gui.GLayer gl)
ag
- the graph to be lowered.gl
- the Layerpublic void removeGraphInLayer(mascoptLib.abstractGraph.AbstractGraph ag, mascoptLib.gui.GLayer gl)
ag
- the graph to be removed.gl
- the Layerpublic void setNodeLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph, mascoptLib.gui.GLayer l, String[] value)
Each String of the array value is a line.
All expressions like "$(X)" will be replaced by node.getValue(X,graph).
for example: "id=$(id)" will be id=Id_Of_The_Node.
graph
- the graph.l
- the layer.value
- the Strings for the labels.public void setArcLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph, mascoptLib.gui.GLayer l, String[] value)
Each String of the array value is a line.
All expressions like "$(X)" will be replaced by arc.getValue(X,graph).
for example: "id=$(id)" will be id=Id_Of_The_Arc.
graph
- the graph.l
- the layer.value
- the Strings for the labels.public void setNodeLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph, mascoptLib.gui.GLayer l, String value)
graph
- the graph.l
- the layer.value
- the String to be used to create the String[].setNodeLabelGraphInLayer(AbstractGraph , GLayer ,String [])
public void setArcLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph, mascoptLib.gui.GLayer l, String value)
graph
- the graph.l
- the layer.value
- the String to be used to create the String[].setArcLabelGraphInLayer(AbstractGraph , GLayer ,String [])
public String[] getNodeLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph, mascoptLib.gui.GLayer l)
graph
- the Graph.l
- the Layer.
public String[] getArcLabelGraphInLayer(mascoptLib.abstractGraph.AbstractGraph graph, mascoptLib.gui.GLayer l)
graph
- the Graph.l
- the Layer.
public boolean removeGraph(mascoptLib.abstractGraph.AbstractGraph graph)
graph
- the graph to remove
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- .public void purgeUnusedGraphs()
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
e
- .
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |