Search this API

y.view
Interface GenericEdgeRealizer.BendHandler

All Known Implementing Classes:
SimpleBendHandler
Enclosing class:
GenericEdgeRealizer

public static interface GenericEdgeRealizer.BendHandler

This interface is used as a callback by GenericEdgeRealizer to handle the list of bends.

 

Method Summary
 void bendChanged(EdgeRealizer context, BendList bends, Bend b, double oldX, double oldY)
          Callback method for EdgeRealizer.bendChanged(Bend, double, double)
 Bend createBend(EdgeRealizer context, BendList bends, double x, double y, Bend refBend, int dir)
          Callback method for EdgeRealizer.createBend(double, double, Bend, int)
 int getMinBendCount(EdgeRealizer context)
          Callback method for EdgeRealizer.getMinBendCount()
 Bend insertBend(EdgeRealizer context, BendList bends, double x, double y)
          Callback method for EdgeRealizer.insertBend(double, double)
 void reInsertBend(EdgeRealizer context, BendList bends, Bend bend, Bend refBend, int dir)
          Callback method for EdgeRealizer.reInsertBend(Bend, Bend, int)
 Bend removeBend(EdgeRealizer context, BendList bends, Bend b)
          Callback method for EdgeRealizer.removeBend(Bend)
 

Method Detail

getMinBendCount

int getMinBendCount(EdgeRealizer context)
Callback method for EdgeRealizer.getMinBendCount()

Parameters:
context - the context EdgeRealizer
Returns:
the minimum number of bends as defined in EdgeRealizer.getMinBendCount()

reInsertBend

void reInsertBend(EdgeRealizer context,
                  BendList bends,
                  Bend bend,
                  Bend refBend,
                  int dir)
Callback method for EdgeRealizer.reInsertBend(Bend, Bend, int)

Parameters:
context - the context EdgeRealizer
bends - the current BendList
bend - the bend to be reinserted
refBend - the reference bend
dir - the direction of the insertion, either Graph.BEFORE or Graph.AFTER
See Also:
EdgeRealizer.reInsertBend(Bend, Bend, int)

removeBend

Bend removeBend(EdgeRealizer context,
                BendList bends,
                Bend b)
Callback method for EdgeRealizer.removeBend(Bend)

Parameters:
context - the context EdgeRealizer
bends - the current BendList
b - the bend to be removed
See Also:
EdgeRealizer.removeBend(Bend)

createBend

Bend createBend(EdgeRealizer context,
                BendList bends,
                double x,
                double y,
                Bend refBend,
                int dir)
Callback method for EdgeRealizer.createBend(double, double, Bend, int)

Parameters:
context - the context EdgeRealizer
bends - the current BendList
See Also:
EdgeRealizer.createBend(double, double, Bend, int)

insertBend

Bend insertBend(EdgeRealizer context,
                BendList bends,
                double x,
                double y)
Callback method for EdgeRealizer.insertBend(double, double)

Parameters:
context - the context EdgeRealizer
bends - the current BendList
See Also:
EdgeRealizer.insertBend(double, double)

bendChanged

void bendChanged(EdgeRealizer context,
                 BendList bends,
                 Bend b,
                 double oldX,
                 double oldY)
Callback method for EdgeRealizer.bendChanged(Bend, double, double)

Parameters:
context - the context EdgeRealizer
bends - the current BendList
b - the bend that changed
oldX - the old x coordinate
oldY - the old y coordinate

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.