public Collection<Handle> createHandles(SVGPathFigure pathFigure, int detailLevel) {
   LinkedList<Handle> handles = new LinkedList<Handle>();
   switch (detailLevel % 2) {
     case 0:
       for (int i = 0, n = path.size(); i < n; i++) {
         handles.add(new BezierNodeHandle(this, i, pathFigure));
       }
       break;
     case 1:
       TransformHandleKit.addTransformHandles(this, handles);
       break;
     default:
       break;
   }
   return handles;
 }
Esempio n. 2
0
 public Collection<Handle> createHandles(int detailLevel) {
   LinkedList<Handle> handles = new LinkedList<Handle>();
   switch (detailLevel % 2) {
     case -1: // Mouse hover handles
       handles.add(new BoundsOutlineHandle(this, false, true));
       break;
     case 0:
       handles.add(new BoundsOutlineHandle(this));
       handles.add(new MoveHandle(this, RelativeLocator.northWest()));
       handles.add(new MoveHandle(this, RelativeLocator.northEast()));
       handles.add(new MoveHandle(this, RelativeLocator.southWest()));
       handles.add(new MoveHandle(this, RelativeLocator.southEast()));
       handles.add(new FontSizeHandle(this));
       handles.add(new LinkHandle(this));
       break;
     case 1:
       TransformHandleKit.addTransformHandles(this, handles);
       break;
   }
   return handles;
 }