Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class GraphAdapter
- Object
- GraphAdapter
ImplementsGraphListener
A
GraphListener that refuses nothing and ignores everything; override
what you need.Constructors
public GraphAdapter() |
Methods
public void selectionChanged(NodeGraph graph) | The selection changed. |
public void nodeOpened(NodeGraph graph, GraphNode node) | A node was double tapped. |
public boolean nodeMoving(NodeGraph graph, GraphNode node, double x, double y) | A node was dragged and is about to be moved to a world position. |
public void nodeMoved(NodeGraph graph, GraphNode node) | A node was moved by the user. |
public boolean edgeCreating(NodeGraph graph, GraphNode source, GraphPort sourcePort, GraphNode target, GraphPort targetPort) | An edge was dragged from a node or port to another and is about to be made. |
public void edgeCreated(NodeGraph graph, GraphEdge edge) | An edge was made by the user. |
public boolean removing(NodeGraph graph, GraphNode node, GraphEdge edge) | A node or an edge is about to be removed by NodeGraph.deleteSelection. |
public void groupToggled(NodeGraph graph, GraphGroup group) | A group was collapsed or expanded by a tap on its title. |
Inherited methods
Constructor details
GraphAdapter
public GraphAdapter()Method details
selectionChanged
public void selectionChanged(NodeGraph graph)The selection changed.
nodeOpened
public void nodeOpened(NodeGraph graph, GraphNode node)A node was double tapped.
nodeMoving
public boolean nodeMoving(NodeGraph graph, GraphNode node, double x, double y)A node was dragged and is about to be moved to a world position.
Returns
false to refuse, which puts it back
nodeMoved
public void nodeMoved(NodeGraph graph, GraphNode node)A node was moved by the user.
edgeCreating
public boolean edgeCreating(NodeGraph graph, GraphNode source, GraphPort sourcePort, GraphNode target, GraphPort targetPort)An edge was dragged from a node or port to another and is about to be
made. Either port may be null.
Returns
false to refuse
edgeCreated
public void edgeCreated(NodeGraph graph, GraphEdge edge)An edge was made by the user.
removing
public boolean removing(NodeGraph graph, GraphNode node, GraphEdge edge)A node or an edge is about to be removed by
NodeGraph.deleteSelection.
Exactly one of the two is not null.Returns
false to refuse
groupToggled
public void groupToggled(NodeGraph graph, GraphGroup group)A group was collapsed or expanded by a tap on its title.