Class GraphAdapter
java.lang.Object
com.codename1.ui.graph.GraphAdapter
- All Implemented Interfaces:
GraphListener
A
GraphListener that refuses nothing and ignores everything; override
what you need.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidedgeCreated(NodeGraph graph, GraphEdge edge) An edge was made by the user.booleanedgeCreating(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.voidgroupToggled(NodeGraph graph, GraphGroup group) A group was collapsed or expanded by a tap on its title.voidnodeCreated(NodeGraph graph, GraphNode node) A node was added by the user.booleannodeCreating(NodeGraph graph, GraphNode node) A node is about to be added: dropped from aGraphPalette, pasted or duplicated.voidA node was moved by the user.booleannodeMoving(NodeGraph graph, GraphNode node, double x, double y) A node was dragged and is about to be moved to a world position.voidnodeOpened(NodeGraph graph, GraphNode node) A node was double tapped.voidnodeResized(NodeGraph graph, GraphNode node) A node was resized by the user.booleannodeResizing(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.booleanA node or an edge is about to be removed byNodeGraph.deleteSelection.voidselectionChanged(NodeGraph graph) The selection changed.
-
Constructor Details
-
GraphAdapter
public GraphAdapter()
-
-
Method Details
-
selectionChanged
Description copied from interface:GraphListenerThe selection changed.- Specified by:
selectionChangedin interfaceGraphListener
-
nodeOpened
Description copied from interface:GraphListenerA node was double tapped.- Specified by:
nodeOpenedin interfaceGraphListener
-
nodeMoving
Description copied from interface:GraphListenerA node was dragged and is about to be moved to a world position.
Returns
false to refuse, which puts it back
- Specified by:
nodeMovingin interfaceGraphListener
-
nodeMoved
Description copied from interface:GraphListenerA node was moved by the user.- Specified by:
nodeMovedin interfaceGraphListener
-
edgeCreating
public boolean edgeCreating(NodeGraph graph, GraphNode source, GraphPort sourcePort, GraphNode target, GraphPort targetPort) Description copied from interface:GraphListenerAn 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
- Specified by:
edgeCreatingin interfaceGraphListener
-
edgeCreated
Description copied from interface:GraphListenerAn edge was made by the user.- Specified by:
edgeCreatedin interfaceGraphListener
-
removing
Description copied from interface:GraphListenerA node or an edge is about to be removed by
NodeGraph.deleteSelection. Exactly one of the two is not null.Returns
false to refuse
- Specified by:
removingin interfaceGraphListener
-
groupToggled
Description copied from interface:GraphListenerA group was collapsed or expanded by a tap on its title.- Specified by:
groupToggledin interfaceGraphListener
-
nodeCreating
Description copied from interface:GraphListenerA 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
- Specified by:
nodeCreatingin interfaceGraphListener
-
nodeCreated
Description copied from interface:GraphListenerA node was added by the user.- Specified by:
nodeCreatedin interfaceGraphListener
-
nodeResizing
Description copied from interface:GraphListenerA 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
- Specified by:
nodeResizingin interfaceGraphListener
-
nodeResized
Description copied from interface:GraphListenerA node was resized by the user.- Specified by:
nodeResizedin interfaceGraphListener
-