graphlab.gui.plugins.main.core
Class CorePluginMethods

java.lang.Object
  extended by graphlab.gui.plugins.main.core.CorePluginMethods
All Implemented Interfaces:
PluginMethods

public class CorePluginMethods
extends java.lang.Object
implements PluginMethods

Author:
azin azadi

Constructor Summary
CorePluginMethods(BlackBoard blackboard)
           
 
Method Summary
 void addEdge(Edge e)
          adds e to current editing graph
static void addEdge(Graph g, Edge e)
          adds e to g
static void addEdge(Graph g, Vertex v1, Vertex v2)
          create and adds a new edge from v1, v2 to g
 void addEdge(Vertex v1, Vertex v2)
           
 void addTab()
          creates a graph ans add it as a tab to the current editing graph window
 Vertex addVertex()
          add a new vertex to a random position of the current graph and returns it
static Vertex addVertex(Graph g)
          adds a new vertex to a random point of the graph and returns it
static Vertex addVertex(Graph g, int x, int y)
          adds a vertex to the given point of graph
 Vertex addVertex(int x, int y)
          adds a vertex to the given point of current graph
 void clearGraph()
          removes all edges and vertices of current graph
static void clearGraph(Graph g)
          removes all edges and vertices of g
 void closeTab()
          removes the current tab from current editing graph window
 void copyToClipboard(SelectData selection)
           
 void cutToClipboard(SelectData selection)
           
static void deleteEdge(Edge e)
           
static void deleteVertex(Vertex v)
          deletes a vertex from it's coressponding graph
static void highlightEdge(Edge e)
          highlights the given edge this means a color change of edge which make it highlighted(different from other edges)
static void highlightVertex(Vertex v)
          highlights the given edge this means a color change of edge which make it highlighted(different from other edges)
static boolean isEdgeHighlighted(Edge e)
           
static boolean isVertexHighlighted(Vertex v)
           
static void moveVertex(Vertex v, int newX, int newY)
          moves v to the new position,(the position gives absolutely not relatively)
 void pasteFromClipboard()
           
 void redo()
          redo the last undoabe operation done in the context of current BlackBoard
 void resetGraph()
          resets the state of current graph this means to set the properties of vertices and edges to default values, mark=false, model color=0, view color= default color
static void resetGraph(Graph g)
          resets the state of Graph g this means to set the properties of vertices and edges to default values, mark=false, model color=0, view color= default color
 void showQuickMessage(java.lang.String message)
          shows a message in the status bar of the Frame loaded and assigned to current blackboard the showing message will be hide after 3 seconds
 void showStatusBarMessage(java.lang.String s)
          shows a message in the status bar of the Frame loaded and assigned to current blackboard note that at each time just 1 message can be shown on that place
 void undo()
          undo the last undoabe operation done in the context of current BlackBoard
static void unHighlightedge(Edge e)
           
static void unHighlightVertex(Vertex v)
           
 void zoomIn()
          zooms in current graph with default zoom factor 1.25
static void zoomIn(Graph g, double zoomFactor)
          zooms in Objects in the graph(e.g.
 void zoomOut()
          zooms in current graph with default zoom factor 1.25
static void zoomOut(Graph g, double zoomFactor)
          zooms out Objects in the graph(e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorePluginMethods

public CorePluginMethods(BlackBoard blackboard)
Method Detail

addEdge

public static void addEdge(Graph g,
                           Edge e)
adds e to g


addEdge

public void addEdge(Edge e)
adds e to current editing graph


addEdge

public static void addEdge(Graph g,
                           Vertex v1,
                           Vertex v2)
create and adds a new edge from v1, v2 to g


addEdge

public void addEdge(Vertex v1,
                    Vertex v2)

deleteEdge

public static void deleteEdge(Edge e)

highlightEdge

public static void highlightEdge(Edge e)
highlights the given edge this means a color change of edge which make it highlighted(different from other edges)


unHighlightedge

public static void unHighlightedge(Edge e)

isEdgeHighlighted

public static boolean isEdgeHighlighted(Edge e)

clearGraph

public static void clearGraph(Graph g)
removes all edges and vertices of g


clearGraph

public void clearGraph()
removes all edges and vertices of current graph


addVertex

public static Vertex addVertex(Graph g)
adds a new vertex to a random point of the graph and returns it


addVertex

public Vertex addVertex()
add a new vertex to a random position of the current graph and returns it


addVertex

public static Vertex addVertex(Graph g,
                               int x,
                               int y)
adds a vertex to the given point of graph


addVertex

public Vertex addVertex(int x,
                        int y)
adds a vertex to the given point of current graph


deleteVertex

public static void deleteVertex(Vertex v)
deletes a vertex from it's coressponding graph


moveVertex

public static void moveVertex(Vertex v,
                              int newX,
                              int newY)
moves v to the new position,(the position gives absolutely not relatively)


highlightVertex

public static void highlightVertex(Vertex v)
highlights the given edge this means a color change of edge which make it highlighted(different from other edges)


unHighlightVertex

public static void unHighlightVertex(Vertex v)

isVertexHighlighted

public static boolean isVertexHighlighted(Vertex v)

zoomIn

public static void zoomIn(Graph g,
                          double zoomFactor)
zooms in Objects in the graph(e.g. vertices) according to the given zoomFactor


zoomIn

public void zoomIn()
zooms in current graph with default zoom factor 1.25


zoomOut

public static void zoomOut(Graph g,
                           double zoomFactor)
zooms out Objects in the graph(e.g. vertices) according to the given zoomFactor


zoomOut

public void zoomOut()
zooms in current graph with default zoom factor 1.25


undo

public void undo()
undo the last undoabe operation done in the context of current BlackBoard


redo

public void redo()
redo the last undoabe operation done in the context of current BlackBoard


addTab

public void addTab()
creates a graph ans add it as a tab to the current editing graph window


closeTab

public void closeTab()
removes the current tab from current editing graph window


resetGraph

public void resetGraph()
resets the state of current graph this means to set the properties of vertices and edges to default values, mark=false, model color=0, view color= default color


resetGraph

public static void resetGraph(Graph g)
resets the state of Graph g this means to set the properties of vertices and edges to default values, mark=false, model color=0, view color= default color


showStatusBarMessage

public void showStatusBarMessage(java.lang.String s)
shows a message in the status bar of the Frame loaded and assigned to current blackboard note that at each time just 1 message can be shown on that place


showQuickMessage

public void showQuickMessage(java.lang.String message)
shows a message in the status bar of the Frame loaded and assigned to current blackboard the showing message will be hide after 3 seconds


copyToClipboard

public void copyToClipboard(SelectData selection)

pasteFromClipboard

public void pasteFromClipboard()

cutToClipboard

public void cutToClipboard(SelectData selection)