|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.SimpleBendHandler
public class SimpleBendHandler
A simple default implementation of GenericEdgeRealizer.BendHandler
that poses no
restrictions on the number of bends in a GenericEdgeRealizer instance.
This implementation mimics the one found in PolyLineEdgeRealizer
for example.
Constructor Summary | |
---|---|
SimpleBendHandler()
|
Method Summary | |
---|---|
void |
bendChanged(EdgeRealizer context,
BendList bends,
Bend b,
double oldX,
double oldY)
This implementation does nothing. |
Bend |
createBend(EdgeRealizer context,
BendList bends,
double x,
double y,
Bend refBend,
int dir)
Adds a new bend before or after the given reference bend. |
int |
getMinBendCount(EdgeRealizer context)
This implementation returns 0 |
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) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleBendHandler()
Method Detail |
---|
public int getMinBendCount(EdgeRealizer context)
0
getMinBendCount
in interface GenericEdgeRealizer.BendHandler
context
- the context EdgeRealizer
0
public Bend createBend(EdgeRealizer context, BendList bends, double x, double y, Bend refBend, int dir)
createBend
in interface GenericEdgeRealizer.BendHandler
x
- X-coordinate of the Bendy
- Y-coordinate of the BendrefBend
- Bend which should be neighbordir
- indicates if the new Bend should be added before
(Graph.BEFORE) or after (Graph.AFTER) the refBend in
the bend sequence of the edgecontext
- the context EdgeRealizerbends
- the current BendListEdgeRealizer.createBend(double, double, Bend, int)
public void reInsertBend(EdgeRealizer context, BendList bends, Bend bend, Bend refBend, int dir)
GenericEdgeRealizer.BendHandler
EdgeRealizer.reInsertBend(Bend, Bend, int)
reInsertBend
in interface GenericEdgeRealizer.BendHandler
context
- the context EdgeRealizerbends
- the current BendListbend
- the bend to be reinsertedrefBend
- the reference benddir
- the direction of the insertion, either Graph.BEFORE
or Graph.AFTER
EdgeRealizer.reInsertBend(Bend, Bend, int)
public Bend insertBend(EdgeRealizer context, BendList bends, double x, double y)
GenericEdgeRealizer.BendHandler
EdgeRealizer.insertBend(double, double)
insertBend
in interface GenericEdgeRealizer.BendHandler
context
- the context EdgeRealizerbends
- the current BendListEdgeRealizer.insertBend(double, double)
public void bendChanged(EdgeRealizer context, BendList bends, Bend b, double oldX, double oldY)
bendChanged
in interface GenericEdgeRealizer.BendHandler
context
- the context EdgeRealizerbends
- the current BendListb
- the bend that changedoldX
- the old x coordinateoldY
- the old y coordinatepublic Bend removeBend(EdgeRealizer context, BendList bends, Bend b)
GenericEdgeRealizer.BendHandler
EdgeRealizer.removeBend(Bend)
removeBend
in interface GenericEdgeRealizer.BendHandler
context
- the context EdgeRealizerbends
- the current BendListb
- the bend to be removedEdgeRealizer.removeBend(Bend)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |