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
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.
nodeCreating
public boolean nodeCreating(NodeGraph graph, GraphNode node)A node is about to be added: dropped from a
GraphPalette, pasted or
duplicated. The node is already where it will be.Returns
false to refuse
nodeCreated
public void nodeCreated(NodeGraph graph, GraphNode node)A node was added by the user.
nodeResizing
public boolean nodeResizing(NodeGraph graph, GraphNode node, double width, double height)A node was dragged by a corner and is about to take a new size, in
world units.
Returns
false to refuse, which puts it back
nodeResized
public void nodeResized(NodeGraph graph, GraphNode node)A node was resized by the user.